From 8bdc0abd9edca098dc664c0af03f4f6e027876eb Mon Sep 17 00:00:00 2001 From: Daniel Paul Carbone Date: Sun, 22 Dec 2019 01:49:06 -0600 Subject: [PATCH] latest output from generator --- .../DSTU1/FHIRBase64BinaryPrimitive.php | 34 +- .../PHPFHIRGenerated/DSTU1/FHIRBinary.php | 32 +- .../DSTU1/FHIRBooleanPrimitive.php | 34 +- .../DSTU1/FHIRCodePrimitive.php | 34 +- .../DSTU1/FHIRDatePrimitive.php | 36 +- .../DSTU1/FHIRDateTimePrimitive.php | 36 +- .../DSTU1/FHIRDecimalPrimitive.php | 34 +- .../PHPFHIRGenerated/DSTU1/FHIRElement.php | 34 +- .../DSTU1/FHIRElement/FHIRAddress.php | 185 +- .../DSTU1/FHIRElement/FHIRAddressUse.php | 64 +- .../DSTU1/FHIRElement/FHIRAggregationMode.php | 64 +- .../DSTU1/FHIRElement/FHIRAlertStatus.php | 64 +- .../DSTU1/FHIRElement/FHIRAttachment.php | 166 +- .../DSTU1/FHIRElement/FHIRBackboneElement.php | 66 +- .../FHIRAdverseReactionExposure.php | 127 +- .../FHIRAdverseReactionSymptom.php | 93 +- .../FHIRCarePlan/FHIRCarePlanActivity.php | 182 +- .../FHIRCarePlan/FHIRCarePlanGoal.php | 129 +- .../FHIRCarePlan/FHIRCarePlanParticipant.php | 93 +- .../FHIRCarePlan/FHIRCarePlanSimple.php | 248 +- .../FHIRCompositionAttester.php | 112 +- .../FHIRComposition/FHIRCompositionEvent.php | 114 +- .../FHIRCompositionSection.php | 146 +- .../FHIRConceptMap/FHIRConceptMapConcept.php | 131 +- .../FHIRConceptMapDependsOn.php | 110 +- .../FHIRConceptMap/FHIRConceptMapMap.php | 146 +- .../FHIRCondition/FHIRConditionEvidence.php | 95 +- .../FHIRCondition/FHIRConditionLocation.php | 93 +- .../FHIRConditionRelatedItem.php | 110 +- .../FHIRCondition/FHIRConditionStage.php | 95 +- .../FHIRConformanceCertificate.php | 93 +- .../FHIRConformanceDocument.php | 110 +- .../FHIRConformance/FHIRConformanceEvent.php | 197 +- .../FHIRConformanceImplementation.php | 93 +- .../FHIRConformanceMessaging.php | 129 +- .../FHIRConformanceOperation.php | 93 +- .../FHIRConformanceOperation1.php | 93 +- .../FHIRConformance/FHIRConformanceQuery.php | 129 +- .../FHIRConformanceResource.php | 184 +- .../FHIRConformance/FHIRConformanceRest.php | 186 +- .../FHIRConformanceSearchParam.php | 165 +- .../FHIRConformanceSecurity.php | 131 +- .../FHIRConformanceSoftware.php | 110 +- .../FHIRDeviceObservationReportChannel.php | 95 +- .../FHIRDeviceObservationReportMetric.php | 76 +- ...IRDeviceObservationReportVirtualDevice.php | 95 +- .../FHIRDiagnosticOrderEvent.php | 127 +- .../FHIRDiagnosticOrderItem.php | 148 +- .../FHIRDiagnosticReportImage.php | 93 +- .../FHIRDocumentReferenceContext.php | 112 +- .../FHIRDocumentReferenceParameter.php | 93 +- .../FHIRDocumentReferenceRelatesTo.php | 93 +- .../FHIRDocumentReferenceService.php | 112 +- .../FHIREncounterAccomodation.php | 93 +- .../FHIREncounterHospitalization.php | 269 +- .../FHIREncounter/FHIREncounterLocation.php | 93 +- .../FHIREncounterParticipant.php | 95 +- .../FHIRFamilyHistoryCondition.php | 161 +- .../FHIRFamilyHistoryRelation.php | 265 +- .../FHIRGroup/FHIRGroupCharacteristic.php | 161 +- .../FHIRImagingStudyInstance.php | 178 +- .../FHIRImagingStudySeries.php | 231 +- .../FHIRImmunizationExplanation.php | 97 +- .../FHIRImmunizationReaction.php | 110 +- .../FHIRImmunizationVaccinationProtocol.php | 195 +- ...mmunizationRecommendationDateCriterion.php | 93 +- ...FHIRImmunizationRecommendationProtocol.php | 127 +- ...munizationRecommendationRecommendation.php | 201 +- .../FHIRList/FHIRListEntry.php | 129 +- .../FHIRLocation/FHIRLocationPosition.php | 110 +- .../FHIRMedication/FHIRMedicationContent.php | 93 +- .../FHIRMedicationIngredient.php | 93 +- .../FHIRMedication/FHIRMedicationPackage.php | 95 +- .../FHIRMedication/FHIRMedicationProduct.php | 95 +- .../FHIRMedicationAdministrationDosage.php | 229 +- .../FHIRMedicationDispenseDispense.php | 233 +- .../FHIRMedicationDispenseDosage.php | 263 +- .../FHIRMedicationDispenseSubstitution.php | 114 +- .../FHIRMedicationPrescriptionDispense.php | 144 +- ...edicationPrescriptionDosageInstruction.php | 280 +- ...FHIRMedicationPrescriptionSubstitution.php | 93 +- .../FHIRMedicationStatementDosage.php | 212 +- .../FHIRMessageHeaderDestination.php | 110 +- .../FHIRMessageHeaderResponse.php | 110 +- .../FHIRMessageHeaderSource.php | 144 +- .../FHIRObservationReferenceRange.php | 127 +- .../FHIRObservationRelated.php | 93 +- .../FHIROperationOutcomeIssue.php | 129 +- .../FHIROrder/FHIROrderWhen.php | 93 +- .../FHIROrganizationContact.php | 146 +- .../FHIRPatient/FHIRPatientAnimal.php | 110 +- .../FHIRPatient/FHIRPatientContact.php | 165 +- .../FHIRPatient/FHIRPatientLink.php | 93 +- .../FHIRPractitionerQualification.php | 110 +- .../FHIRProcedure/FHIRProcedurePerformer.php | 93 +- .../FHIRProcedureRelatedItem.php | 93 +- .../FHIRProfile/FHIRProfileBinding.php | 161 +- .../FHIRProfile/FHIRProfileConstraint.php | 144 +- .../FHIRProfile/FHIRProfileDefinition.php | 1259 +++++- .../FHIRProfile/FHIRProfileElement.php | 146 +- .../FHIRProfile/FHIRProfileExtensionDefn.php | 146 +- .../FHIRProfile/FHIRProfileMapping.php | 127 +- .../FHIRProfile/FHIRProfileMapping1.php | 93 +- .../FHIRProfile/FHIRProfileQuery.php | 112 +- .../FHIRProfile/FHIRProfileSearchParam.php | 146 +- .../FHIRProfile/FHIRProfileSlicing.php | 110 +- .../FHIRProfile/FHIRProfileStructure.php | 165 +- .../FHIRProfile/FHIRProfileType.php | 112 +- .../FHIRProvenance/FHIRProvenanceAgent.php | 127 +- .../FHIRProvenance/FHIRProvenanceEntity.php | 144 +- .../FHIRQuery/FHIRQueryResponse.php | 224 +- .../FHIRQuestionnaireGroup.php | 165 +- .../FHIRQuestionnaireQuestion.php | 743 +++- .../FHIRBackboneElement/FHIRResource.php | 112 +- .../FHIRResource/FHIRAdverseReaction.php | 220 +- .../FHIRResource/FHIRAlert.php | 199 +- .../FHIRResource/FHIRAllergyIntolerance.php | 271 +- .../FHIRResource/FHIRCarePlan.php | 275 +- .../FHIRResource/FHIRComposition.php | 339 +- .../FHIRResource/FHIRConceptMap.php | 320 +- .../FHIRResource/FHIRCondition.php | 443 +- .../FHIRResource/FHIRConformance.php | 413 +- .../FHIRResource/FHIRDevice.php | 320 +- .../FHIRDeviceObservationReport.php | 182 +- .../FHIRResource/FHIRDiagnosticOrder.php | 273 +- .../FHIRResource/FHIRDiagnosticReport.php | 398 +- .../FHIRResource/FHIRDocumentManifest.php | 326 +- .../FHIRResource/FHIRDocumentReference.php | 513 ++- .../FHIRResource/FHIREncounter.php | 358 +- .../FHIRResource/FHIRFamilyHistory.php | 167 +- .../FHIRResource/FHIRGroup.php | 235 +- .../FHIRResource/FHIRImagingStudy.php | 394 +- .../FHIRResource/FHIRImmunization.php | 407 +- .../FHIRImmunizationRecommendation.php | 150 +- .../FHIRResource/FHIRList.php | 252 +- .../FHIRResource/FHIRLocation.php | 301 +- .../FHIRResource/FHIRMedia.php | 318 +- .../FHIRResource/FHIRMedication.php | 214 +- .../FHIRMedicationAdministration.php | 307 +- .../FHIRResource/FHIRMedicationDispense.php | 218 +- .../FHIRMedicationPrescription.php | 303 +- .../FHIRResource/FHIRMedicationStatement.php | 239 +- .../FHIRResource/FHIRMessageHeader.php | 303 +- .../FHIRResource/FHIRObservation.php | 492 +- .../FHIRResource/FHIROperationOutcome.php | 114 +- .../FHIRResource/FHIROrder.php | 269 +- .../FHIRResource/FHIROrderResponse.php | 252 +- .../FHIRResource/FHIROrganization.php | 258 +- .../FHIRResource/FHIROther.php | 182 +- .../FHIRResource/FHIRPatient.php | 436 +- .../FHIRResource/FHIRPractitioner.php | 349 +- .../FHIRResource/FHIRProcedure.php | 347 +- .../FHIRResource/FHIRProfile.php | 379 +- .../FHIRResource/FHIRProvenance.php | 256 +- .../FHIRResource/FHIRQuery.php | 148 +- .../FHIRResource/FHIRQuestionnaire.php | 250 +- .../FHIRResource/FHIRRelatedPerson.php | 237 +- .../FHIRResource/FHIRSecurityEvent.php | 167 +- .../FHIRResource/FHIRSpecimen.php | 256 +- .../FHIRResource/FHIRSubstance.php | 165 +- .../FHIRResource/FHIRSupply.php | 199 +- .../FHIRResource/FHIRValueSet.php | 335 +- .../FHIRSecurityEventDetail.php | 93 +- .../FHIRSecurityEventEvent.php | 163 +- .../FHIRSecurityEventNetwork.php | 93 +- .../FHIRSecurityEventObject.php | 231 +- .../FHIRSecurityEventParticipant.php | 197 +- .../FHIRSecurityEventSource.php | 112 +- .../FHIRSpecimen/FHIRSpecimenCollection.php | 180 +- .../FHIRSpecimen/FHIRSpecimenContainer.php | 163 +- .../FHIRSpecimen/FHIRSpecimenSource.php | 95 +- .../FHIRSpecimen/FHIRSpecimenTreatment.php | 112 +- .../FHIRSubstance/FHIRSubstanceIngredient.php | 93 +- .../FHIRSubstance/FHIRSubstanceInstance.php | 110 +- .../FHIRSupply/FHIRSupplyDispense.php | 231 +- .../FHIRValueSet/FHIRValueSetCompose.php | 116 +- .../FHIRValueSet/FHIRValueSetConcept.php | 146 +- .../FHIRValueSet/FHIRValueSetContains.php | 129 +- .../FHIRValueSet/FHIRValueSetDefine.php | 129 +- .../FHIRValueSet/FHIRValueSetExpansion.php | 112 +- .../FHIRValueSet/FHIRValueSetFilter.php | 110 +- .../FHIRValueSet/FHIRValueSetInclude.php | 131 +- .../DSTU1/FHIRElement/FHIRBase64Binary.php | 64 +- .../FHIRElement/FHIRBindingConformance.php | 64 +- .../DSTU1/FHIRElement/FHIRBoolean.php | 64 +- .../FHIRCarePlanActivityCategory.php | 64 +- .../FHIRCarePlanActivityStatus.php | 64 +- .../FHIRElement/FHIRCarePlanGoalStatus.php | 64 +- .../DSTU1/FHIRElement/FHIRCarePlanStatus.php | 64 +- .../FHIRElement/FHIRCausalityExpectation.php | 64 +- .../DSTU1/FHIRElement/FHIRCode.php | 64 +- .../DSTU1/FHIRElement/FHIRCodeableConcept.php | 83 +- .../DSTU1/FHIRElement/FHIRCoding.php | 149 +- .../FHIRCompositionAttestationMode.php | 64 +- .../FHIRElement/FHIRCompositionStatus.php | 64 +- .../FHIRElement/FHIRConceptMapEquivalence.php | 64 +- .../FHIRConditionRelationshipType.php | 64 +- .../DSTU1/FHIRElement/FHIRConditionStatus.php | 64 +- .../FHIRElement/FHIRConformanceEventMode.php | 64 +- .../FHIRConformanceStatementStatus.php | 64 +- .../FHIRElement/FHIRConstraintSeverity.php | 64 +- .../DSTU1/FHIRElement/FHIRContact.php | 115 +- .../DSTU1/FHIRElement/FHIRContactSystem.php | 64 +- .../DSTU1/FHIRElement/FHIRContactUse.php | 64 +- .../DSTU1/FHIRElement/FHIRCriticality.php | 64 +- .../DSTU1/FHIRElement/FHIRDate.php | 64 +- .../DSTU1/FHIRElement/FHIRDateTime.php | 64 +- .../DSTU1/FHIRElement/FHIRDecimal.php | 64 +- .../FHIRElement/FHIRDecimal/FHIRScore.php | 59 +- .../FHIRDiagnosticOrderPriority.php | 64 +- .../FHIRElement/FHIRDiagnosticOrderStatus.php | 64 +- .../FHIRDiagnosticReportStatus.php | 64 +- .../DSTU1/FHIRElement/FHIRDocumentMode.php | 64 +- .../FHIRDocumentReferenceStatus.php | 64 +- .../FHIRDocumentRelationshipType.php | 64 +- .../DSTU1/FHIRElement/FHIREncounterClass.php | 64 +- .../DSTU1/FHIRElement/FHIREncounterState.php | 64 +- .../DSTU1/FHIRElement/FHIREventTiming.php | 64 +- .../DSTU1/FHIRElement/FHIRExposureType.php | 64 +- .../DSTU1/FHIRElement/FHIRExtension.php | 472 +- .../FHIRElement/FHIRExtensionContext.php | 64 +- .../DSTU1/FHIRElement/FHIRFilterOperator.php | 64 +- .../DSTU1/FHIRElement/FHIRGroupType.php | 64 +- .../FHIRHierarchicalRelationshipType.php | 64 +- .../DSTU1/FHIRElement/FHIRHumanName.php | 174 +- .../DSTU1/FHIRElement/FHIRId.php | 64 +- .../DSTU1/FHIRElement/FHIRIdentifier.php | 149 +- .../DSTU1/FHIRElement/FHIRIdentifierUse.php | 64 +- .../DSTU1/FHIRElement/FHIRImagingModality.php | 64 +- .../FHIRElement/FHIRInstanceAvailability.php | 64 +- .../DSTU1/FHIRElement/FHIRInstant.php | 64 +- .../DSTU1/FHIRElement/FHIRInteger.php | 64 +- .../FHIRInteger/FHIRTotalResults.php | 59 +- .../DSTU1/FHIRElement/FHIRIssueSeverity.php | 64 +- .../DSTU1/FHIRElement/FHIRLinkType.php | 64 +- .../DSTU1/FHIRElement/FHIRListMode.php | 64 +- .../DSTU1/FHIRElement/FHIRLocationMode.php | 64 +- .../DSTU1/FHIRElement/FHIRLocationStatus.php | 64 +- .../DSTU1/FHIRElement/FHIRMediaType.php | 64 +- .../FHIRMedicationAdministrationStatus.php | 64 +- .../FHIRMedicationDispenseStatus.php | 64 +- .../DSTU1/FHIRElement/FHIRMedicationKind.php | 64 +- .../FHIRMedicationPrescriptionStatus.php | 64 +- .../FHIRMessageSignificanceCategory.php | 64 +- .../DSTU1/FHIRElement/FHIRModality.php | 64 +- .../DSTU1/FHIRElement/FHIRNameUse.php | 64 +- .../DSTU1/FHIRElement/FHIRNarrative.php | 81 +- .../DSTU1/FHIRElement/FHIRNarrativeStatus.php | 64 +- .../FHIRObservationRelationshipType.php | 64 +- .../FHIRObservationReliability.php | 64 +- .../FHIRElement/FHIRObservationStatus.php | 64 +- .../DSTU1/FHIRElement/FHIROid.php | 64 +- .../FHIRElement/FHIROrderOutcomeStatus.php | 64 +- .../DSTU1/FHIRElement/FHIRPeriod.php | 81 +- .../FHIRProcedureRelationshipType.php | 64 +- .../FHIRPropertyRepresentation.php | 64 +- .../FHIRElement/FHIRProvenanceEntityRole.php | 64 +- .../DSTU1/FHIRElement/FHIRQuantity.php | 132 +- .../FHIRElement/FHIRQuantity/FHIRAge.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRCount.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRDistance.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRDuration.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRMoney.php | 107 +- .../FHIRElement/FHIRQuantityCompararator.php | 64 +- .../DSTU1/FHIRElement/FHIRQueryOutcome.php | 64 +- .../FHIRElement/FHIRQuestionnaireStatus.php | 64 +- .../DSTU1/FHIRElement/FHIRRange.php | 81 +- .../DSTU1/FHIRElement/FHIRRatio.php | 81 +- .../FHIRElement/FHIRReactionSeverity.php | 64 +- .../FHIRElement/FHIRResourceProfileStatus.php | 64 +- .../FHIRElement/FHIRResourceReference.php | 81 +- .../DSTU1/FHIRElement/FHIRResponseType.php | 64 +- .../FHIRRestfulConformanceMode.php | 64 +- .../FHIRRestfulOperationSystem.php | 64 +- .../FHIRElement/FHIRRestfulOperationType.php | 64 +- .../DSTU1/FHIRElement/FHIRSampledData.php | 166 +- .../FHIRElement/FHIRSampledDataDataType.php | 64 +- .../DSTU1/FHIRElement/FHIRSchedule.php | 83 +- .../FHIRSchedule/FHIRScheduleRepeat.php | 149 +- .../DSTU1/FHIRElement/FHIRSearchParamType.php | 64 +- .../FHIRElement/FHIRSecurityEventAction.php | 64 +- .../FHIRSecurityEventObjectLifecycle.php | 64 +- .../FHIRSecurityEventObjectRole.php | 64 +- .../FHIRSecurityEventObjectType.php | 64 +- .../FHIRElement/FHIRSecurityEventOutcome.php | 64 +- ...HIRSecurityEventParticipantNetworkType.php | 64 +- .../FHIRElement/FHIRSensitivityStatus.php | 64 +- .../DSTU1/FHIRElement/FHIRSensitivityType.php | 64 +- .../DSTU1/FHIRElement/FHIRSlicingRules.php | 64 +- .../DSTU1/FHIRElement/FHIRString.php | 64 +- .../FHIRElement/FHIRSupplyDispenseStatus.php | 64 +- .../DSTU1/FHIRElement/FHIRSupplyStatus.php | 64 +- .../DSTU1/FHIRElement/FHIRUnitsOfTime.php | 64 +- .../DSTU1/FHIRElement/FHIRUri.php | 64 +- .../DSTU1/FHIRElement/FHIRUuid.php | 64 +- .../DSTU1/FHIRElement/FHIRValueSetStatus.php | 64 +- .../DSTU1/FHIRIdPrimitive.php | 34 +- .../DSTU1/FHIRIdPrimitive/FHIRXmlIdRef.php | 35 +- .../DSTU1/FHIRInstantPrimitive.php | 36 +- .../DSTU1/FHIRIntegerPrimitive.php | 34 +- .../DSTU1/FHIROidPrimitive.php | 34 +- .../DSTU1/FHIRResourceInline.php | 267 +- .../FHIRSampledDataDataTypePrimitive.php | 34 +- .../DSTU1/FHIRStringPrimitive.php | 34 +- .../FHIRAddressUseList.php | 35 +- .../FHIRAggregationModeList.php | 35 +- .../FHIRAlertStatusList.php | 35 +- .../FHIRBindingConformanceList.php | 35 +- .../FHIRCarePlanActivityCategoryList.php | 35 +- .../FHIRCarePlanActivityStatusList.php | 35 +- .../FHIRCarePlanGoalStatusList.php | 35 +- .../FHIRCarePlanStatusList.php | 35 +- .../FHIRCausalityExpectationList.php | 35 +- .../FHIRCompositionAttestationModeList.php | 35 +- .../FHIRCompositionStatusList.php | 35 +- .../FHIRConceptMapEquivalenceList.php | 35 +- .../FHIRConditionRelationshipTypeList.php | 35 +- .../FHIRConditionStatusList.php | 35 +- .../FHIRConformanceEventModeList.php | 35 +- .../FHIRConformanceStatementStatusList.php | 35 +- .../FHIRConstraintSeverityList.php | 35 +- .../FHIRContactSystemList.php | 35 +- .../FHIRContactUseList.php | 35 +- .../FHIRCriticalityList.php | 35 +- .../FHIRDiagnosticOrderPriorityList.php | 35 +- .../FHIRDiagnosticOrderStatusList.php | 35 +- .../FHIRDiagnosticReportStatusList.php | 35 +- .../FHIRDocumentModeList.php | 35 +- .../FHIRDocumentReferenceStatusList.php | 35 +- .../FHIRDocumentRelationshipTypeList.php | 35 +- .../FHIREncounterClassList.php | 35 +- .../FHIREncounterStateList.php | 35 +- .../FHIREventTimingList.php | 35 +- .../FHIRExposureTypeList.php | 35 +- .../FHIRExtensionContextList.php | 35 +- .../FHIRFilterOperatorList.php | 35 +- .../FHIRStringPrimitive/FHIRGroupTypeList.php | 35 +- .../FHIRHierarchicalRelationshipTypeList.php | 35 +- .../FHIRIdentifierUseList.php | 35 +- .../FHIRImagingModalityList.php | 35 +- .../FHIRInstanceAvailabilityList.php | 35 +- .../FHIRIssueSeverityList.php | 35 +- .../FHIRStringPrimitive/FHIRLinkTypeList.php | 35 +- .../FHIRStringPrimitive/FHIRListModeList.php | 35 +- .../FHIRLocationModeList.php | 35 +- .../FHIRLocationStatusList.php | 35 +- .../FHIRStringPrimitive/FHIRMediaTypeList.php | 35 +- ...FHIRMedicationAdministrationStatusList.php | 35 +- .../FHIRMedicationDispenseStatusList.php | 35 +- .../FHIRMedicationKindList.php | 35 +- .../FHIRMedicationPrescriptionStatusList.php | 35 +- .../FHIRMessageSignificanceCategoryList.php | 35 +- .../FHIRStringPrimitive/FHIRModalityList.php | 35 +- .../FHIRStringPrimitive/FHIRNameUseList.php | 35 +- .../FHIRNarrativeStatusList.php | 35 +- .../FHIRObservationRelationshipTypeList.php | 35 +- .../FHIRObservationReliabilityList.php | 35 +- .../FHIRObservationStatusList.php | 35 +- .../FHIROrderOutcomeStatusList.php | 35 +- .../FHIRProcedureRelationshipTypeList.php | 35 +- .../FHIRPropertyRepresentationList.php | 35 +- .../FHIRProvenanceEntityRoleList.php | 35 +- .../FHIRQuantityCompararatorList.php | 35 +- .../FHIRQueryOutcomeList.php | 35 +- .../FHIRQuestionnaireStatusList.php | 35 +- .../FHIRReactionSeverityList.php | 35 +- .../FHIRResourceProfileStatusList.php | 35 +- .../FHIRStringPrimitive/FHIRResourceType.php | 35 +- .../FHIRResourceNamesPlusBinary.php | 35 +- .../FHIRResponseTypeList.php | 35 +- .../FHIRRestfulConformanceModeList.php | 35 +- .../FHIRRestfulOperationSystemList.php | 35 +- .../FHIRRestfulOperationTypeList.php | 35 +- .../FHIRSearchParamTypeList.php | 35 +- .../FHIRSecurityEventActionList.php | 35 +- .../FHIRSecurityEventObjectLifecycleList.php | 35 +- .../FHIRSecurityEventObjectRoleList.php | 35 +- .../FHIRSecurityEventObjectTypeList.php | 35 +- .../FHIRSecurityEventOutcomeList.php | 35 +- ...ecurityEventParticipantNetworkTypeList.php | 35 +- .../FHIRSensitivityStatusList.php | 35 +- .../FHIRSensitivityTypeList.php | 35 +- .../FHIRSlicingRulesList.php | 35 +- .../FHIRSupplyDispenseStatusList.php | 35 +- .../FHIRSupplyStatusList.php | 35 +- .../FHIRUnitsOfTimeList.php | 35 +- .../FHIRValueSetStatusList.php | 35 +- .../DSTU1/FHIRUriPrimitive.php | 34 +- .../DSTU1/FHIRUuidPrimitive.php | 34 +- .../DSTU1/PHPFHIRAutoloader.php | 5 +- .../PHPFHIRCommentContainerInterface.php | 2 +- .../DSTU1/PHPFHIRCommentContainerTrait.php | 2 +- .../DSTU1/PHPFHIRConstants.php | 6 +- .../DSTU1/PHPFHIRContainedTypeInterface.php | 2 +- .../DSTU1/PHPFHIRResponseParser.php | 2 +- .../DSTU1/PHPFHIRResponseParserConfig.php | 2 +- .../FHIRBase64BinaryPrimitiveTest.php | 2 +- .../DSTU1/PHPFHIRTests/FHIRBinaryTest.php | 2 +- .../PHPFHIRTests/FHIRBooleanPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRCodePrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRDatePrimitiveTest.php | 2 +- .../FHIRDateTimePrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRDecimalPrimitiveTest.php | 2 +- .../FHIRElement/FHIRAddressTest.php | 2 +- .../FHIRElement/FHIRAddressUseTest.php | 2 +- .../FHIRElement/FHIRAggregationModeTest.php | 2 +- .../FHIRElement/FHIRAlertStatusTest.php | 2 +- .../FHIRElement/FHIRAttachmentTest.php | 2 +- .../FHIRAdverseReactionExposureTest.php | 2 +- .../FHIRAdverseReactionSymptomTest.php | 2 +- .../FHIRCarePlan/FHIRCarePlanActivityTest.php | 2 +- .../FHIRCarePlan/FHIRCarePlanGoalTest.php | 2 +- .../FHIRCarePlanParticipantTest.php | 2 +- .../FHIRCarePlan/FHIRCarePlanSimpleTest.php | 2 +- .../FHIRCompositionAttesterTest.php | 2 +- .../FHIRCompositionEventTest.php | 2 +- .../FHIRCompositionSectionTest.php | 2 +- .../FHIRConceptMapConceptTest.php | 2 +- .../FHIRConceptMapDependsOnTest.php | 2 +- .../FHIRConceptMap/FHIRConceptMapMapTest.php | 2 +- .../FHIRConditionEvidenceTest.php | 2 +- .../FHIRConditionLocationTest.php | 2 +- .../FHIRConditionRelatedItemTest.php | 2 +- .../FHIRCondition/FHIRConditionStageTest.php | 2 +- .../FHIRConformanceCertificateTest.php | 2 +- .../FHIRConformanceDocumentTest.php | 2 +- .../FHIRConformanceEventTest.php | 2 +- .../FHIRConformanceImplementationTest.php | 2 +- .../FHIRConformanceMessagingTest.php | 2 +- .../FHIRConformanceOperation1Test.php | 2 +- .../FHIRConformanceOperationTest.php | 2 +- .../FHIRConformanceQueryTest.php | 2 +- .../FHIRConformanceResourceTest.php | 2 +- .../FHIRConformanceRestTest.php | 2 +- .../FHIRConformanceSearchParamTest.php | 2 +- .../FHIRConformanceSecurityTest.php | 2 +- .../FHIRConformanceSoftwareTest.php | 2 +- ...FHIRDeviceObservationReportChannelTest.php | 2 +- .../FHIRDeviceObservationReportMetricTest.php | 2 +- ...viceObservationReportVirtualDeviceTest.php | 2 +- .../FHIRDiagnosticOrderEventTest.php | 2 +- .../FHIRDiagnosticOrderItemTest.php | 2 +- .../FHIRDiagnosticReportImageTest.php | 2 +- .../FHIRDocumentReferenceContextTest.php | 2 +- .../FHIRDocumentReferenceParameterTest.php | 2 +- .../FHIRDocumentReferenceRelatesToTest.php | 2 +- .../FHIRDocumentReferenceServiceTest.php | 2 +- .../FHIREncounterAccomodationTest.php | 2 +- .../FHIREncounterHospitalizationTest.php | 2 +- .../FHIREncounterLocationTest.php | 2 +- .../FHIREncounterParticipantTest.php | 2 +- .../FHIRFamilyHistoryConditionTest.php | 2 +- .../FHIRFamilyHistoryRelationTest.php | 2 +- .../FHIRGroup/FHIRGroupCharacteristicTest.php | 2 +- .../FHIRImagingStudyInstanceTest.php | 2 +- .../FHIRImagingStudySeriesTest.php | 2 +- .../FHIRImmunizationExplanationTest.php | 2 +- .../FHIRImmunizationReactionTest.php | 2 +- ...HIRImmunizationVaccinationProtocolTest.php | 2 +- ...izationRecommendationDateCriterionTest.php | 2 +- ...ImmunizationRecommendationProtocolTest.php | 2 +- ...zationRecommendationRecommendationTest.php | 2 +- .../FHIRList/FHIRListEntryTest.php | 2 +- .../FHIRLocation/FHIRLocationPositionTest.php | 2 +- .../FHIRMedicationContentTest.php | 2 +- .../FHIRMedicationIngredientTest.php | 2 +- .../FHIRMedicationPackageTest.php | 2 +- .../FHIRMedicationProductTest.php | 2 +- ...FHIRMedicationAdministrationDosageTest.php | 2 +- .../FHIRMedicationDispenseDispenseTest.php | 2 +- .../FHIRMedicationDispenseDosageTest.php | 2 +- ...FHIRMedicationDispenseSubstitutionTest.php | 2 +- ...FHIRMedicationPrescriptionDispenseTest.php | 2 +- ...ationPrescriptionDosageInstructionTest.php | 2 +- ...MedicationPrescriptionSubstitutionTest.php | 2 +- .../FHIRMedicationStatementDosageTest.php | 2 +- .../FHIRMessageHeaderDestinationTest.php | 2 +- .../FHIRMessageHeaderResponseTest.php | 2 +- .../FHIRMessageHeaderSourceTest.php | 2 +- .../FHIRObservationReferenceRangeTest.php | 2 +- .../FHIRObservationRelatedTest.php | 2 +- .../FHIROperationOutcomeIssueTest.php | 2 +- .../FHIROrder/FHIROrderWhenTest.php | 2 +- .../FHIROrganizationContactTest.php | 2 +- .../FHIRPatient/FHIRPatientAnimalTest.php | 2 +- .../FHIRPatient/FHIRPatientContactTest.php | 2 +- .../FHIRPatient/FHIRPatientLinkTest.php | 2 +- .../FHIRPractitionerQualificationTest.php | 2 +- .../FHIRProcedurePerformerTest.php | 2 +- .../FHIRProcedureRelatedItemTest.php | 2 +- .../FHIRProfile/FHIRProfileBindingTest.php | 2 +- .../FHIRProfile/FHIRProfileConstraintTest.php | 2 +- .../FHIRProfile/FHIRProfileDefinitionTest.php | 2 +- .../FHIRProfile/FHIRProfileElementTest.php | 2 +- .../FHIRProfileExtensionDefnTest.php | 2 +- .../FHIRProfile/FHIRProfileMapping1Test.php | 2 +- .../FHIRProfile/FHIRProfileMappingTest.php | 2 +- .../FHIRProfile/FHIRProfileQueryTest.php | 2 +- .../FHIRProfileSearchParamTest.php | 2 +- .../FHIRProfile/FHIRProfileSlicingTest.php | 2 +- .../FHIRProfile/FHIRProfileStructureTest.php | 2 +- .../FHIRProfile/FHIRProfileTypeTest.php | 2 +- .../FHIRProvenanceAgentTest.php | 2 +- .../FHIRProvenanceEntityTest.php | 2 +- .../FHIRQuery/FHIRQueryResponseTest.php | 2 +- .../FHIRQuestionnaireGroupTest.php | 2 +- .../FHIRQuestionnaireQuestionTest.php | 2 +- .../FHIRResource/FHIRAdverseReactionTest.php | 2 +- .../FHIRResource/FHIRAlertTest.php | 2 +- .../FHIRAllergyIntoleranceTest.php | 2 +- .../FHIRResource/FHIRCarePlanTest.php | 2 +- .../FHIRResource/FHIRCompositionTest.php | 2 +- .../FHIRResource/FHIRConceptMapTest.php | 2 +- .../FHIRResource/FHIRConditionTest.php | 2 +- .../FHIRResource/FHIRConformanceTest.php | 2 +- .../FHIRDeviceObservationReportTest.php | 2 +- .../FHIRResource/FHIRDeviceTest.php | 2 +- .../FHIRResource/FHIRDiagnosticOrderTest.php | 2 +- .../FHIRResource/FHIRDiagnosticReportTest.php | 2 +- .../FHIRResource/FHIRDocumentManifestTest.php | 2 +- .../FHIRDocumentReferenceTest.php | 2 +- .../FHIRResource/FHIREncounterTest.php | 2 +- .../FHIRResource/FHIRFamilyHistoryTest.php | 2 +- .../FHIRResource/FHIRGroupTest.php | 2 +- .../FHIRResource/FHIRImagingStudyTest.php | 2 +- .../FHIRImmunizationRecommendationTest.php | 2 +- .../FHIRResource/FHIRImmunizationTest.php | 2 +- .../FHIRResource/FHIRListTest.php | 2 +- .../FHIRResource/FHIRLocationTest.php | 2 +- .../FHIRResource/FHIRMediaTest.php | 2 +- .../FHIRMedicationAdministrationTest.php | 2 +- .../FHIRMedicationDispenseTest.php | 2 +- .../FHIRMedicationPrescriptionTest.php | 2 +- .../FHIRMedicationStatementTest.php | 2 +- .../FHIRResource/FHIRMedicationTest.php | 2 +- .../FHIRResource/FHIRMessageHeaderTest.php | 2 +- .../FHIRResource/FHIRObservationTest.php | 2 +- .../FHIRResource/FHIROperationOutcomeTest.php | 2 +- .../FHIRResource/FHIROrderResponseTest.php | 2 +- .../FHIRResource/FHIROrderTest.php | 2 +- .../FHIRResource/FHIROrganizationTest.php | 2 +- .../FHIRResource/FHIROtherTest.php | 2 +- .../FHIRResource/FHIRPatientTest.php | 2 +- .../FHIRResource/FHIRPractitionerTest.php | 2 +- .../FHIRResource/FHIRProcedureTest.php | 2 +- .../FHIRResource/FHIRProfileTest.php | 2 +- .../FHIRResource/FHIRProvenanceTest.php | 2 +- .../FHIRResource/FHIRQueryTest.php | 2 +- .../FHIRResource/FHIRQuestionnaireTest.php | 2 +- .../FHIRResource/FHIRRelatedPersonTest.php | 2 +- .../FHIRResource/FHIRSecurityEventTest.php | 2 +- .../FHIRResource/FHIRSpecimenTest.php | 2 +- .../FHIRResource/FHIRSubstanceTest.php | 2 +- .../FHIRResource/FHIRSupplyTest.php | 2 +- .../FHIRResource/FHIRValueSetTest.php | 2 +- .../FHIRBackboneElement/FHIRResourceTest.php | 2 +- .../FHIRSecurityEventDetailTest.php | 2 +- .../FHIRSecurityEventEventTest.php | 2 +- .../FHIRSecurityEventNetworkTest.php | 2 +- .../FHIRSecurityEventObjectTest.php | 2 +- .../FHIRSecurityEventParticipantTest.php | 2 +- .../FHIRSecurityEventSourceTest.php | 2 +- .../FHIRSpecimenCollectionTest.php | 2 +- .../FHIRSpecimenContainerTest.php | 2 +- .../FHIRSpecimen/FHIRSpecimenSourceTest.php | 2 +- .../FHIRSpecimenTreatmentTest.php | 2 +- .../FHIRSubstanceIngredientTest.php | 2 +- .../FHIRSubstanceInstanceTest.php | 2 +- .../FHIRSupply/FHIRSupplyDispenseTest.php | 2 +- .../FHIRValueSet/FHIRValueSetComposeTest.php | 2 +- .../FHIRValueSet/FHIRValueSetConceptTest.php | 2 +- .../FHIRValueSet/FHIRValueSetContainsTest.php | 2 +- .../FHIRValueSet/FHIRValueSetDefineTest.php | 2 +- .../FHIRValueSetExpansionTest.php | 2 +- .../FHIRValueSet/FHIRValueSetFilterTest.php | 2 +- .../FHIRValueSet/FHIRValueSetIncludeTest.php | 2 +- .../FHIRElement/FHIRBackboneElementTest.php | 2 +- .../FHIRElement/FHIRBase64BinaryTest.php | 2 +- .../FHIRBindingConformanceTest.php | 2 +- .../FHIRElement/FHIRBooleanTest.php | 2 +- .../FHIRCarePlanActivityCategoryTest.php | 2 +- .../FHIRCarePlanActivityStatusTest.php | 2 +- .../FHIRCarePlanGoalStatusTest.php | 2 +- .../FHIRElement/FHIRCarePlanStatusTest.php | 2 +- .../FHIRCausalityExpectationTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRCodeTest.php | 2 +- .../FHIRElement/FHIRCodeableConceptTest.php | 2 +- .../FHIRElement/FHIRCodingTest.php | 2 +- .../FHIRCompositionAttestationModeTest.php | 2 +- .../FHIRElement/FHIRCompositionStatusTest.php | 2 +- .../FHIRConceptMapEquivalenceTest.php | 2 +- .../FHIRConditionRelationshipTypeTest.php | 2 +- .../FHIRElement/FHIRConditionStatusTest.php | 2 +- .../FHIRConformanceEventModeTest.php | 2 +- .../FHIRConformanceStatementStatusTest.php | 2 +- .../FHIRConstraintSeverityTest.php | 2 +- .../FHIRElement/FHIRContactSystemTest.php | 2 +- .../FHIRElement/FHIRContactTest.php | 2 +- .../FHIRElement/FHIRContactUseTest.php | 2 +- .../FHIRElement/FHIRCriticalityTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRDateTest.php | 2 +- .../FHIRElement/FHIRDateTimeTest.php | 2 +- .../FHIRElement/FHIRDecimal/FHIRScoreTest.php | 2 +- .../FHIRElement/FHIRDecimalTest.php | 2 +- .../FHIRDiagnosticOrderPriorityTest.php | 2 +- .../FHIRDiagnosticOrderStatusTest.php | 2 +- .../FHIRDiagnosticReportStatusTest.php | 2 +- .../FHIRElement/FHIRDocumentModeTest.php | 2 +- .../FHIRDocumentReferenceStatusTest.php | 2 +- .../FHIRDocumentRelationshipTypeTest.php | 2 +- .../FHIRElement/FHIREncounterClassTest.php | 2 +- .../FHIRElement/FHIREncounterStateTest.php | 2 +- .../FHIRElement/FHIREventTimingTest.php | 2 +- .../FHIRElement/FHIRExposureTypeTest.php | 2 +- .../FHIRElement/FHIRExtensionContextTest.php | 2 +- .../FHIRElement/FHIRExtensionTest.php | 2 +- .../FHIRElement/FHIRFilterOperatorTest.php | 2 +- .../FHIRElement/FHIRGroupTypeTest.php | 2 +- .../FHIRHierarchicalRelationshipTypeTest.php | 2 +- .../FHIRElement/FHIRHumanNameTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRIdTest.php | 2 +- .../FHIRElement/FHIRIdentifierTest.php | 2 +- .../FHIRElement/FHIRIdentifierUseTest.php | 2 +- .../FHIRElement/FHIRImagingModalityTest.php | 2 +- .../FHIRInstanceAvailabilityTest.php | 2 +- .../FHIRElement/FHIRInstantTest.php | 2 +- .../FHIRInteger/FHIRTotalResultsTest.php | 2 +- .../FHIRElement/FHIRIntegerTest.php | 2 +- .../FHIRElement/FHIRIssueSeverityTest.php | 2 +- .../FHIRElement/FHIRLinkTypeTest.php | 2 +- .../FHIRElement/FHIRListModeTest.php | 2 +- .../FHIRElement/FHIRLocationModeTest.php | 2 +- .../FHIRElement/FHIRLocationStatusTest.php | 2 +- .../FHIRElement/FHIRMediaTypeTest.php | 2 +- ...FHIRMedicationAdministrationStatusTest.php | 2 +- .../FHIRMedicationDispenseStatusTest.php | 2 +- .../FHIRElement/FHIRMedicationKindTest.php | 2 +- .../FHIRMedicationPrescriptionStatusTest.php | 2 +- .../FHIRMessageSignificanceCategoryTest.php | 2 +- .../FHIRElement/FHIRModalityTest.php | 2 +- .../FHIRElement/FHIRNameUseTest.php | 2 +- .../FHIRElement/FHIRNarrativeStatusTest.php | 2 +- .../FHIRElement/FHIRNarrativeTest.php | 2 +- .../FHIRObservationRelationshipTypeTest.php | 2 +- .../FHIRObservationReliabilityTest.php | 2 +- .../FHIRElement/FHIRObservationStatusTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIROidTest.php | 2 +- .../FHIROrderOutcomeStatusTest.php | 2 +- .../FHIRElement/FHIRPeriodTest.php | 2 +- .../FHIRProcedureRelationshipTypeTest.php | 2 +- .../FHIRPropertyRepresentationTest.php | 2 +- .../FHIRProvenanceEntityRoleTest.php | 2 +- .../FHIRElement/FHIRQuantity/FHIRAgeTest.php | 2 +- .../FHIRQuantity/FHIRCountTest.php | 2 +- .../FHIRQuantity/FHIRDistanceTest.php | 2 +- .../FHIRQuantity/FHIRDurationTest.php | 2 +- .../FHIRQuantity/FHIRMoneyTest.php | 2 +- .../FHIRQuantityCompararatorTest.php | 2 +- .../FHIRElement/FHIRQuantityTest.php | 2 +- .../FHIRElement/FHIRQueryOutcomeTest.php | 2 +- .../FHIRQuestionnaireStatusTest.php | 2 +- .../FHIRElement/FHIRRangeTest.php | 2 +- .../FHIRElement/FHIRRatioTest.php | 2 +- .../FHIRElement/FHIRReactionSeverityTest.php | 2 +- .../FHIRResourceProfileStatusTest.php | 2 +- .../FHIRElement/FHIRResourceReferenceTest.php | 2 +- .../FHIRElement/FHIRResponseTypeTest.php | 2 +- .../FHIRRestfulConformanceModeTest.php | 2 +- .../FHIRRestfulOperationSystemTest.php | 2 +- .../FHIRRestfulOperationTypeTest.php | 2 +- .../FHIRSampledDataDataTypeTest.php | 2 +- .../FHIRElement/FHIRSampledDataTest.php | 2 +- .../FHIRSchedule/FHIRScheduleRepeatTest.php | 2 +- .../FHIRElement/FHIRScheduleTest.php | 2 +- .../FHIRElement/FHIRSearchParamTypeTest.php | 2 +- .../FHIRSecurityEventActionTest.php | 2 +- .../FHIRSecurityEventObjectLifecycleTest.php | 2 +- .../FHIRSecurityEventObjectRoleTest.php | 2 +- .../FHIRSecurityEventObjectTypeTest.php | 2 +- .../FHIRSecurityEventOutcomeTest.php | 2 +- ...ecurityEventParticipantNetworkTypeTest.php | 2 +- .../FHIRElement/FHIRSensitivityStatusTest.php | 2 +- .../FHIRElement/FHIRSensitivityTypeTest.php | 2 +- .../FHIRElement/FHIRSlicingRulesTest.php | 2 +- .../FHIRElement/FHIRStringTest.php | 2 +- .../FHIRSupplyDispenseStatusTest.php | 2 +- .../FHIRElement/FHIRSupplyStatusTest.php | 2 +- .../FHIRElement/FHIRUnitsOfTimeTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUriTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUuidTest.php | 2 +- .../FHIRElement/FHIRValueSetStatusTest.php | 2 +- .../DSTU1/PHPFHIRTests/FHIRElementTest.php | 2 +- .../FHIRIdPrimitive/FHIRXmlIdRefTest.php | 2 +- .../PHPFHIRTests/FHIRIdPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRInstantPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRIntegerPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIROidPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRResourceInlineTest.php | 2 +- .../FHIRSampledDataDataTypePrimitiveTest.php | 2 +- .../FHIRAddressUseListTest.php | 2 +- .../FHIRAggregationModeListTest.php | 2 +- .../FHIRAlertStatusListTest.php | 2 +- .../FHIRBindingConformanceListTest.php | 2 +- .../FHIRCarePlanActivityCategoryListTest.php | 2 +- .../FHIRCarePlanActivityStatusListTest.php | 2 +- .../FHIRCarePlanGoalStatusListTest.php | 2 +- .../FHIRCarePlanStatusListTest.php | 2 +- .../FHIRCausalityExpectationListTest.php | 2 +- ...FHIRCompositionAttestationModeListTest.php | 2 +- .../FHIRCompositionStatusListTest.php | 2 +- .../FHIRConceptMapEquivalenceListTest.php | 2 +- .../FHIRConditionRelationshipTypeListTest.php | 2 +- .../FHIRConditionStatusListTest.php | 2 +- .../FHIRConformanceEventModeListTest.php | 2 +- ...FHIRConformanceStatementStatusListTest.php | 2 +- .../FHIRConstraintSeverityListTest.php | 2 +- .../FHIRContactSystemListTest.php | 2 +- .../FHIRContactUseListTest.php | 2 +- .../FHIRCriticalityListTest.php | 2 +- .../FHIRDiagnosticOrderPriorityListTest.php | 2 +- .../FHIRDiagnosticOrderStatusListTest.php | 2 +- .../FHIRDiagnosticReportStatusListTest.php | 2 +- .../FHIRDocumentModeListTest.php | 2 +- .../FHIRDocumentReferenceStatusListTest.php | 2 +- .../FHIRDocumentRelationshipTypeListTest.php | 2 +- .../FHIREncounterClassListTest.php | 2 +- .../FHIREncounterStateListTest.php | 2 +- .../FHIREventTimingListTest.php | 2 +- .../FHIRExposureTypeListTest.php | 2 +- .../FHIRExtensionContextListTest.php | 2 +- .../FHIRFilterOperatorListTest.php | 2 +- .../FHIRGroupTypeListTest.php | 2 +- ...IRHierarchicalRelationshipTypeListTest.php | 2 +- .../FHIRIdentifierUseListTest.php | 2 +- .../FHIRImagingModalityListTest.php | 2 +- .../FHIRInstanceAvailabilityListTest.php | 2 +- .../FHIRIssueSeverityListTest.php | 2 +- .../FHIRLinkTypeListTest.php | 2 +- .../FHIRListModeListTest.php | 2 +- .../FHIRLocationModeListTest.php | 2 +- .../FHIRLocationStatusListTest.php | 2 +- .../FHIRMediaTypeListTest.php | 2 +- ...MedicationAdministrationStatusListTest.php | 2 +- .../FHIRMedicationDispenseStatusListTest.php | 2 +- .../FHIRMedicationKindListTest.php | 2 +- ...IRMedicationPrescriptionStatusListTest.php | 2 +- ...HIRMessageSignificanceCategoryListTest.php | 2 +- .../FHIRModalityListTest.php | 2 +- .../FHIRNameUseListTest.php | 2 +- .../FHIRNarrativeStatusListTest.php | 2 +- ...HIRObservationRelationshipTypeListTest.php | 2 +- .../FHIRObservationReliabilityListTest.php | 2 +- .../FHIRObservationStatusListTest.php | 2 +- .../FHIROrderOutcomeStatusListTest.php | 2 +- .../FHIRProcedureRelationshipTypeListTest.php | 2 +- .../FHIRPropertyRepresentationListTest.php | 2 +- .../FHIRProvenanceEntityRoleListTest.php | 2 +- .../FHIRQuantityCompararatorListTest.php | 2 +- .../FHIRQueryOutcomeListTest.php | 2 +- .../FHIRQuestionnaireStatusListTest.php | 2 +- .../FHIRReactionSeverityListTest.php | 2 +- .../FHIRResourceProfileStatusListTest.php | 2 +- .../FHIRResourceNamesPlusBinaryTest.php | 2 +- .../FHIRResourceTypeTest.php | 2 +- .../FHIRResponseTypeListTest.php | 2 +- .../FHIRRestfulConformanceModeListTest.php | 2 +- .../FHIRRestfulOperationSystemListTest.php | 2 +- .../FHIRRestfulOperationTypeListTest.php | 2 +- .../FHIRSearchParamTypeListTest.php | 2 +- .../FHIRSecurityEventActionListTest.php | 2 +- ...IRSecurityEventObjectLifecycleListTest.php | 2 +- .../FHIRSecurityEventObjectRoleListTest.php | 2 +- .../FHIRSecurityEventObjectTypeListTest.php | 2 +- .../FHIRSecurityEventOutcomeListTest.php | 2 +- ...ityEventParticipantNetworkTypeListTest.php | 2 +- .../FHIRSensitivityStatusListTest.php | 2 +- .../FHIRSensitivityTypeListTest.php | 2 +- .../FHIRSlicingRulesListTest.php | 2 +- .../FHIRSupplyDispenseStatusListTest.php | 2 +- .../FHIRSupplyStatusListTest.php | 2 +- .../FHIRUnitsOfTimeListTest.php | 2 +- .../FHIRValueSetStatusListTest.php | 2 +- .../PHPFHIRTests/FHIRStringPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRUriPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRUuidPrimitiveTest.php | 2 +- .../PHPFHIRTests/PHPFHIRConstantsTest.php | 2 +- .../DSTU1/PHPFHIRTests/PHPFHIRTypeMapTest.php | 2 +- .../DSTU1/PHPFHIRTypeInterface.php | 10 +- .../PHPFHIRGenerated/DSTU1/PHPFHIRTypeMap.php | 2 +- .../PHPFHIRValidationAssertionsTrait.php | 214 + .../DSTU2/FHIRBase64BinaryPrimitive.php | 34 +- .../DSTU2/FHIRBooleanPrimitive.php | 34 +- .../DSTU2/FHIRCodePrimitive.php | 34 +- .../DSTU2/FHIRDatePrimitive.php | 36 +- .../DSTU2/FHIRDateTimePrimitive.php | 36 +- .../DSTU2/FHIRDecimalPrimitive.php | 34 +- .../PHPFHIRGenerated/DSTU2/FHIRElement.php | 34 +- .../DSTU2/FHIRElement/FHIRAccountStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRActionList.php | 64 +- .../DSTU2/FHIRElement/FHIRAddress.php | 219 +- .../DSTU2/FHIRElement/FHIRAddressType.php | 64 +- .../DSTU2/FHIRElement/FHIRAddressUse.php | 64 +- .../FHIRElement/FHIRAdministrativeGender.php | 64 +- .../DSTU2/FHIRElement/FHIRAggregationMode.php | 64 +- .../FHIRAllergyIntoleranceCategory.php | 64 +- .../FHIRAllergyIntoleranceCertainty.php | 64 +- .../FHIRAllergyIntoleranceCriticality.php | 64 +- .../FHIRAllergyIntoleranceSeverity.php | 64 +- .../FHIRAllergyIntoleranceStatus.php | 64 +- .../FHIRAllergyIntoleranceType.php | 64 +- .../DSTU2/FHIRElement/FHIRAnnotation.php | 115 +- .../DSTU2/FHIRElement/FHIRAnswerFormat.php | 64 +- .../FHIRElement/FHIRAppointmentStatus.php | 64 +- .../FHIRAssertionDirectionType.php | 64 +- .../FHIRElement/FHIRAssertionOperatorType.php | 64 +- .../FHIRAssertionResponseTypes.php | 64 +- .../DSTU2/FHIRElement/FHIRAttachment.php | 183 +- .../FHIRElement/FHIRAuditEventAction.php | 64 +- .../FHIRElement/FHIRAuditEventOutcome.php | 64 +- .../FHIRAuditEventParticipantNetworkType.php | 64 +- .../DSTU2/FHIRElement/FHIRBackboneElement.php | 66 +- .../FHIRAllergyIntoleranceReaction.php | 197 +- .../FHIRAppointmentParticipant.php | 129 +- .../FHIRAuditEvent/FHIRAuditEventDetail.php | 93 +- .../FHIRAuditEvent/FHIRAuditEventEvent.php | 182 +- .../FHIRAuditEvent/FHIRAuditEventNetwork.php | 93 +- .../FHIRAuditEvent/FHIRAuditEventObject.php | 233 +- .../FHIRAuditEventParticipant.php | 252 +- .../FHIRAuditEvent/FHIRAuditEventSource.php | 112 +- .../FHIRBundle/FHIRBundleEntry.php | 163 +- .../FHIRBundle/FHIRBundleLink.php | 93 +- .../FHIRBundle/FHIRBundleRequest.php | 161 +- .../FHIRBundle/FHIRBundleResponse.php | 127 +- .../FHIRBundle/FHIRBundleSearch.php | 93 +- .../FHIRCarePlan/FHIRCarePlanActivity.php | 131 +- .../FHIRCarePlan/FHIRCarePlanDetail.php | 373 +- .../FHIRCarePlan/FHIRCarePlanParticipant.php | 93 +- .../FHIRCarePlan/FHIRCarePlanRelatedPlan.php | 93 +- .../FHIRClaim/FHIRClaimCoverage.php | 197 +- .../FHIRClaim/FHIRClaimDetail.php | 231 +- .../FHIRClaim/FHIRClaimDiagnosis.php | 93 +- .../FHIRClaim/FHIRClaimItem.php | 356 +- .../FHIRClaim/FHIRClaimMissingTeeth.php | 110 +- .../FHIRClaim/FHIRClaimPayee.php | 127 +- .../FHIRClaim/FHIRClaimProsthesis.php | 110 +- .../FHIRClaim/FHIRClaimSubDetail.php | 212 +- .../FHIRClaimResponseAddItem.php | 169 +- .../FHIRClaimResponseAdjudication.php | 110 +- .../FHIRClaimResponseAdjudication1.php | 110 +- .../FHIRClaimResponseAdjudication2.php | 110 +- .../FHIRClaimResponseAdjudication3.php | 110 +- .../FHIRClaimResponseAdjudication4.php | 110 +- .../FHIRClaimResponseCoverage.php | 197 +- .../FHIRClaimResponseDetail.php | 114 +- .../FHIRClaimResponseDetail1.php | 112 +- .../FHIRClaimResponseError.php | 127 +- .../FHIRClaimResponseItem.php | 133 +- .../FHIRClaimResponseNote.php | 110 +- .../FHIRClaimResponseSubDetail.php | 95 +- .../FHIRClinicalImpressionFinding.php | 93 +- .../FHIRClinicalImpressionInvestigations.php | 95 +- .../FHIRClinicalImpressionRuledOut.php | 93 +- .../FHIRCommunicationPayload.php | 110 +- .../FHIRCommunicationRequestPayload.php | 110 +- .../FHIRCompositionAttester.php | 112 +- .../FHIRComposition/FHIRCompositionEvent.php | 114 +- .../FHIRCompositionSection.php | 199 +- .../FHIRConceptMap/FHIRConceptMapContact.php | 95 +- .../FHIRConceptMapDependsOn.php | 110 +- .../FHIRConceptMap/FHIRConceptMapElement.php | 112 +- .../FHIRConceptMap/FHIRConceptMapTarget.php | 165 +- .../FHIRCondition/FHIRConditionEvidence.php | 95 +- .../FHIRCondition/FHIRConditionStage.php | 95 +- .../FHIRConformanceCertificate.php | 93 +- .../FHIRConformanceContact.php | 95 +- .../FHIRConformanceDocument.php | 110 +- .../FHIRConformanceEndpoint.php | 93 +- .../FHIRConformance/FHIRConformanceEvent.php | 178 +- .../FHIRConformanceImplementation.php | 93 +- .../FHIRConformanceInteraction.php | 93 +- .../FHIRConformanceInteraction1.php | 93 +- .../FHIRConformanceMessaging.php | 131 +- .../FHIRConformanceOperation.php | 93 +- .../FHIRConformanceResource.php | 271 +- .../FHIRConformance/FHIRConformanceRest.php | 222 +- .../FHIRConformanceSearchParam.php | 184 +- .../FHIRConformanceSecurity.php | 131 +- .../FHIRConformanceSoftware.php | 110 +- .../FHIRContract/FHIRContractActor.php | 95 +- .../FHIRContract/FHIRContractActor1.php | 95 +- .../FHIRContract/FHIRContractFriendly.php | 93 +- .../FHIRContract/FHIRContractLegal.php | 93 +- .../FHIRContract/FHIRContractRule.php | 93 +- .../FHIRContract/FHIRContractSigner.php | 110 +- .../FHIRContract/FHIRContractTerm.php | 273 +- .../FHIRContract/FHIRContractValuedItem.php | 212 +- .../FHIRContract/FHIRContractValuedItem1.php | 212 +- .../FHIRDataElementContact.php | 95 +- .../FHIRDataElementMapping.php | 127 +- .../FHIRDetectedIssueMitigation.php | 110 +- ...DeviceComponentProductionSpecification.php | 110 +- .../FHIRDeviceMetricCalibration.php | 110 +- .../FHIRDiagnosticOrderEvent.php | 127 +- .../FHIRDiagnosticOrderItem.php | 148 +- .../FHIRDiagnosticReportImage.php | 93 +- .../FHIRDocumentManifestContent.php | 93 +- .../FHIRDocumentManifestRelated.php | 93 +- .../FHIRDocumentReferenceContent.php | 95 +- .../FHIRDocumentReferenceContext.php | 182 +- .../FHIRDocumentReferenceRelated.php | 93 +- .../FHIRDocumentReferenceRelatesTo.php | 93 +- .../FHIREncounterHospitalization.php | 256 +- .../FHIREncounter/FHIREncounterLocation.php | 110 +- .../FHIREncounterParticipant.php | 112 +- .../FHIREncounterStatusHistory.php | 93 +- .../FHIREpisodeOfCareCareTeam.php | 112 +- .../FHIREpisodeOfCareStatusHistory.php | 93 +- .../FHIRFamilyMemberHistoryCondition.php | 178 +- .../FHIRGoal/FHIRGoalOutcome.php | 93 +- .../FHIRGroup/FHIRGroupCharacteristic.php | 178 +- .../FHIRGroup/FHIRGroupMember.php | 110 +- .../FHIRHealthcareServiceAvailableTime.php | 129 +- .../FHIRHealthcareServiceNotAvailable.php | 93 +- .../FHIRHealthcareServiceServiceType.php | 95 +- .../FHIRImagingObjectSelectionFrames.php | 95 +- .../FHIRImagingObjectSelectionInstance.php | 129 +- .../FHIRImagingObjectSelectionSeries.php | 112 +- .../FHIRImagingObjectSelectionStudy.php | 129 +- .../FHIRImagingStudyInstance.php | 163 +- .../FHIRImagingStudySeries.php | 248 +- .../FHIRImmunizationExplanation.php | 97 +- .../FHIRImmunizationReaction.php | 110 +- .../FHIRImmunizationVaccinationProtocol.php | 197 +- ...mmunizationRecommendationDateCriterion.php | 93 +- ...FHIRImmunizationRecommendationProtocol.php | 127 +- ...munizationRecommendationRecommendation.php | 201 +- .../FHIRImplementationGuideContact.php | 95 +- .../FHIRImplementationGuideDependency.php | 93 +- .../FHIRImplementationGuideGlobal.php | 93 +- .../FHIRImplementationGuidePackage.php | 112 +- .../FHIRImplementationGuidePage.php | 184 +- .../FHIRImplementationGuideResource.php | 178 +- .../FHIRList/FHIRListEntry.php | 127 +- .../FHIRLocation/FHIRLocationPosition.php | 110 +- .../FHIRMedication/FHIRMedicationBatch.php | 93 +- .../FHIRMedication/FHIRMedicationContent.php | 93 +- .../FHIRMedicationIngredient.php | 93 +- .../FHIRMedication/FHIRMedicationPackage.php | 95 +- .../FHIRMedication/FHIRMedicationProduct.php | 114 +- .../FHIRMedicationAdministrationDosage.php | 195 +- ...HIRMedicationDispenseDosageInstruction.php | 297 +- .../FHIRMedicationDispenseSubstitution.php | 114 +- .../FHIRMedicationOrderDispenseRequest.php | 161 +- .../FHIRMedicationOrderDosageInstruction.php | 297 +- .../FHIRMedicationOrderSubstitution.php | 93 +- .../FHIRMedicationStatementDosage.php | 280 +- .../FHIRMessageHeaderDestination.php | 110 +- .../FHIRMessageHeaderResponse.php | 110 +- .../FHIRMessageHeaderSource.php | 144 +- .../FHIRNamingSystemContact.php | 95 +- .../FHIRNamingSystemUniqueId.php | 127 +- .../FHIRNutritionOrderAdministration.php | 127 +- .../FHIRNutritionOrderEnteralFormula.php | 214 +- .../FHIRNutritionOrderNutrient.php | 93 +- .../FHIRNutritionOrderOralDiet.php | 171 +- .../FHIRNutritionOrderSupplement.php | 146 +- .../FHIRNutritionOrderTexture.php | 93 +- .../FHIRObservationComponent.php | 282 +- .../FHIRObservationReferenceRange.php | 144 +- .../FHIRObservationRelated.php | 93 +- .../FHIROperationDefinitionBinding.php | 110 +- .../FHIROperationDefinitionContact.php | 95 +- .../FHIROperationDefinitionParameter.php | 214 +- .../FHIROperationOutcomeIssue.php | 146 +- .../FHIROrder/FHIROrderWhen.php | 93 +- .../FHIROrganizationContact.php | 129 +- .../FHIRParametersParameter.php | 707 ++- .../FHIRPatient/FHIRPatientAnimal.php | 110 +- .../FHIRPatient/FHIRPatientCommunication.php | 93 +- .../FHIRPatient/FHIRPatientContact.php | 182 +- .../FHIRPatient/FHIRPatientLink.php | 93 +- .../FHIRPaymentReconciliationDetail.php | 178 +- .../FHIRPaymentReconciliationNote.php | 93 +- .../FHIRPerson/FHIRPersonLink.php | 93 +- .../FHIRPractitionerPractitionerRole.php | 167 +- .../FHIRPractitionerQualification.php | 129 +- .../FHIRProcedureFocalDevice.php | 93 +- .../FHIRProcedure/FHIRProcedurePerformer.php | 93 +- .../FHIRProcessRequestItem.php | 76 +- .../FHIRProcessResponseNotes.php | 93 +- .../FHIRProvenance/FHIRProvenanceAgent.php | 129 +- .../FHIRProvenance/FHIRProvenanceEntity.php | 144 +- .../FHIRProvenanceRelatedAgent.php | 93 +- .../FHIRQuestionnaireGroup.php | 201 +- .../FHIRQuestionnaireQuestion.php | 218 +- .../FHIRQuestionnaireResponseAnswer.php | 299 +- .../FHIRQuestionnaireResponseGroup.php | 165 +- .../FHIRQuestionnaireResponseQuestion.php | 112 +- .../FHIRRiskAssessmentPrediction.php | 195 +- .../FHIRSearchParameterContact.php | 95 +- .../FHIRSpecimen/FHIRSpecimenCollection.php | 180 +- .../FHIRSpecimen/FHIRSpecimenContainer.php | 180 +- .../FHIRSpecimen/FHIRSpecimenTreatment.php | 112 +- .../FHIRStructureDefinitionContact.php | 95 +- .../FHIRStructureDefinitionDifferential.php | 78 +- .../FHIRStructureDefinitionMapping.php | 127 +- .../FHIRStructureDefinitionSnapshot.php | 78 +- .../FHIRSubscriptionChannel.php | 127 +- .../FHIRSubstance/FHIRSubstanceIngredient.php | 93 +- .../FHIRSubstance/FHIRSubstanceInstance.php | 110 +- .../FHIRSupplyRequestWhen.php | 93 +- .../FHIRTestScript/FHIRTestScriptAction.php | 93 +- .../FHIRTestScript/FHIRTestScriptAction1.php | 93 +- .../FHIRTestScript/FHIRTestScriptAction2.php | 76 +- .../FHIRTestScript/FHIRTestScriptAssert.php | 365 +- .../FHIRTestScriptCapability.php | 163 +- .../FHIRTestScript/FHIRTestScriptContact.php | 95 +- .../FHIRTestScript/FHIRTestScriptFixture.php | 110 +- .../FHIRTestScript/FHIRTestScriptLink.php | 93 +- .../FHIRTestScript/FHIRTestScriptMetadata.php | 97 +- .../FHIRTestScriptOperation.php | 299 +- .../FHIRTestScriptRequestHeader.php | 93 +- .../FHIRTestScript/FHIRTestScriptSetup.php | 95 +- .../FHIRTestScript/FHIRTestScriptTeardown.php | 78 +- .../FHIRTestScript/FHIRTestScriptTest.php | 129 +- .../FHIRTestScript/FHIRTestScriptVariable.php | 127 +- .../FHIRValueSet/FHIRValueSetCodeSystem.php | 129 +- .../FHIRValueSet/FHIRValueSetCompose.php | 116 +- .../FHIRValueSet/FHIRValueSetConcept.php | 165 +- .../FHIRValueSet/FHIRValueSetConcept1.php | 112 +- .../FHIRValueSet/FHIRValueSetContact.php | 95 +- .../FHIRValueSet/FHIRValueSetContains.php | 163 +- .../FHIRValueSet/FHIRValueSetDesignation.php | 110 +- .../FHIRValueSet/FHIRValueSetExpansion.php | 165 +- .../FHIRValueSet/FHIRValueSetFilter.php | 110 +- .../FHIRValueSet/FHIRValueSetInclude.php | 131 +- .../FHIRValueSet/FHIRValueSetParameter.php | 178 +- .../FHIRVisionPrescriptionDispense.php | 314 +- .../DSTU2/FHIRElement/FHIRBase64Binary.php | 64 +- .../DSTU2/FHIRElement/FHIRBindingStrength.php | 64 +- .../DSTU2/FHIRElement/FHIRBoolean.php | 64 +- .../DSTU2/FHIRElement/FHIRBundleType.php | 64 +- .../FHIRCarePlanActivityStatus.php | 64 +- .../FHIRElement/FHIRCarePlanRelationship.php | 64 +- .../DSTU2/FHIRElement/FHIRCarePlanStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRClaimType.php | 64 +- .../FHIRClinicalImpressionStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRCode.php | 64 +- .../DSTU2/FHIRElement/FHIRCodeableConcept.php | 83 +- .../DSTU2/FHIRElement/FHIRCoding.php | 132 +- .../FHIRCommunicationRequestStatus.php | 64 +- .../FHIRElement/FHIRCommunicationStatus.php | 64 +- .../FHIRCompositionAttestationMode.php | 64 +- .../FHIRElement/FHIRCompositionStatus.php | 64 +- .../FHIRElement/FHIRConceptMapEquivalence.php | 64 +- .../FHIRConditionVerificationStatus.php | 64 +- .../FHIRConditionalDeleteStatus.php | 64 +- .../FHIRElement/FHIRConformanceEventMode.php | 64 +- .../FHIRConformanceResourceStatus.php | 64 +- .../FHIRConformanceStatementKind.php | 64 +- .../FHIRElement/FHIRConstraintSeverity.php | 64 +- .../DSTU2/FHIRElement/FHIRContactPoint.php | 132 +- .../FHIRElement/FHIRContactPointSystem.php | 64 +- .../DSTU2/FHIRElement/FHIRContactPointUse.php | 64 +- .../DSTU2/FHIRElement/FHIRContentType.php | 64 +- .../FHIRElement/FHIRDataElementStringency.php | 64 +- .../DSTU2/FHIRElement/FHIRDate.php | 64 +- .../DSTU2/FHIRElement/FHIRDateTime.php | 64 +- .../DSTU2/FHIRElement/FHIRDaysOfWeek.php | 64 +- .../DSTU2/FHIRElement/FHIRDecimal.php | 64 +- .../FHIRElement/FHIRDetectedIssueSeverity.php | 64 +- .../FHIRDeviceMetricCalibrationState.php | 64 +- .../FHIRDeviceMetricCalibrationType.php | 64 +- .../FHIRElement/FHIRDeviceMetricCategory.php | 64 +- .../FHIRElement/FHIRDeviceMetricColor.php | 64 +- .../FHIRDeviceMetricOperationalStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRDeviceStatus.php | 64 +- .../FHIRDeviceUseRequestPriority.php | 64 +- .../FHIRDeviceUseRequestStatus.php | 64 +- .../FHIRDiagnosticOrderPriority.php | 64 +- .../FHIRElement/FHIRDiagnosticOrderStatus.php | 64 +- .../FHIRDiagnosticReportStatus.php | 64 +- .../FHIRElement/FHIRDigitalMediaType.php | 64 +- .../DSTU2/FHIRElement/FHIRDocumentMode.php | 64 +- .../FHIRDocumentReferenceStatus.php | 64 +- .../FHIRDocumentRelationshipType.php | 64 +- .../FHIRElement/FHIRElementDefinition.php | 3954 ++++++++++++++++- .../FHIRElementDefinitionBase.php | 98 +- .../FHIRElementDefinitionBinding.php | 115 +- .../FHIRElementDefinitionConstraint.php | 132 +- .../FHIRElementDefinitionMapping.php | 98 +- .../FHIRElementDefinitionSlicing.php | 117 +- .../FHIRElementDefinitionType.php | 102 +- .../DSTU2/FHIRElement/FHIREncounterClass.php | 64 +- .../FHIREncounterLocationStatus.php | 64 +- .../DSTU2/FHIRElement/FHIREncounterState.php | 64 +- .../FHIRElement/FHIREpisodeOfCareStatus.php | 64 +- .../DSTU2/FHIRElement/FHIREventTiming.php | 64 +- .../DSTU2/FHIRElement/FHIRExtension.php | 642 ++- .../FHIRElement/FHIRExtensionContext.php | 64 +- .../FHIRElement/FHIRFamilyHistoryStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRFilterOperator.php | 64 +- .../DSTU2/FHIRElement/FHIRFlagStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRGoalStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRGroupType.php | 64 +- .../FHIRElement/FHIRGuideDependencyType.php | 64 +- .../DSTU2/FHIRElement/FHIRGuidePageKind.php | 64 +- .../FHIRElement/FHIRGuideResourcePurpose.php | 64 +- .../DSTU2/FHIRElement/FHIRHTTPVerb.php | 64 +- .../DSTU2/FHIRElement/FHIRHumanName.php | 174 +- .../DSTU2/FHIRElement/FHIRId.php | 64 +- .../DSTU2/FHIRElement/FHIRIdentifier.php | 149 +- .../DSTU2/FHIRElement/FHIRIdentifierUse.php | 64 +- .../FHIRIdentityAssuranceLevel.php | 64 +- .../FHIRElement/FHIRInstanceAvailability.php | 64 +- .../DSTU2/FHIRElement/FHIRInstant.php | 64 +- .../DSTU2/FHIRElement/FHIRInteger.php | 64 +- .../DSTU2/FHIRElement/FHIRIssueSeverity.php | 64 +- .../DSTU2/FHIRElement/FHIRIssueType.php | 64 +- .../DSTU2/FHIRElement/FHIRLinkType.php | 64 +- .../DSTU2/FHIRElement/FHIRListMode.php | 64 +- .../DSTU2/FHIRElement/FHIRListStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRLocationMode.php | 64 +- .../DSTU2/FHIRElement/FHIRLocationStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRMarkdown.php | 64 +- .../FHIRElement/FHIRMeasmnt_Principle.php | 64 +- .../FHIRMedicationAdministrationStatus.php | 64 +- .../FHIRMedicationDispenseStatus.php | 64 +- .../FHIRElement/FHIRMedicationOrderStatus.php | 64 +- .../FHIRMedicationStatementStatus.php | 64 +- .../FHIRMessageSignificanceCategory.php | 64 +- .../DSTU2/FHIRElement/FHIRMeta.php | 138 +- .../DSTU2/FHIRElement/FHIRNameUse.php | 64 +- .../FHIRNamingSystemIdentifierType.php | 64 +- .../FHIRElement/FHIRNamingSystemType.php | 64 +- .../DSTU2/FHIRElement/FHIRNarrative.php | 81 +- .../DSTU2/FHIRElement/FHIRNarrativeStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRNoteType.php | 64 +- .../FHIRElement/FHIRNutritionOrderStatus.php | 64 +- .../FHIRObservationRelationshipType.php | 64 +- .../FHIRElement/FHIRObservationStatus.php | 64 +- .../DSTU2/FHIRElement/FHIROid.php | 64 +- .../DSTU2/FHIRElement/FHIROperationKind.php | 64 +- .../FHIRElement/FHIROperationParameterUse.php | 64 +- .../DSTU2/FHIRElement/FHIROrderStatus.php | 64 +- .../FHIRElement/FHIRParticipantRequired.php | 64 +- .../FHIRElement/FHIRParticipantStatus.php | 64 +- .../FHIRElement/FHIRParticipationStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRPeriod.php | 81 +- .../DSTU2/FHIRElement/FHIRPositiveInt.php | 64 +- .../FHIRProcedureRequestPriority.php | 64 +- .../FHIRProcedureRequestStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRProcedureStatus.php | 64 +- .../FHIRPropertyRepresentation.php | 64 +- .../FHIRElement/FHIRProvenanceEntityRole.php | 64 +- .../DSTU2/FHIRElement/FHIRQuantity.php | 132 +- .../FHIRElement/FHIRQuantity/FHIRAge.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRCount.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRDistance.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRDuration.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRMoney.php | 107 +- .../FHIRQuantity/FHIRSimpleQuantity.php | 107 +- .../FHIRElement/FHIRQuantityComparator.php | 64 +- .../FHIRQuestionnaireResponseStatus.php | 64 +- .../FHIRElement/FHIRQuestionnaireStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRRange.php | 81 +- .../DSTU2/FHIRElement/FHIRRatio.php | 81 +- .../DSTU2/FHIRElement/FHIRReference.php | 81 +- .../DSTU2/FHIRElement/FHIRReferralStatus.php | 64 +- .../FHIRElement/FHIRRemittanceOutcome.php | 64 +- .../FHIRElement/FHIRResourceVersionPolicy.php | 64 +- .../DSTU2/FHIRElement/FHIRResponseType.php | 64 +- .../FHIRRestfulConformanceMode.php | 64 +- .../DSTU2/FHIRElement/FHIRSampledData.php | 166 +- .../FHIRElement/FHIRSampledDataDataType.php | 64 +- .../DSTU2/FHIRElement/FHIRSearchEntryMode.php | 64 +- .../FHIRElement/FHIRSearchModifierCode.php | 64 +- .../DSTU2/FHIRElement/FHIRSearchParamType.php | 64 +- .../DSTU2/FHIRElement/FHIRSignature.php | 151 +- .../DSTU2/FHIRElement/FHIRSlicingRules.php | 64 +- .../DSTU2/FHIRElement/FHIRSlotStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRSpecimenStatus.php | 64 +- .../DSTU2/FHIRElement/FHIRString.php | 64 +- .../FHIRStructureDefinitionKind.php | 64 +- .../FHIRSubscriptionChannelType.php | 64 +- .../FHIRElement/FHIRSubscriptionStatus.php | 64 +- .../FHIRElement/FHIRSupplyDeliveryStatus.php | 64 +- .../FHIRElement/FHIRSupplyRequestStatus.php | 64 +- .../FHIRSystemRestfulInteraction.php | 64 +- .../DSTU2/FHIRElement/FHIRTime.php | 64 +- .../DSTU2/FHIRElement/FHIRTiming.php | 100 +- .../FHIRTiming/FHIRTimingRepeat.php | 268 +- .../DSTU2/FHIRElement/FHIRTransactionMode.php | 64 +- .../FHIRTypeRestfulInteraction.php | 64 +- .../DSTU2/FHIRElement/FHIRUnitsOfTime.php | 64 +- .../FHIRElement/FHIRUnknownContentCode.php | 64 +- .../DSTU2/FHIRElement/FHIRUnsignedInt.php | 64 +- .../DSTU2/FHIRElement/FHIRUri.php | 64 +- .../DSTU2/FHIRElement/FHIRUse.php | 64 +- .../DSTU2/FHIRElement/FHIRUuid.php | 64 +- .../DSTU2/FHIRElement/FHIRVisionBase.php | 64 +- .../DSTU2/FHIRElement/FHIRVisionEyes.php | 64 +- .../DSTU2/FHIRElement/FHIRXPathUsageType.php | 64 +- .../DSTU2/FHIRIdPrimitive.php | 34 +- .../DSTU2/FHIRInstantPrimitive.php | 36 +- .../DSTU2/FHIRIntegerPrimitive.php | 34 +- .../DSTU2/FHIRMarkdownPrimitive.php | 34 +- .../DSTU2/FHIROidPrimitive.php | 34 +- .../DSTU2/FHIRPositiveIntPrimitive.php | 34 +- .../PHPFHIRGenerated/DSTU2/FHIRResource.php | 42 +- .../DSTU2/FHIRResource/FHIRBinary.php | 105 +- .../DSTU2/FHIRResource/FHIRBundle.php | 160 +- .../DSTU2/FHIRResource/FHIRDomainResource.php | 145 +- .../FHIRDomainResource/FHIRAccount.php | 308 +- .../FHIRAllergyIntolerance.php | 361 +- .../FHIRDomainResource/FHIRAppointment.php | 329 +- .../FHIRAppointmentResponse.php | 259 +- .../FHIRDomainResource/FHIRAuditEvent.php | 191 +- .../FHIRDomainResource/FHIRBasic.php | 206 +- .../FHIRDomainResource/FHIRBodySite.php | 227 +- .../FHIRDomainResource/FHIRCarePlan.php | 409 +- .../FHIRDomainResource/FHIRClaim.php | 630 ++- .../FHIRDomainResource/FHIRClaimResponse.php | 573 ++- .../FHIRClinicalImpression.php | 439 +- .../FHIRDomainResource/FHIRCommunication.php | 350 +- .../FHIRCommunicationRequest.php | 384 +- .../FHIRDomainResource/FHIRComposition.php | 365 +- .../FHIRDomainResource/FHIRConceptMap.php | 431 +- .../FHIRDomainResource/FHIRCondition.php | 550 ++- .../FHIRDomainResource/FHIRConformance.php | 488 +- .../FHIRDomainResource/FHIRContract.php | 468 +- .../FHIRDomainResource/FHIRCoverage.php | 361 +- .../FHIRDomainResource/FHIRDataElement.php | 367 +- .../FHIRDomainResource/FHIRDetectedIssue.php | 293 +- .../FHIRDomainResource/FHIRDevice.php | 397 +- .../FHIRDeviceComponent.php | 293 +- .../FHIRDomainResource/FHIRDeviceMetric.php | 291 +- .../FHIRDeviceUseRequest.php | 399 +- .../FHIRDeviceUseStatement.php | 329 +- .../FHIRDiagnosticOrder.php | 337 +- .../FHIRDiagnosticReport.php | 441 +- .../FHIRDocumentManifest.php | 333 +- .../FHIRDocumentReference.php | 418 +- .../FHIREligibilityRequest.php | 240 +- .../FHIREligibilityResponse.php | 291 +- .../FHIRDomainResource/FHIREncounter.php | 460 +- .../FHIREnrollmentRequest.php | 291 +- .../FHIREnrollmentResponse.php | 291 +- .../FHIRDomainResource/FHIREpisodeOfCare.php | 318 +- .../FHIRExplanationOfBenefit.php | 291 +- .../FHIRFamilyMemberHistory.php | 463 +- .../FHIRDomainResource/FHIRFlag.php | 257 +- .../FHIRDomainResource/FHIRGoal.php | 401 +- .../FHIRDomainResource/FHIRGroup.php | 261 +- .../FHIRHealthcareService.php | 513 ++- .../FHIRImagingObjectSelection.php | 240 +- .../FHIRDomainResource/FHIRImagingStudy.php | 401 +- .../FHIRDomainResource/FHIRImmunization.php | 484 +- .../FHIRImmunizationRecommendation.php | 174 +- .../FHIRImplementationGuide.php | 420 +- .../FHIRDomainResource/FHIRList.php | 344 +- .../FHIRDomainResource/FHIRLocation.php | 327 +- .../FHIRDomainResource/FHIRMedia.php | 325 +- .../FHIRDomainResource/FHIRMedication.php | 204 +- .../FHIRMedicationAdministration.php | 399 +- .../FHIRMedicationDispense.php | 414 +- .../FHIRMedicationOrder.php | 412 +- .../FHIRMedicationStatement.php | 399 +- .../FHIRDomainResource/FHIRMessageHeader.php | 310 +- .../FHIRDomainResource/FHIRNamingSystem.php | 346 +- .../FHIRDomainResource/FHIRNutritionOrder.php | 333 +- .../FHIRDomainResource/FHIRObservation.php | 639 ++- .../FHIROperationDefinition.php | 448 +- .../FHIROperationOutcome.php | 138 +- .../FHIRDomainResource/FHIROrder.php | 276 +- .../FHIRDomainResource/FHIROrderResponse.php | 242 +- .../FHIRDomainResource/FHIROrganization.php | 263 +- .../FHIRDomainResource/FHIRPatient.php | 460 +- .../FHIRDomainResource/FHIRPaymentNotice.php | 291 +- .../FHIRPaymentReconciliation.php | 380 +- .../FHIRDomainResource/FHIRPerson.php | 299 +- .../FHIRDomainResource/FHIRPractitioner.php | 320 +- .../FHIRDomainResource/FHIRProcedure.php | 530 ++- .../FHIRProcedureRequest.php | 431 +- .../FHIRDomainResource/FHIRProcessRequest.php | 399 +- .../FHIRProcessResponse.php | 346 +- .../FHIRDomainResource/FHIRProvenance.php | 301 +- .../FHIRDomainResource/FHIRQuestionnaire.php | 261 +- .../FHIRQuestionnaireResponse.php | 272 +- .../FHIRReferralRequest.php | 399 +- .../FHIRDomainResource/FHIRRelatedPerson.php | 297 +- .../FHIRDomainResource/FHIRRiskAssessment.php | 293 +- .../FHIRDomainResource/FHIRSchedule.php | 208 +- .../FHIRSearchParameter.php | 378 +- .../FHIRDomainResource/FHIRSlot.php | 257 +- .../FHIRDomainResource/FHIRSpecimen.php | 297 +- .../FHIRStructureDefinition.php | 556 ++- .../FHIRDomainResource/FHIRSubscription.php | 259 +- .../FHIRDomainResource/FHIRSubstance.php | 229 +- .../FHIRDomainResource/FHIRSupplyDelivery.php | 308 +- .../FHIRDomainResource/FHIRSupplyRequest.php | 308 +- .../FHIRDomainResource/FHIRTestScript.php | 488 +- .../FHIRDomainResource/FHIRValueSet.php | 446 +- .../FHIRVisionPrescription.php | 259 +- .../DSTU2/FHIRResource/FHIRParameters.php | 90 +- .../DSTU2/FHIRResourceContainer.php | 492 +- .../FHIRSampledDataDataTypePrimitive.php | 34 +- .../DSTU2/FHIRStringPrimitive.php | 34 +- .../FHIRAccountStatusList.php | 35 +- .../FHIRActionListList.php | 35 +- .../FHIRAddressTypeList.php | 35 +- .../FHIRAddressUseList.php | 35 +- .../FHIRAdministrativeGenderList.php | 35 +- .../FHIRAggregationModeList.php | 35 +- .../FHIRAllergyIntoleranceCategoryList.php | 35 +- .../FHIRAllergyIntoleranceCertaintyList.php | 35 +- .../FHIRAllergyIntoleranceCriticalityList.php | 35 +- .../FHIRAllergyIntoleranceSeverityList.php | 35 +- .../FHIRAllergyIntoleranceStatusList.php | 35 +- .../FHIRAllergyIntoleranceTypeList.php | 35 +- .../FHIRAnswerFormatList.php | 35 +- .../FHIRAppointmentStatusList.php | 35 +- .../FHIRAssertionDirectionTypeList.php | 35 +- .../FHIRAssertionOperatorTypeList.php | 35 +- .../FHIRAssertionResponseTypesList.php | 35 +- .../FHIRAuditEventActionList.php | 35 +- .../FHIRAuditEventOutcomeList.php | 35 +- ...IRAuditEventParticipantNetworkTypeList.php | 35 +- .../FHIRBindingStrengthList.php | 35 +- .../FHIRBundleTypeList.php | 35 +- .../FHIRCarePlanActivityStatusList.php | 35 +- .../FHIRCarePlanRelationshipList.php | 35 +- .../FHIRCarePlanStatusList.php | 35 +- .../FHIRStringPrimitive/FHIRClaimTypeList.php | 35 +- .../FHIRClinicalImpressionStatusList.php | 35 +- .../FHIRCommunicationRequestStatusList.php | 35 +- .../FHIRCommunicationStatusList.php | 35 +- .../FHIRCompositionAttestationModeList.php | 35 +- .../FHIRCompositionStatusList.php | 35 +- .../FHIRConceptMapEquivalenceList.php | 35 +- .../FHIRConditionVerificationStatusList.php | 35 +- .../FHIRConditionalDeleteStatusList.php | 35 +- .../FHIRConformanceEventModeList.php | 35 +- .../FHIRConformanceResourceStatusList.php | 35 +- .../FHIRConformanceStatementKindList.php | 35 +- .../FHIRConstraintSeverityList.php | 35 +- .../FHIRContactPointSystemList.php | 35 +- .../FHIRContactPointUseList.php | 35 +- .../FHIRContentTypeList.php | 35 +- .../FHIRDataElementStringencyList.php | 35 +- .../FHIRDaysOfWeekList.php | 35 +- .../FHIRDetectedIssueSeverityList.php | 35 +- .../FHIRDeviceMetricCalibrationStateList.php | 35 +- .../FHIRDeviceMetricCalibrationTypeList.php | 35 +- .../FHIRDeviceMetricCategoryList.php | 35 +- .../FHIRDeviceMetricColorList.php | 35 +- .../FHIRDeviceMetricOperationalStatusList.php | 35 +- .../FHIRDeviceStatusList.php | 35 +- .../FHIRDeviceUseRequestPriorityList.php | 35 +- .../FHIRDeviceUseRequestStatusList.php | 35 +- .../FHIRDiagnosticOrderPriorityList.php | 35 +- .../FHIRDiagnosticOrderStatusList.php | 35 +- .../FHIRDiagnosticReportStatusList.php | 35 +- .../FHIRDigitalMediaTypeList.php | 35 +- .../FHIRDocumentModeList.php | 35 +- .../FHIRDocumentReferenceStatusList.php | 35 +- .../FHIRDocumentRelationshipTypeList.php | 35 +- .../FHIREncounterClassList.php | 35 +- .../FHIREncounterLocationStatusList.php | 35 +- .../FHIREncounterStateList.php | 35 +- .../FHIREpisodeOfCareStatusList.php | 35 +- .../FHIREventTimingList.php | 35 +- .../FHIRExtensionContextList.php | 35 +- .../FHIRFamilyHistoryStatusList.php | 35 +- .../FHIRFilterOperatorList.php | 35 +- .../FHIRFlagStatusList.php | 35 +- .../FHIRGoalStatusList.php | 35 +- .../FHIRStringPrimitive/FHIRGroupTypeList.php | 35 +- .../FHIRGuideDependencyTypeList.php | 35 +- .../FHIRGuidePageKindList.php | 35 +- .../FHIRGuideResourcePurposeList.php | 35 +- .../FHIRStringPrimitive/FHIRHTTPVerbList.php | 35 +- .../FHIRIdentifierUseList.php | 35 +- .../FHIRIdentityAssuranceLevelList.php | 35 +- .../FHIRInstanceAvailabilityList.php | 35 +- .../FHIRIssueSeverityList.php | 35 +- .../FHIRStringPrimitive/FHIRIssueTypeList.php | 35 +- .../FHIRStringPrimitive/FHIRLinkTypeList.php | 35 +- .../FHIRStringPrimitive/FHIRListModeList.php | 35 +- .../FHIRListStatusList.php | 35 +- .../FHIRLocationModeList.php | 35 +- .../FHIRLocationStatusList.php | 35 +- .../FHIRMeasmnt_PrincipleList.php | 35 +- ...FHIRMedicationAdministrationStatusList.php | 35 +- .../FHIRMedicationDispenseStatusList.php | 35 +- .../FHIRMedicationOrderStatusList.php | 35 +- .../FHIRMedicationStatementStatusList.php | 35 +- .../FHIRMessageSignificanceCategoryList.php | 35 +- .../FHIRStringPrimitive/FHIRNameUseList.php | 35 +- .../FHIRNamingSystemIdentifierTypeList.php | 35 +- .../FHIRNamingSystemTypeList.php | 35 +- .../FHIRNarrativeStatusList.php | 35 +- .../FHIRStringPrimitive/FHIRNoteTypeList.php | 35 +- .../FHIRNutritionOrderStatusList.php | 35 +- .../FHIRObservationRelationshipTypeList.php | 35 +- .../FHIRObservationStatusList.php | 35 +- .../FHIROperationKindList.php | 35 +- .../FHIROperationParameterUseList.php | 35 +- .../FHIROrderStatusList.php | 35 +- .../FHIRParticipantRequiredList.php | 35 +- .../FHIRParticipantStatusList.php | 35 +- .../FHIRParticipationStatusList.php | 35 +- .../FHIRProcedureRequestPriorityList.php | 35 +- .../FHIRProcedureRequestStatusList.php | 35 +- .../FHIRProcedureStatusList.php | 35 +- .../FHIRPropertyRepresentationList.php | 35 +- .../FHIRProvenanceEntityRoleList.php | 35 +- .../FHIRQuantityComparatorList.php | 35 +- .../FHIRQuestionnaireResponseStatusList.php | 35 +- .../FHIRQuestionnaireStatusList.php | 35 +- .../FHIRReferralStatusList.php | 35 +- .../FHIRRemittanceOutcomeList.php | 35 +- .../FHIRResourceVersionPolicyList.php | 35 +- .../FHIRResponseTypeList.php | 35 +- .../FHIRRestfulConformanceModeList.php | 35 +- .../FHIRSearchEntryModeList.php | 35 +- .../FHIRSearchModifierCodeList.php | 35 +- .../FHIRSearchParamTypeList.php | 35 +- .../FHIRSlicingRulesList.php | 35 +- .../FHIRSlotStatusList.php | 35 +- .../FHIRSpecimenStatusList.php | 35 +- .../FHIRStructureDefinitionKindList.php | 35 +- .../FHIRSubscriptionChannelTypeList.php | 35 +- .../FHIRSubscriptionStatusList.php | 35 +- .../FHIRSupplyDeliveryStatusList.php | 35 +- .../FHIRSupplyRequestStatusList.php | 35 +- .../FHIRSystemRestfulInteractionList.php | 35 +- .../FHIRTransactionModeList.php | 35 +- .../FHIRTypeRestfulInteractionList.php | 35 +- .../FHIRUnitsOfTimeList.php | 35 +- .../FHIRUnknownContentCodeList.php | 35 +- .../DSTU2/FHIRStringPrimitive/FHIRUseList.php | 35 +- .../FHIRVisionBaseList.php | 35 +- .../FHIRVisionEyesList.php | 35 +- .../FHIRXPathUsageTypeList.php | 35 +- .../DSTU2/FHIRTimePrimitive.php | 36 +- .../DSTU2/FHIRUnsignedIntPrimitive.php | 34 +- .../DSTU2/FHIRUriPrimitive.php | 34 +- .../DSTU2/FHIRUuidPrimitive.php | 34 +- .../DSTU2/PHPFHIRAutoloader.php | 5 +- .../PHPFHIRCommentContainerInterface.php | 2 +- .../DSTU2/PHPFHIRCommentContainerTrait.php | 2 +- .../DSTU2/PHPFHIRConstants.php | 6 +- .../DSTU2/PHPFHIRContainedTypeInterface.php | 2 +- .../DSTU2/PHPFHIRResponseParser.php | 2 +- .../DSTU2/PHPFHIRResponseParserConfig.php | 2 +- .../FHIRBase64BinaryPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRBooleanPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRCodePrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRDatePrimitiveTest.php | 2 +- .../FHIRDateTimePrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRDecimalPrimitiveTest.php | 2 +- .../FHIRElement/FHIRAccountStatusTest.php | 2 +- .../FHIRElement/FHIRActionListTest.php | 2 +- .../FHIRElement/FHIRAddressTest.php | 2 +- .../FHIRElement/FHIRAddressTypeTest.php | 2 +- .../FHIRElement/FHIRAddressUseTest.php | 2 +- .../FHIRAdministrativeGenderTest.php | 2 +- .../FHIRElement/FHIRAggregationModeTest.php | 2 +- .../FHIRAllergyIntoleranceCategoryTest.php | 2 +- .../FHIRAllergyIntoleranceCertaintyTest.php | 2 +- .../FHIRAllergyIntoleranceCriticalityTest.php | 2 +- .../FHIRAllergyIntoleranceSeverityTest.php | 2 +- .../FHIRAllergyIntoleranceStatusTest.php | 2 +- .../FHIRAllergyIntoleranceTypeTest.php | 2 +- .../FHIRElement/FHIRAnnotationTest.php | 2 +- .../FHIRElement/FHIRAnswerFormatTest.php | 2 +- .../FHIRElement/FHIRAppointmentStatusTest.php | 2 +- .../FHIRAssertionDirectionTypeTest.php | 2 +- .../FHIRAssertionOperatorTypeTest.php | 2 +- .../FHIRAssertionResponseTypesTest.php | 2 +- .../FHIRElement/FHIRAttachmentTest.php | 2 +- .../FHIRElement/FHIRAuditEventActionTest.php | 2 +- .../FHIRElement/FHIRAuditEventOutcomeTest.php | 2 +- ...IRAuditEventParticipantNetworkTypeTest.php | 2 +- .../FHIRAllergyIntoleranceReactionTest.php | 2 +- .../FHIRAppointmentParticipantTest.php | 2 +- .../FHIRAuditEventDetailTest.php | 2 +- .../FHIRAuditEventEventTest.php | 2 +- .../FHIRAuditEventNetworkTest.php | 2 +- .../FHIRAuditEventObjectTest.php | 2 +- .../FHIRAuditEventParticipantTest.php | 2 +- .../FHIRAuditEventSourceTest.php | 2 +- .../FHIRBundle/FHIRBundleEntryTest.php | 2 +- .../FHIRBundle/FHIRBundleLinkTest.php | 2 +- .../FHIRBundle/FHIRBundleRequestTest.php | 2 +- .../FHIRBundle/FHIRBundleResponseTest.php | 2 +- .../FHIRBundle/FHIRBundleSearchTest.php | 2 +- .../FHIRCarePlan/FHIRCarePlanActivityTest.php | 2 +- .../FHIRCarePlan/FHIRCarePlanDetailTest.php | 2 +- .../FHIRCarePlanParticipantTest.php | 2 +- .../FHIRCarePlanRelatedPlanTest.php | 2 +- .../FHIRClaim/FHIRClaimCoverageTest.php | 2 +- .../FHIRClaim/FHIRClaimDetailTest.php | 2 +- .../FHIRClaim/FHIRClaimDiagnosisTest.php | 2 +- .../FHIRClaim/FHIRClaimItemTest.php | 2 +- .../FHIRClaim/FHIRClaimMissingTeethTest.php | 2 +- .../FHIRClaim/FHIRClaimPayeeTest.php | 2 +- .../FHIRClaim/FHIRClaimProsthesisTest.php | 2 +- .../FHIRClaim/FHIRClaimSubDetailTest.php | 2 +- .../FHIRClaimResponseAddItemTest.php | 2 +- .../FHIRClaimResponseAdjudication1Test.php | 2 +- .../FHIRClaimResponseAdjudication2Test.php | 2 +- .../FHIRClaimResponseAdjudication3Test.php | 2 +- .../FHIRClaimResponseAdjudication4Test.php | 2 +- .../FHIRClaimResponseAdjudicationTest.php | 2 +- .../FHIRClaimResponseCoverageTest.php | 2 +- .../FHIRClaimResponseDetail1Test.php | 2 +- .../FHIRClaimResponseDetailTest.php | 2 +- .../FHIRClaimResponseErrorTest.php | 2 +- .../FHIRClaimResponseItemTest.php | 2 +- .../FHIRClaimResponseNoteTest.php | 2 +- .../FHIRClaimResponseSubDetailTest.php | 2 +- .../FHIRClinicalImpressionFindingTest.php | 2 +- ...IRClinicalImpressionInvestigationsTest.php | 2 +- .../FHIRClinicalImpressionRuledOutTest.php | 2 +- .../FHIRCommunicationPayloadTest.php | 2 +- .../FHIRCommunicationRequestPayloadTest.php | 2 +- .../FHIRCompositionAttesterTest.php | 2 +- .../FHIRCompositionEventTest.php | 2 +- .../FHIRCompositionSectionTest.php | 2 +- .../FHIRConceptMapContactTest.php | 2 +- .../FHIRConceptMapDependsOnTest.php | 2 +- .../FHIRConceptMapElementTest.php | 2 +- .../FHIRConceptMapTargetTest.php | 2 +- .../FHIRConditionEvidenceTest.php | 2 +- .../FHIRCondition/FHIRConditionStageTest.php | 2 +- .../FHIRConformanceCertificateTest.php | 2 +- .../FHIRConformanceContactTest.php | 2 +- .../FHIRConformanceDocumentTest.php | 2 +- .../FHIRConformanceEndpointTest.php | 2 +- .../FHIRConformanceEventTest.php | 2 +- .../FHIRConformanceImplementationTest.php | 2 +- .../FHIRConformanceInteraction1Test.php | 2 +- .../FHIRConformanceInteractionTest.php | 2 +- .../FHIRConformanceMessagingTest.php | 2 +- .../FHIRConformanceOperationTest.php | 2 +- .../FHIRConformanceResourceTest.php | 2 +- .../FHIRConformanceRestTest.php | 2 +- .../FHIRConformanceSearchParamTest.php | 2 +- .../FHIRConformanceSecurityTest.php | 2 +- .../FHIRConformanceSoftwareTest.php | 2 +- .../FHIRContract/FHIRContractActor1Test.php | 2 +- .../FHIRContract/FHIRContractActorTest.php | 2 +- .../FHIRContract/FHIRContractFriendlyTest.php | 2 +- .../FHIRContract/FHIRContractLegalTest.php | 2 +- .../FHIRContract/FHIRContractRuleTest.php | 2 +- .../FHIRContract/FHIRContractSignerTest.php | 2 +- .../FHIRContract/FHIRContractTermTest.php | 2 +- .../FHIRContractValuedItem1Test.php | 2 +- .../FHIRContractValuedItemTest.php | 2 +- .../FHIRDataElementContactTest.php | 2 +- .../FHIRDataElementMappingTest.php | 2 +- .../FHIRDetectedIssueMitigationTest.php | 2 +- ...ceComponentProductionSpecificationTest.php | 2 +- .../FHIRDeviceMetricCalibrationTest.php | 2 +- .../FHIRDiagnosticOrderEventTest.php | 2 +- .../FHIRDiagnosticOrderItemTest.php | 2 +- .../FHIRDiagnosticReportImageTest.php | 2 +- .../FHIRDocumentManifestContentTest.php | 2 +- .../FHIRDocumentManifestRelatedTest.php | 2 +- .../FHIRDocumentReferenceContentTest.php | 2 +- .../FHIRDocumentReferenceContextTest.php | 2 +- .../FHIRDocumentReferenceRelatedTest.php | 2 +- .../FHIRDocumentReferenceRelatesToTest.php | 2 +- .../FHIREncounterHospitalizationTest.php | 2 +- .../FHIREncounterLocationTest.php | 2 +- .../FHIREncounterParticipantTest.php | 2 +- .../FHIREncounterStatusHistoryTest.php | 2 +- .../FHIREpisodeOfCareCareTeamTest.php | 2 +- .../FHIREpisodeOfCareStatusHistoryTest.php | 2 +- .../FHIRFamilyMemberHistoryConditionTest.php | 2 +- .../FHIRGoal/FHIRGoalOutcomeTest.php | 2 +- .../FHIRGroup/FHIRGroupCharacteristicTest.php | 2 +- .../FHIRGroup/FHIRGroupMemberTest.php | 2 +- ...FHIRHealthcareServiceAvailableTimeTest.php | 2 +- .../FHIRHealthcareServiceNotAvailableTest.php | 2 +- .../FHIRHealthcareServiceServiceTypeTest.php | 2 +- .../FHIRImagingObjectSelectionFramesTest.php | 2 +- ...FHIRImagingObjectSelectionInstanceTest.php | 2 +- .../FHIRImagingObjectSelectionSeriesTest.php | 2 +- .../FHIRImagingObjectSelectionStudyTest.php | 2 +- .../FHIRImagingStudyInstanceTest.php | 2 +- .../FHIRImagingStudySeriesTest.php | 2 +- .../FHIRImmunizationExplanationTest.php | 2 +- .../FHIRImmunizationReactionTest.php | 2 +- ...HIRImmunizationVaccinationProtocolTest.php | 2 +- ...izationRecommendationDateCriterionTest.php | 2 +- ...ImmunizationRecommendationProtocolTest.php | 2 +- ...zationRecommendationRecommendationTest.php | 2 +- .../FHIRImplementationGuideContactTest.php | 2 +- .../FHIRImplementationGuideDependencyTest.php | 2 +- .../FHIRImplementationGuideGlobalTest.php | 2 +- .../FHIRImplementationGuidePackageTest.php | 2 +- .../FHIRImplementationGuidePageTest.php | 2 +- .../FHIRImplementationGuideResourceTest.php | 2 +- .../FHIRList/FHIRListEntryTest.php | 2 +- .../FHIRLocation/FHIRLocationPositionTest.php | 2 +- .../FHIRMedicationBatchTest.php | 2 +- .../FHIRMedicationContentTest.php | 2 +- .../FHIRMedicationIngredientTest.php | 2 +- .../FHIRMedicationPackageTest.php | 2 +- .../FHIRMedicationProductTest.php | 2 +- ...FHIRMedicationAdministrationDosageTest.php | 2 +- ...edicationDispenseDosageInstructionTest.php | 2 +- ...FHIRMedicationDispenseSubstitutionTest.php | 2 +- ...FHIRMedicationOrderDispenseRequestTest.php | 2 +- ...IRMedicationOrderDosageInstructionTest.php | 2 +- .../FHIRMedicationOrderSubstitutionTest.php | 2 +- .../FHIRMedicationStatementDosageTest.php | 2 +- .../FHIRMessageHeaderDestinationTest.php | 2 +- .../FHIRMessageHeaderResponseTest.php | 2 +- .../FHIRMessageHeaderSourceTest.php | 2 +- .../FHIRNamingSystemContactTest.php | 2 +- .../FHIRNamingSystemUniqueIdTest.php | 2 +- .../FHIRNutritionOrderAdministrationTest.php | 2 +- .../FHIRNutritionOrderEnteralFormulaTest.php | 2 +- .../FHIRNutritionOrderNutrientTest.php | 2 +- .../FHIRNutritionOrderOralDietTest.php | 2 +- .../FHIRNutritionOrderSupplementTest.php | 2 +- .../FHIRNutritionOrderTextureTest.php | 2 +- .../FHIRObservationComponentTest.php | 2 +- .../FHIRObservationReferenceRangeTest.php | 2 +- .../FHIRObservationRelatedTest.php | 2 +- .../FHIROperationDefinitionBindingTest.php | 2 +- .../FHIROperationDefinitionContactTest.php | 2 +- .../FHIROperationDefinitionParameterTest.php | 2 +- .../FHIROperationOutcomeIssueTest.php | 2 +- .../FHIROrder/FHIROrderWhenTest.php | 2 +- .../FHIROrganizationContactTest.php | 2 +- .../FHIRParametersParameterTest.php | 2 +- .../FHIRPatient/FHIRPatientAnimalTest.php | 2 +- .../FHIRPatientCommunicationTest.php | 2 +- .../FHIRPatient/FHIRPatientContactTest.php | 2 +- .../FHIRPatient/FHIRPatientLinkTest.php | 2 +- .../FHIRPaymentReconciliationDetailTest.php | 2 +- .../FHIRPaymentReconciliationNoteTest.php | 2 +- .../FHIRPerson/FHIRPersonLinkTest.php | 2 +- .../FHIRPractitionerPractitionerRoleTest.php | 2 +- .../FHIRPractitionerQualificationTest.php | 2 +- .../FHIRProcedureFocalDeviceTest.php | 2 +- .../FHIRProcedurePerformerTest.php | 2 +- .../FHIRProcessRequestItemTest.php | 2 +- .../FHIRProcessResponseNotesTest.php | 2 +- .../FHIRProvenanceAgentTest.php | 2 +- .../FHIRProvenanceEntityTest.php | 2 +- .../FHIRProvenanceRelatedAgentTest.php | 2 +- .../FHIRQuestionnaireGroupTest.php | 2 +- .../FHIRQuestionnaireQuestionTest.php | 2 +- .../FHIRQuestionnaireResponseAnswerTest.php | 2 +- .../FHIRQuestionnaireResponseGroupTest.php | 2 +- .../FHIRQuestionnaireResponseQuestionTest.php | 2 +- .../FHIRRiskAssessmentPredictionTest.php | 2 +- .../FHIRSearchParameterContactTest.php | 2 +- .../FHIRSpecimenCollectionTest.php | 2 +- .../FHIRSpecimenContainerTest.php | 2 +- .../FHIRSpecimenTreatmentTest.php | 2 +- .../FHIRStructureDefinitionContactTest.php | 2 +- ...HIRStructureDefinitionDifferentialTest.php | 2 +- .../FHIRStructureDefinitionMappingTest.php | 2 +- .../FHIRStructureDefinitionSnapshotTest.php | 2 +- .../FHIRSubscriptionChannelTest.php | 2 +- .../FHIRSubstanceIngredientTest.php | 2 +- .../FHIRSubstanceInstanceTest.php | 2 +- .../FHIRSupplyRequestWhenTest.php | 2 +- .../FHIRTestScriptAction1Test.php | 2 +- .../FHIRTestScriptAction2Test.php | 2 +- .../FHIRTestScriptActionTest.php | 2 +- .../FHIRTestScriptAssertTest.php | 2 +- .../FHIRTestScriptCapabilityTest.php | 2 +- .../FHIRTestScriptContactTest.php | 2 +- .../FHIRTestScriptFixtureTest.php | 2 +- .../FHIRTestScript/FHIRTestScriptLinkTest.php | 2 +- .../FHIRTestScriptMetadataTest.php | 2 +- .../FHIRTestScriptOperationTest.php | 2 +- .../FHIRTestScriptRequestHeaderTest.php | 2 +- .../FHIRTestScriptSetupTest.php | 2 +- .../FHIRTestScriptTeardownTest.php | 2 +- .../FHIRTestScript/FHIRTestScriptTestTest.php | 2 +- .../FHIRTestScriptVariableTest.php | 2 +- .../FHIRValueSetCodeSystemTest.php | 2 +- .../FHIRValueSet/FHIRValueSetComposeTest.php | 2 +- .../FHIRValueSet/FHIRValueSetConcept1Test.php | 2 +- .../FHIRValueSet/FHIRValueSetConceptTest.php | 2 +- .../FHIRValueSet/FHIRValueSetContactTest.php | 2 +- .../FHIRValueSet/FHIRValueSetContainsTest.php | 2 +- .../FHIRValueSetDesignationTest.php | 2 +- .../FHIRValueSetExpansionTest.php | 2 +- .../FHIRValueSet/FHIRValueSetFilterTest.php | 2 +- .../FHIRValueSet/FHIRValueSetIncludeTest.php | 2 +- .../FHIRValueSetParameterTest.php | 2 +- .../FHIRVisionPrescriptionDispenseTest.php | 2 +- .../FHIRElement/FHIRBackboneElementTest.php | 2 +- .../FHIRElement/FHIRBase64BinaryTest.php | 2 +- .../FHIRElement/FHIRBindingStrengthTest.php | 2 +- .../FHIRElement/FHIRBooleanTest.php | 2 +- .../FHIRElement/FHIRBundleTypeTest.php | 2 +- .../FHIRCarePlanActivityStatusTest.php | 2 +- .../FHIRCarePlanRelationshipTest.php | 2 +- .../FHIRElement/FHIRCarePlanStatusTest.php | 2 +- .../FHIRElement/FHIRClaimTypeTest.php | 2 +- .../FHIRClinicalImpressionStatusTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRCodeTest.php | 2 +- .../FHIRElement/FHIRCodeableConceptTest.php | 2 +- .../FHIRElement/FHIRCodingTest.php | 2 +- .../FHIRCommunicationRequestStatusTest.php | 2 +- .../FHIRCommunicationStatusTest.php | 2 +- .../FHIRCompositionAttestationModeTest.php | 2 +- .../FHIRElement/FHIRCompositionStatusTest.php | 2 +- .../FHIRConceptMapEquivalenceTest.php | 2 +- .../FHIRConditionVerificationStatusTest.php | 2 +- .../FHIRConditionalDeleteStatusTest.php | 2 +- .../FHIRConformanceEventModeTest.php | 2 +- .../FHIRConformanceResourceStatusTest.php | 2 +- .../FHIRConformanceStatementKindTest.php | 2 +- .../FHIRConstraintSeverityTest.php | 2 +- .../FHIRContactPointSystemTest.php | 2 +- .../FHIRElement/FHIRContactPointTest.php | 2 +- .../FHIRElement/FHIRContactPointUseTest.php | 2 +- .../FHIRElement/FHIRContentTypeTest.php | 2 +- .../FHIRDataElementStringencyTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRDateTest.php | 2 +- .../FHIRElement/FHIRDateTimeTest.php | 2 +- .../FHIRElement/FHIRDaysOfWeekTest.php | 2 +- .../FHIRElement/FHIRDecimalTest.php | 2 +- .../FHIRDetectedIssueSeverityTest.php | 2 +- .../FHIRDeviceMetricCalibrationStateTest.php | 2 +- .../FHIRDeviceMetricCalibrationTypeTest.php | 2 +- .../FHIRDeviceMetricCategoryTest.php | 2 +- .../FHIRElement/FHIRDeviceMetricColorTest.php | 2 +- .../FHIRDeviceMetricOperationalStatusTest.php | 2 +- .../FHIRElement/FHIRDeviceStatusTest.php | 2 +- .../FHIRDeviceUseRequestPriorityTest.php | 2 +- .../FHIRDeviceUseRequestStatusTest.php | 2 +- .../FHIRDiagnosticOrderPriorityTest.php | 2 +- .../FHIRDiagnosticOrderStatusTest.php | 2 +- .../FHIRDiagnosticReportStatusTest.php | 2 +- .../FHIRElement/FHIRDigitalMediaTypeTest.php | 2 +- .../FHIRElement/FHIRDocumentModeTest.php | 2 +- .../FHIRDocumentReferenceStatusTest.php | 2 +- .../FHIRDocumentRelationshipTypeTest.php | 2 +- .../FHIRElementDefinitionBaseTest.php | 2 +- .../FHIRElementDefinitionBindingTest.php | 2 +- .../FHIRElementDefinitionConstraintTest.php | 2 +- .../FHIRElementDefinitionMappingTest.php | 2 +- .../FHIRElementDefinitionSlicingTest.php | 2 +- .../FHIRElementDefinitionTypeTest.php | 2 +- .../FHIRElement/FHIRElementDefinitionTest.php | 2 +- .../FHIRElement/FHIREncounterClassTest.php | 2 +- .../FHIREncounterLocationStatusTest.php | 2 +- .../FHIRElement/FHIREncounterStateTest.php | 2 +- .../FHIREpisodeOfCareStatusTest.php | 2 +- .../FHIRElement/FHIREventTimingTest.php | 2 +- .../FHIRElement/FHIRExtensionContextTest.php | 2 +- .../FHIRElement/FHIRExtensionTest.php | 2 +- .../FHIRFamilyHistoryStatusTest.php | 2 +- .../FHIRElement/FHIRFilterOperatorTest.php | 2 +- .../FHIRElement/FHIRFlagStatusTest.php | 2 +- .../FHIRElement/FHIRGoalStatusTest.php | 2 +- .../FHIRElement/FHIRGroupTypeTest.php | 2 +- .../FHIRGuideDependencyTypeTest.php | 2 +- .../FHIRElement/FHIRGuidePageKindTest.php | 2 +- .../FHIRGuideResourcePurposeTest.php | 2 +- .../FHIRElement/FHIRHTTPVerbTest.php | 2 +- .../FHIRElement/FHIRHumanNameTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRIdTest.php | 2 +- .../FHIRElement/FHIRIdentifierTest.php | 2 +- .../FHIRElement/FHIRIdentifierUseTest.php | 2 +- .../FHIRIdentityAssuranceLevelTest.php | 2 +- .../FHIRInstanceAvailabilityTest.php | 2 +- .../FHIRElement/FHIRInstantTest.php | 2 +- .../FHIRElement/FHIRIntegerTest.php | 2 +- .../FHIRElement/FHIRIssueSeverityTest.php | 2 +- .../FHIRElement/FHIRIssueTypeTest.php | 2 +- .../FHIRElement/FHIRLinkTypeTest.php | 2 +- .../FHIRElement/FHIRListModeTest.php | 2 +- .../FHIRElement/FHIRListStatusTest.php | 2 +- .../FHIRElement/FHIRLocationModeTest.php | 2 +- .../FHIRElement/FHIRLocationStatusTest.php | 2 +- .../FHIRElement/FHIRMarkdownTest.php | 2 +- .../FHIRElement/FHIRMeasmnt_PrincipleTest.php | 2 +- ...FHIRMedicationAdministrationStatusTest.php | 2 +- .../FHIRMedicationDispenseStatusTest.php | 2 +- .../FHIRMedicationOrderStatusTest.php | 2 +- .../FHIRMedicationStatementStatusTest.php | 2 +- .../FHIRMessageSignificanceCategoryTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRMetaTest.php | 2 +- .../FHIRElement/FHIRNameUseTest.php | 2 +- .../FHIRNamingSystemIdentifierTypeTest.php | 2 +- .../FHIRElement/FHIRNamingSystemTypeTest.php | 2 +- .../FHIRElement/FHIRNarrativeStatusTest.php | 2 +- .../FHIRElement/FHIRNarrativeTest.php | 2 +- .../FHIRElement/FHIRNoteTypeTest.php | 2 +- .../FHIRNutritionOrderStatusTest.php | 2 +- .../FHIRObservationRelationshipTypeTest.php | 2 +- .../FHIRElement/FHIRObservationStatusTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIROidTest.php | 2 +- .../FHIRElement/FHIROperationKindTest.php | 2 +- .../FHIROperationParameterUseTest.php | 2 +- .../FHIRElement/FHIROrderStatusTest.php | 2 +- .../FHIRParticipantRequiredTest.php | 2 +- .../FHIRElement/FHIRParticipantStatusTest.php | 2 +- .../FHIRParticipationStatusTest.php | 2 +- .../FHIRElement/FHIRPeriodTest.php | 2 +- .../FHIRElement/FHIRPositiveIntTest.php | 2 +- .../FHIRProcedureRequestPriorityTest.php | 2 +- .../FHIRProcedureRequestStatusTest.php | 2 +- .../FHIRElement/FHIRProcedureStatusTest.php | 2 +- .../FHIRPropertyRepresentationTest.php | 2 +- .../FHIRProvenanceEntityRoleTest.php | 2 +- .../FHIRElement/FHIRQuantity/FHIRAgeTest.php | 2 +- .../FHIRQuantity/FHIRCountTest.php | 2 +- .../FHIRQuantity/FHIRDistanceTest.php | 2 +- .../FHIRQuantity/FHIRDurationTest.php | 2 +- .../FHIRQuantity/FHIRMoneyTest.php | 2 +- .../FHIRQuantity/FHIRSimpleQuantityTest.php | 2 +- .../FHIRQuantityComparatorTest.php | 2 +- .../FHIRElement/FHIRQuantityTest.php | 2 +- .../FHIRQuestionnaireResponseStatusTest.php | 2 +- .../FHIRQuestionnaireStatusTest.php | 2 +- .../FHIRElement/FHIRRangeTest.php | 2 +- .../FHIRElement/FHIRRatioTest.php | 2 +- .../FHIRElement/FHIRReferenceTest.php | 2 +- .../FHIRElement/FHIRReferralStatusTest.php | 2 +- .../FHIRElement/FHIRRemittanceOutcomeTest.php | 2 +- .../FHIRResourceVersionPolicyTest.php | 2 +- .../FHIRElement/FHIRResponseTypeTest.php | 2 +- .../FHIRRestfulConformanceModeTest.php | 2 +- .../FHIRSampledDataDataTypeTest.php | 2 +- .../FHIRElement/FHIRSampledDataTest.php | 2 +- .../FHIRElement/FHIRSearchEntryModeTest.php | 2 +- .../FHIRSearchModifierCodeTest.php | 2 +- .../FHIRElement/FHIRSearchParamTypeTest.php | 2 +- .../FHIRElement/FHIRSignatureTest.php | 2 +- .../FHIRElement/FHIRSlicingRulesTest.php | 2 +- .../FHIRElement/FHIRSlotStatusTest.php | 2 +- .../FHIRElement/FHIRSpecimenStatusTest.php | 2 +- .../FHIRElement/FHIRStringTest.php | 2 +- .../FHIRStructureDefinitionKindTest.php | 2 +- .../FHIRSubscriptionChannelTypeTest.php | 2 +- .../FHIRSubscriptionStatusTest.php | 2 +- .../FHIRSupplyDeliveryStatusTest.php | 2 +- .../FHIRSupplyRequestStatusTest.php | 2 +- .../FHIRSystemRestfulInteractionTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRTimeTest.php | 2 +- .../FHIRTiming/FHIRTimingRepeatTest.php | 2 +- .../FHIRElement/FHIRTimingTest.php | 2 +- .../FHIRElement/FHIRTransactionModeTest.php | 2 +- .../FHIRTypeRestfulInteractionTest.php | 2 +- .../FHIRElement/FHIRUnitsOfTimeTest.php | 2 +- .../FHIRUnknownContentCodeTest.php | 2 +- .../FHIRElement/FHIRUnsignedIntTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUriTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUseTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUuidTest.php | 2 +- .../FHIRElement/FHIRVisionBaseTest.php | 2 +- .../FHIRElement/FHIRVisionEyesTest.php | 2 +- .../FHIRElement/FHIRXPathUsageTypeTest.php | 2 +- .../DSTU2/PHPFHIRTests/FHIRElementTest.php | 2 +- .../PHPFHIRTests/FHIRIdPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRInstantPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRIntegerPrimitiveTest.php | 2 +- .../FHIRMarkdownPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIROidPrimitiveTest.php | 2 +- .../FHIRPositiveIntPrimitiveTest.php | 2 +- .../FHIRResource/FHIRBinaryTest.php | 2 +- .../FHIRResource/FHIRBundleTest.php | 2 +- .../FHIRDomainResource/FHIRAccountTest.php | 58 +- .../FHIRAllergyIntoleranceTest.php | 58 +- .../FHIRAppointmentResponseTest.php | 58 +- .../FHIRAppointmentTest.php | 58 +- .../FHIRDomainResource/FHIRAuditEventTest.php | 58 +- .../FHIRDomainResource/FHIRBasicTest.php | 58 +- .../FHIRDomainResource/FHIRBodySiteTest.php | 58 +- .../FHIRDomainResource/FHIRCarePlanTest.php | 58 +- .../FHIRClaimResponseTest.php | 58 +- .../FHIRDomainResource/FHIRClaimTest.php | 58 +- .../FHIRClinicalImpressionTest.php | 58 +- .../FHIRCommunicationRequestTest.php | 58 +- .../FHIRCommunicationTest.php | 58 +- .../FHIRCompositionTest.php | 58 +- .../FHIRDomainResource/FHIRConceptMapTest.php | 58 +- .../FHIRDomainResource/FHIRConditionTest.php | 58 +- .../FHIRConformanceTest.php | 58 +- .../FHIRDomainResource/FHIRContractTest.php | 58 +- .../FHIRDomainResource/FHIRCoverageTest.php | 58 +- .../FHIRDataElementTest.php | 58 +- .../FHIRDetectedIssueTest.php | 58 +- .../FHIRDeviceComponentTest.php | 58 +- .../FHIRDeviceMetricTest.php | 58 +- .../FHIRDomainResource/FHIRDeviceTest.php | 58 +- .../FHIRDeviceUseRequestTest.php | 58 +- .../FHIRDeviceUseStatementTest.php | 58 +- .../FHIRDiagnosticOrderTest.php | 58 +- .../FHIRDiagnosticReportTest.php | 58 +- .../FHIRDocumentManifestTest.php | 58 +- .../FHIRDocumentReferenceTest.php | 58 +- .../FHIREligibilityRequestTest.php | 58 +- .../FHIREligibilityResponseTest.php | 58 +- .../FHIRDomainResource/FHIREncounterTest.php | 58 +- .../FHIREnrollmentRequestTest.php | 58 +- .../FHIREnrollmentResponseTest.php | 58 +- .../FHIREpisodeOfCareTest.php | 58 +- .../FHIRExplanationOfBenefitTest.php | 58 +- .../FHIRFamilyMemberHistoryTest.php | 58 +- .../FHIRDomainResource/FHIRFlagTest.php | 58 +- .../FHIRDomainResource/FHIRGoalTest.php | 58 +- .../FHIRDomainResource/FHIRGroupTest.php | 58 +- .../FHIRHealthcareServiceTest.php | 58 +- .../FHIRImagingObjectSelectionTest.php | 58 +- .../FHIRImagingStudyTest.php | 58 +- .../FHIRImmunizationRecommendationTest.php | 58 +- .../FHIRImmunizationTest.php | 58 +- .../FHIRImplementationGuideTest.php | 58 +- .../FHIRDomainResource/FHIRListTest.php | 58 +- .../FHIRDomainResource/FHIRLocationTest.php | 58 +- .../FHIRDomainResource/FHIRMediaTest.php | 58 +- .../FHIRMedicationAdministrationTest.php | 58 +- .../FHIRMedicationDispenseTest.php | 58 +- .../FHIRMedicationOrderTest.php | 58 +- .../FHIRMedicationStatementTest.php | 58 +- .../FHIRDomainResource/FHIRMedicationTest.php | 58 +- .../FHIRMessageHeaderTest.php | 58 +- .../FHIRNamingSystemTest.php | 58 +- .../FHIRNutritionOrderTest.php | 58 +- .../FHIRObservationTest.php | 58 +- .../FHIROperationDefinitionTest.php | 58 +- .../FHIROperationOutcomeTest.php | 58 +- .../FHIROrderResponseTest.php | 58 +- .../FHIRDomainResource/FHIROrderTest.php | 58 +- .../FHIROrganizationTest.php | 58 +- .../FHIRDomainResource/FHIRPatientTest.php | 58 +- .../FHIRPaymentNoticeTest.php | 58 +- .../FHIRPaymentReconciliationTest.php | 58 +- .../FHIRDomainResource/FHIRPersonTest.php | 58 +- .../FHIRPractitionerTest.php | 58 +- .../FHIRProcedureRequestTest.php | 58 +- .../FHIRDomainResource/FHIRProcedureTest.php | 58 +- .../FHIRProcessRequestTest.php | 58 +- .../FHIRProcessResponseTest.php | 58 +- .../FHIRDomainResource/FHIRProvenanceTest.php | 58 +- .../FHIRQuestionnaireResponseTest.php | 58 +- .../FHIRQuestionnaireTest.php | 58 +- .../FHIRReferralRequestTest.php | 58 +- .../FHIRRelatedPersonTest.php | 58 +- .../FHIRRiskAssessmentTest.php | 58 +- .../FHIRDomainResource/FHIRScheduleTest.php | 58 +- .../FHIRSearchParameterTest.php | 58 +- .../FHIRDomainResource/FHIRSlotTest.php | 58 +- .../FHIRDomainResource/FHIRSpecimenTest.php | 58 +- .../FHIRStructureDefinitionTest.php | 58 +- .../FHIRSubscriptionTest.php | 58 +- .../FHIRDomainResource/FHIRSubstanceTest.php | 58 +- .../FHIRSupplyDeliveryTest.php | 58 +- .../FHIRSupplyRequestTest.php | 58 +- .../FHIRDomainResource/FHIRTestScriptTest.php | 58 +- .../FHIRDomainResource/FHIRValueSetTest.php | 58 +- .../FHIRVisionPrescriptionTest.php | 58 +- .../FHIRResource/FHIRDomainResourceTest.php | 2 +- .../FHIRResource/FHIRParametersTest.php | 2 +- .../FHIRResourceContainerTest.php | 2 +- .../DSTU2/PHPFHIRTests/FHIRResourceTest.php | 2 +- .../FHIRSampledDataDataTypePrimitiveTest.php | 2 +- .../FHIRAccountStatusListTest.php | 2 +- .../FHIRActionListListTest.php | 2 +- .../FHIRAddressTypeListTest.php | 2 +- .../FHIRAddressUseListTest.php | 2 +- .../FHIRAdministrativeGenderListTest.php | 2 +- .../FHIRAggregationModeListTest.php | 2 +- ...FHIRAllergyIntoleranceCategoryListTest.php | 2 +- ...HIRAllergyIntoleranceCertaintyListTest.php | 2 +- ...RAllergyIntoleranceCriticalityListTest.php | 2 +- ...FHIRAllergyIntoleranceSeverityListTest.php | 2 +- .../FHIRAllergyIntoleranceStatusListTest.php | 2 +- .../FHIRAllergyIntoleranceTypeListTest.php | 2 +- .../FHIRAnswerFormatListTest.php | 2 +- .../FHIRAppointmentStatusListTest.php | 2 +- .../FHIRAssertionDirectionTypeListTest.php | 2 +- .../FHIRAssertionOperatorTypeListTest.php | 2 +- .../FHIRAssertionResponseTypesListTest.php | 2 +- .../FHIRAuditEventActionListTest.php | 2 +- .../FHIRAuditEventOutcomeListTest.php | 2 +- ...ditEventParticipantNetworkTypeListTest.php | 2 +- .../FHIRBindingStrengthListTest.php | 2 +- .../FHIRBundleTypeListTest.php | 2 +- .../FHIRCarePlanActivityStatusListTest.php | 2 +- .../FHIRCarePlanRelationshipListTest.php | 2 +- .../FHIRCarePlanStatusListTest.php | 2 +- .../FHIRClaimTypeListTest.php | 2 +- .../FHIRClinicalImpressionStatusListTest.php | 2 +- ...FHIRCommunicationRequestStatusListTest.php | 2 +- .../FHIRCommunicationStatusListTest.php | 2 +- ...FHIRCompositionAttestationModeListTest.php | 2 +- .../FHIRCompositionStatusListTest.php | 2 +- .../FHIRConceptMapEquivalenceListTest.php | 2 +- ...HIRConditionVerificationStatusListTest.php | 2 +- .../FHIRConditionalDeleteStatusListTest.php | 2 +- .../FHIRConformanceEventModeListTest.php | 2 +- .../FHIRConformanceResourceStatusListTest.php | 2 +- .../FHIRConformanceStatementKindListTest.php | 2 +- .../FHIRConstraintSeverityListTest.php | 2 +- .../FHIRContactPointSystemListTest.php | 2 +- .../FHIRContactPointUseListTest.php | 2 +- .../FHIRContentTypeListTest.php | 2 +- .../FHIRDataElementStringencyListTest.php | 2 +- .../FHIRDaysOfWeekListTest.php | 2 +- .../FHIRDetectedIssueSeverityListTest.php | 2 +- ...IRDeviceMetricCalibrationStateListTest.php | 2 +- ...HIRDeviceMetricCalibrationTypeListTest.php | 2 +- .../FHIRDeviceMetricCategoryListTest.php | 2 +- .../FHIRDeviceMetricColorListTest.php | 2 +- ...RDeviceMetricOperationalStatusListTest.php | 2 +- .../FHIRDeviceStatusListTest.php | 2 +- .../FHIRDeviceUseRequestPriorityListTest.php | 2 +- .../FHIRDeviceUseRequestStatusListTest.php | 2 +- .../FHIRDiagnosticOrderPriorityListTest.php | 2 +- .../FHIRDiagnosticOrderStatusListTest.php | 2 +- .../FHIRDiagnosticReportStatusListTest.php | 2 +- .../FHIRDigitalMediaTypeListTest.php | 2 +- .../FHIRDocumentModeListTest.php | 2 +- .../FHIRDocumentReferenceStatusListTest.php | 2 +- .../FHIRDocumentRelationshipTypeListTest.php | 2 +- .../FHIREncounterClassListTest.php | 2 +- .../FHIREncounterLocationStatusListTest.php | 2 +- .../FHIREncounterStateListTest.php | 2 +- .../FHIREpisodeOfCareStatusListTest.php | 2 +- .../FHIREventTimingListTest.php | 2 +- .../FHIRExtensionContextListTest.php | 2 +- .../FHIRFamilyHistoryStatusListTest.php | 2 +- .../FHIRFilterOperatorListTest.php | 2 +- .../FHIRFlagStatusListTest.php | 2 +- .../FHIRGoalStatusListTest.php | 2 +- .../FHIRGroupTypeListTest.php | 2 +- .../FHIRGuideDependencyTypeListTest.php | 2 +- .../FHIRGuidePageKindListTest.php | 2 +- .../FHIRGuideResourcePurposeListTest.php | 2 +- .../FHIRHTTPVerbListTest.php | 2 +- .../FHIRIdentifierUseListTest.php | 2 +- .../FHIRIdentityAssuranceLevelListTest.php | 2 +- .../FHIRInstanceAvailabilityListTest.php | 2 +- .../FHIRIssueSeverityListTest.php | 2 +- .../FHIRIssueTypeListTest.php | 2 +- .../FHIRLinkTypeListTest.php | 2 +- .../FHIRListModeListTest.php | 2 +- .../FHIRListStatusListTest.php | 2 +- .../FHIRLocationModeListTest.php | 2 +- .../FHIRLocationStatusListTest.php | 2 +- .../FHIRMeasmnt_PrincipleListTest.php | 2 +- ...MedicationAdministrationStatusListTest.php | 2 +- .../FHIRMedicationDispenseStatusListTest.php | 2 +- .../FHIRMedicationOrderStatusListTest.php | 2 +- .../FHIRMedicationStatementStatusListTest.php | 2 +- ...HIRMessageSignificanceCategoryListTest.php | 2 +- .../FHIRNameUseListTest.php | 2 +- ...FHIRNamingSystemIdentifierTypeListTest.php | 2 +- .../FHIRNamingSystemTypeListTest.php | 2 +- .../FHIRNarrativeStatusListTest.php | 2 +- .../FHIRNoteTypeListTest.php | 2 +- .../FHIRNutritionOrderStatusListTest.php | 2 +- ...HIRObservationRelationshipTypeListTest.php | 2 +- .../FHIRObservationStatusListTest.php | 2 +- .../FHIROperationKindListTest.php | 2 +- .../FHIROperationParameterUseListTest.php | 2 +- .../FHIROrderStatusListTest.php | 2 +- .../FHIRParticipantRequiredListTest.php | 2 +- .../FHIRParticipantStatusListTest.php | 2 +- .../FHIRParticipationStatusListTest.php | 2 +- .../FHIRProcedureRequestPriorityListTest.php | 2 +- .../FHIRProcedureRequestStatusListTest.php | 2 +- .../FHIRProcedureStatusListTest.php | 2 +- .../FHIRPropertyRepresentationListTest.php | 2 +- .../FHIRProvenanceEntityRoleListTest.php | 2 +- .../FHIRQuantityComparatorListTest.php | 2 +- ...HIRQuestionnaireResponseStatusListTest.php | 2 +- .../FHIRQuestionnaireStatusListTest.php | 2 +- .../FHIRReferralStatusListTest.php | 2 +- .../FHIRRemittanceOutcomeListTest.php | 2 +- .../FHIRResourceVersionPolicyListTest.php | 2 +- .../FHIRResponseTypeListTest.php | 2 +- .../FHIRRestfulConformanceModeListTest.php | 2 +- .../FHIRSearchEntryModeListTest.php | 2 +- .../FHIRSearchModifierCodeListTest.php | 2 +- .../FHIRSearchParamTypeListTest.php | 2 +- .../FHIRSlicingRulesListTest.php | 2 +- .../FHIRSlotStatusListTest.php | 2 +- .../FHIRSpecimenStatusListTest.php | 2 +- .../FHIRStructureDefinitionKindListTest.php | 2 +- .../FHIRSubscriptionChannelTypeListTest.php | 2 +- .../FHIRSubscriptionStatusListTest.php | 2 +- .../FHIRSupplyDeliveryStatusListTest.php | 2 +- .../FHIRSupplyRequestStatusListTest.php | 2 +- .../FHIRSystemRestfulInteractionListTest.php | 2 +- .../FHIRTransactionModeListTest.php | 2 +- .../FHIRTypeRestfulInteractionListTest.php | 2 +- .../FHIRUnitsOfTimeListTest.php | 2 +- .../FHIRUnknownContentCodeListTest.php | 2 +- .../FHIRStringPrimitive/FHIRUseListTest.php | 2 +- .../FHIRVisionBaseListTest.php | 2 +- .../FHIRVisionEyesListTest.php | 2 +- .../FHIRXPathUsageTypeListTest.php | 2 +- .../PHPFHIRTests/FHIRStringPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRTimePrimitiveTest.php | 2 +- .../FHIRUnsignedIntPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRUriPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRUuidPrimitiveTest.php | 2 +- .../PHPFHIRTests/PHPFHIRConstantsTest.php | 2 +- .../DSTU2/PHPFHIRTests/PHPFHIRTypeMapTest.php | 2 +- .../DSTU2/PHPFHIRTypeInterface.php | 10 +- .../PHPFHIRGenerated/DSTU2/PHPFHIRTypeMap.php | 2 +- .../PHPFHIRValidationAssertionsTrait.php | 219 + .../R4/FHIRBase64BinaryPrimitive.php | 38 +- .../R4/FHIRBooleanPrimitive.php | 38 +- .../R4/FHIRCanonicalPrimitive.php | 38 +- .../PHPFHIRGenerated/R4/FHIRCodePrimitive.php | 38 +- .../FHIRAccountStatusList.php | 37 +- .../FHIRActionCardinalityBehaviorList.php | 37 +- .../FHIRActionConditionKindList.php | 37 +- .../FHIRActionGroupingBehaviorList.php | 37 +- .../FHIRActionParticipantTypeList.php | 37 +- .../FHIRActionPrecheckBehaviorList.php | 37 +- .../FHIRActionRelationshipTypeList.php | 37 +- .../FHIRActionRequiredBehaviorList.php | 37 +- .../FHIRActionSelectionBehaviorList.php | 37 +- .../FHIRCodePrimitive/FHIRAddressTypeList.php | 37 +- .../FHIRCodePrimitive/FHIRAddressUseList.php | 37 +- .../FHIRAdministrativeGenderList.php | 37 +- .../FHIRAdverseEventActualityList.php | 37 +- .../FHIRAggregationModeList.php | 37 +- .../FHIRAllergyIntoleranceCategoryList.php | 37 +- .../FHIRAllergyIntoleranceCriticalityList.php | 37 +- .../FHIRAllergyIntoleranceSeverityList.php | 37 +- .../FHIRAllergyIntoleranceTypeList.php | 37 +- .../FHIRAppointmentStatusList.php | 37 +- .../FHIRAssertionDirectionTypeList.php | 37 +- .../FHIRAssertionOperatorTypeList.php | 37 +- .../FHIRAssertionResponseTypesList.php | 37 +- .../FHIRAuditEventActionList.php | 37 +- .../FHIRAuditEventAgentNetworkTypeList.php | 37 +- .../FHIRAuditEventOutcomeList.php | 37 +- .../FHIRBindingStrengthList.php | 37 +- ...BiologicallyDerivedProductCategoryList.php | 37 +- ...IRBiologicallyDerivedProductStatusList.php | 37 +- ...ogicallyDerivedProductStorageScaleList.php | 37 +- .../FHIRCodePrimitive/FHIRBundleTypeList.php | 37 +- .../FHIRCapabilityStatementKindList.php | 37 +- .../FHIRCarePlanActivityKindList.php | 37 +- .../FHIRCarePlanActivityStatusList.php | 37 +- .../FHIRCarePlanIntentList.php | 37 +- .../FHIRCareTeamStatusList.php | 37 +- .../FHIRCatalogEntryRelationTypeList.php | 37 +- .../FHIRChargeItemStatusList.php | 37 +- .../FHIRClaimProcessingCodesList.php | 37 +- .../FHIRClinicalImpressionStatusList.php | 37 +- .../FHIRCodeSearchSupportList.php | 37 +- .../FHIRCodeSystemContentModeList.php | 37 +- .../FHIRCodeSystemHierarchyMeaningList.php | 37 +- .../FHIRCompartmentTypeList.php | 37 +- .../FHIRCompositionAttestationModeList.php | 37 +- .../FHIRCompositionStatusList.php | 37 +- .../FHIRConceptMapEquivalenceList.php | 37 +- .../FHIRConceptMapGroupUnmappedModeList.php | 37 +- .../FHIRConditionalDeleteStatusList.php | 37 +- .../FHIRConditionalReadStatusList.php | 37 +- .../FHIRConsentDataMeaningList.php | 37 +- .../FHIRConsentProvisionTypeList.php | 37 +- .../FHIRConsentStateList.php | 37 +- .../FHIRConstraintSeverityList.php | 37 +- .../FHIRContactPointSystemList.php | 37 +- .../FHIRContactPointUseList.php | 37 +- ...ractResourcePublicationStatusCodesList.php | 37 +- .../FHIRContractResourceStatusCodesList.php | 37 +- .../FHIRContributorTypeList.php | 37 +- .../FHIRCodePrimitive/FHIRDaysOfWeekList.php | 37 +- .../FHIRDetectedIssueSeverityList.php | 37 +- .../FHIRDeviceMetricCalibrationStateList.php | 37 +- .../FHIRDeviceMetricCalibrationTypeList.php | 37 +- .../FHIRDeviceMetricCategoryList.php | 37 +- .../FHIRDeviceMetricColorList.php | 37 +- .../FHIRDeviceMetricOperationalStatusList.php | 37 +- .../FHIRDeviceNameTypeList.php | 37 +- .../FHIRDeviceUseStatementStatusList.php | 37 +- .../FHIRDiagnosticReportStatusList.php | 37 +- .../FHIRDiscriminatorTypeList.php | 37 +- .../FHIRDocumentModeList.php | 37 +- .../FHIRDocumentReferenceStatusList.php | 37 +- .../FHIRDocumentRelationshipTypeList.php | 37 +- .../FHIREligibilityRequestPurposeList.php | 37 +- .../FHIREligibilityResponsePurposeList.php | 37 +- .../FHIREnableWhenBehaviorList.php | 37 +- .../FHIREncounterLocationStatusList.php | 37 +- .../FHIREncounterStatusList.php | 37 +- .../FHIREndpointStatusList.php | 37 +- .../FHIREpisodeOfCareStatusList.php | 37 +- .../FHIREventCapabilityModeList.php | 37 +- .../FHIRCodePrimitive/FHIREventStatusList.php | 37 +- .../FHIRCodePrimitive/FHIREventTimingList.php | 37 +- .../FHIREvidenceVariableTypeList.php | 37 +- .../FHIRExampleScenarioActorTypeList.php | 37 +- .../FHIRExplanationOfBenefitStatusList.php | 37 +- .../FHIRExposureStateList.php | 37 +- .../FHIRExpressionLanguageList.php | 37 +- .../FHIRExtensionContextTypeList.php | 37 +- .../FHIRFHIRDeviceStatusList.php | 37 +- .../FHIRFHIRSubstanceStatusList.php | 37 +- .../FHIRCodePrimitive/FHIRFHIRVersionList.php | 37 +- .../FHIRFamilyHistoryStatusList.php | 37 +- .../FHIRFilterOperatorList.php | 37 +- .../FHIRFinancialResourceStatusCodesList.php | 37 +- .../FHIRCodePrimitive/FHIRFlagStatusList.php | 37 +- .../FHIRGoalLifecycleStatusList.php | 37 +- .../FHIRGraphCompartmentRuleList.php | 37 +- .../FHIRGraphCompartmentUseList.php | 37 +- .../FHIRGroupMeasureList.php | 37 +- .../FHIRCodePrimitive/FHIRGroupTypeList.php | 37 +- .../FHIRGuidanceResponseStatusList.php | 37 +- .../FHIRGuidePageGenerationList.php | 37 +- .../FHIRGuideParameterCodeList.php | 37 +- .../R4/FHIRCodePrimitive/FHIRHTTPVerbList.php | 37 +- .../FHIRIdentifierUseList.php | 37 +- .../FHIRIdentityAssuranceLevelList.php | 37 +- .../FHIRImagingStudyStatusList.php | 37 +- ...RImmunizationEvaluationStatusCodesList.php | 37 +- .../FHIRImmunizationStatusCodesList.php | 37 +- .../FHIRInvoicePriceComponentTypeList.php | 37 +- .../FHIRInvoiceStatusList.php | 37 +- .../FHIRIssueSeverityList.php | 37 +- .../FHIRCodePrimitive/FHIRIssueTypeList.php | 37 +- .../R4/FHIRCodePrimitive/FHIRLinkTypeList.php | 37 +- .../FHIRCodePrimitive/FHIRLinkageTypeList.php | 37 +- .../R4/FHIRCodePrimitive/FHIRListModeList.php | 37 +- .../FHIRCodePrimitive/FHIRListStatusList.php | 37 +- .../FHIRLocationModeList.php | 37 +- .../FHIRLocationStatusList.php | 37 +- .../FHIRMeasureReportStatusList.php | 37 +- .../FHIRMeasureReportTypeList.php | 37 +- .../FHIRMedicationRequestIntentList.php | 37 +- .../FHIRMedicationStatusCodesList.php | 37 +- .../FHIRMedicationrequestStatusList.php | 37 +- .../FHIRMessageSignificanceCategoryList.php | 37 +- .../FHIRMessageheaderResponseRequestList.php | 37 +- .../R4/FHIRCodePrimitive/FHIRNameUseList.php | 37 +- .../FHIRNamingSystemIdentifierTypeList.php | 37 +- .../FHIRNamingSystemTypeList.php | 37 +- .../FHIRNarrativeStatusList.php | 37 +- .../R4/FHIRCodePrimitive/FHIRNoteTypeList.php | 37 +- .../FHIRObservationDataTypeList.php | 37 +- .../FHIRObservationRangeCategoryList.php | 37 +- .../FHIRObservationStatusList.php | 37 +- .../FHIROperationKindList.php | 37 +- .../FHIROperationParameterUseList.php | 37 +- .../FHIROrientationTypeList.php | 37 +- .../FHIRParticipantRequiredList.php | 37 +- .../FHIRParticipationStatusList.php | 37 +- .../FHIRPropertyRepresentationList.php | 37 +- .../FHIRPropertyTypeList.php | 37 +- .../FHIRProvenanceEntityRoleList.php | 37 +- .../FHIRPublicationStatusList.php | 37 +- .../FHIRCodePrimitive/FHIRQualityTypeList.php | 37 +- .../FHIRQuantityComparatorList.php | 37 +- .../FHIRQuestionnaireItemOperatorList.php | 37 +- .../FHIRQuestionnaireItemTypeList.php | 37 +- .../FHIRQuestionnaireResponseStatusList.php | 37 +- .../FHIRReferenceHandlingPolicyList.php | 37 +- .../FHIRReferenceVersionRulesList.php | 37 +- .../FHIRRelatedArtifactTypeList.php | 37 +- .../FHIRRemittanceOutcomeList.php | 37 +- .../FHIRRepositoryTypeList.php | 37 +- .../FHIRRequestIntentList.php | 37 +- .../FHIRRequestPriorityList.php | 37 +- .../FHIRRequestResourceTypeList.php | 37 +- .../FHIRRequestStatusList.php | 37 +- .../FHIRResearchElementTypeList.php | 37 +- .../FHIRResearchStudyStatusList.php | 37 +- .../FHIRResearchSubjectStatusList.php | 37 +- .../FHIRResourceTypeList.php | 37 +- .../FHIRResourceVersionPolicyList.php | 37 +- .../FHIRResponseTypeList.php | 37 +- .../FHIRRestfulCapabilityModeList.php | 37 +- .../FHIRCodePrimitive/FHIRSPDXLicenseList.php | 37 +- .../FHIRSearchComparatorList.php | 37 +- .../FHIRSearchEntryModeList.php | 37 +- .../FHIRSearchModifierCodeList.php | 37 +- .../FHIRSearchParamTypeList.php | 37 +- .../FHIRSequenceTypeList.php | 37 +- .../FHIRSlicingRulesList.php | 37 +- .../FHIRCodePrimitive/FHIRSlotStatusList.php | 37 +- .../FHIRSortDirectionList.php | 37 +- .../FHIRSpecimenContainedPreferenceList.php | 37 +- .../FHIRSpecimenStatusList.php | 37 +- .../R4/FHIRCodePrimitive/FHIRStatusList.php | 37 +- .../FHIRCodePrimitive/FHIRStrandTypeList.php | 37 +- .../FHIRStructureDefinitionKindList.php | 37 +- .../FHIRStructureMapContextTypeList.php | 37 +- .../FHIRStructureMapGroupTypeModeList.php | 37 +- .../FHIRStructureMapInputModeList.php | 37 +- .../FHIRStructureMapModelModeList.php | 37 +- .../FHIRStructureMapSourceListModeList.php | 37 +- .../FHIRStructureMapTargetListModeList.php | 37 +- .../FHIRStructureMapTransformList.php | 37 +- .../FHIRSubscriptionChannelTypeList.php | 37 +- .../FHIRSubscriptionStatusList.php | 37 +- .../FHIRSupplyDeliveryStatusList.php | 37 +- .../FHIRSupplyRequestStatusList.php | 37 +- .../FHIRSystemRestfulInteractionList.php | 37 +- .../FHIRCodePrimitive/FHIRTaskIntentList.php | 37 +- .../FHIRCodePrimitive/FHIRTaskStatusList.php | 37 +- .../FHIRTestReportActionResultList.php | 37 +- .../FHIRTestReportParticipantTypeList.php | 37 +- .../FHIRTestReportResultList.php | 37 +- .../FHIRTestReportStatusList.php | 37 +- .../FHIRTestScriptRequestMethodCodeList.php | 37 +- .../FHIRCodePrimitive/FHIRTriggerTypeList.php | 37 +- .../FHIRTypeDerivationRuleList.php | 37 +- .../FHIRTypeRestfulInteractionList.php | 37 +- .../FHIRUDIEntryTypeList.php | 37 +- .../FHIRCodePrimitive/FHIRUnitsOfTimeList.php | 37 +- .../R4/FHIRCodePrimitive/FHIRUseList.php | 37 +- ...FHIRVConfidentialityClassificationList.php | 37 +- .../FHIRVariableTypeList.php | 37 +- .../FHIRCodePrimitive/FHIRVisionBaseList.php | 37 +- .../FHIRCodePrimitive/FHIRVisionEyesList.php | 37 +- .../FHIRXPathUsageTypeList.php | 37 +- .../PHPFHIRGenerated/R4/FHIRDatePrimitive.php | 40 +- .../R4/FHIRDateTimePrimitive.php | 40 +- .../R4/FHIRDecimalPrimitive.php | 38 +- .../PHPFHIRGenerated/R4/FHIRElement.php | 38 +- .../R4/FHIRElement/FHIRAccountStatus.php | 66 +- .../FHIRActionCardinalityBehavior.php | 66 +- .../FHIRElement/FHIRActionConditionKind.php | 66 +- .../FHIRActionGroupingBehavior.php | 66 +- .../FHIRElement/FHIRActionParticipantType.php | 66 +- .../FHIRActionPrecheckBehavior.php | 66 +- .../FHIRActionRelationshipType.php | 66 +- .../FHIRActionRequiredBehavior.php | 66 +- .../FHIRActionSelectionBehavior.php | 66 +- .../R4/FHIRElement/FHIRAddress.php | 221 +- .../R4/FHIRElement/FHIRAddressType.php | 66 +- .../R4/FHIRElement/FHIRAddressUse.php | 66 +- .../FHIRElement/FHIRAdministrativeGender.php | 66 +- .../FHIRElement/FHIRAdverseEventActuality.php | 66 +- .../R4/FHIRElement/FHIRAggregationMode.php | 66 +- .../FHIRAllergyIntoleranceCategory.php | 66 +- .../FHIRAllergyIntoleranceCriticality.php | 66 +- .../FHIRAllergyIntoleranceSeverity.php | 66 +- .../FHIRAllergyIntoleranceType.php | 66 +- .../R4/FHIRElement/FHIRAnnotation.php | 117 +- .../R4/FHIRElement/FHIRAppointmentStatus.php | 66 +- .../FHIRAssertionDirectionType.php | 66 +- .../FHIRElement/FHIRAssertionOperatorType.php | 66 +- .../FHIRAssertionResponseTypes.php | 66 +- .../R4/FHIRElement/FHIRAttachment.php | 185 +- .../R4/FHIRElement/FHIRAuditEventAction.php | 66 +- .../FHIRAuditEventAgentNetworkType.php | 66 +- .../R4/FHIRElement/FHIRAuditEventOutcome.php | 66 +- .../R4/FHIRElement/FHIRBackboneElement.php | 68 +- .../FHIRAccount/FHIRAccountCoverage.php | 95 +- .../FHIRAccount/FHIRAccountGuarantor.php | 112 +- .../FHIRActivityDefinitionDynamicValue.php | 95 +- .../FHIRActivityDefinitionParticipant.php | 95 +- .../FHIRAdverseEventCausality.php | 129 +- .../FHIRAdverseEventSuspectEntity.php | 97 +- .../FHIRAllergyIntoleranceReaction.php | 184 +- .../FHIRAppointmentParticipant.php | 148 +- .../FHIRAuditEvent/FHIRAuditEventAgent.php | 254 +- .../FHIRAuditEvent/FHIRAuditEventDetail.php | 112 +- .../FHIRAuditEvent/FHIRAuditEventEntity.php | 218 +- .../FHIRAuditEvent/FHIRAuditEventNetwork.php | 95 +- .../FHIRAuditEvent/FHIRAuditEventSource.php | 114 +- ...IRBiologicallyDerivedProductCollection.php | 129 +- ...BiologicallyDerivedProductManipulation.php | 112 +- ...IRBiologicallyDerivedProductProcessing.php | 146 +- .../FHIRBiologicallyDerivedProductStorage.php | 129 +- .../FHIRBundle/FHIRBundleEntry.php | 165 +- .../FHIRBundle/FHIRBundleLink.php | 95 +- .../FHIRBundle/FHIRBundleRequest.php | 163 +- .../FHIRBundle/FHIRBundleResponse.php | 146 +- .../FHIRBundle/FHIRBundleSearch.php | 95 +- .../FHIRCapabilityStatementDocument.php | 112 +- .../FHIRCapabilityStatementEndpoint.php | 95 +- .../FHIRCapabilityStatementImplementation.php | 112 +- .../FHIRCapabilityStatementInteraction.php | 95 +- .../FHIRCapabilityStatementInteraction1.php | 95 +- .../FHIRCapabilityStatementMessaging.php | 133 +- .../FHIRCapabilityStatementOperation.php | 112 +- .../FHIRCapabilityStatementResource.php | 364 +- .../FHIRCapabilityStatementRest.php | 207 +- .../FHIRCapabilityStatementSearchParam.php | 129 +- .../FHIRCapabilityStatementSecurity.php | 114 +- .../FHIRCapabilityStatementSoftware.php | 112 +- ...HIRCapabilityStatementSupportedMessage.php | 95 +- .../FHIRCarePlan/FHIRCarePlanActivity.php | 152 +- .../FHIRCarePlan/FHIRCarePlanDetail.php | 413 +- .../FHIRCareTeam/FHIRCareTeamParticipant.php | 131 +- .../FHIRCatalogEntryRelatedEntry.php | 95 +- .../FHIRChargeItemPerformer.php | 95 +- .../FHIRChargeItemDefinitionApplicability.php | 112 +- ...FHIRChargeItemDefinitionPriceComponent.php | 129 +- .../FHIRChargeItemDefinitionPropertyGroup.php | 99 +- .../FHIRClaim/FHIRClaimAccident.php | 129 +- .../FHIRClaim/FHIRClaimCareTeam.php | 146 +- .../FHIRClaim/FHIRClaimDetail.php | 273 +- .../FHIRClaim/FHIRClaimDiagnosis.php | 165 +- .../FHIRClaim/FHIRClaimInsurance.php | 182 +- .../FHIRClaim/FHIRClaimItem.php | 489 +- .../FHIRClaim/FHIRClaimPayee.php | 95 +- .../FHIRClaim/FHIRClaimProcedure.php | 167 +- .../FHIRClaim/FHIRClaimRelated.php | 112 +- .../FHIRClaim/FHIRClaimSubDetail.php | 254 +- .../FHIRClaim/FHIRClaimSupportingInfo.php | 248 +- .../FHIRClaimResponseAddItem.php | 438 +- .../FHIRClaimResponseAdjudication.php | 129 +- .../FHIRClaimResponseDetail.php | 135 +- .../FHIRClaimResponseDetail1.php | 222 +- .../FHIRClaimResponseError.php | 129 +- .../FHIRClaimResponseInsurance.php | 146 +- .../FHIRClaimResponseItem.php | 135 +- .../FHIRClaimResponsePayment.php | 163 +- .../FHIRClaimResponseProcessNote.php | 129 +- .../FHIRClaimResponseSubDetail.php | 116 +- .../FHIRClaimResponseSubDetail1.php | 203 +- .../FHIRClaimResponseTotal.php | 95 +- .../FHIRClinicalImpressionFinding.php | 112 +- .../FHIRClinicalImpressionInvestigation.php | 97 +- .../FHIRCodeSystem/FHIRCodeSystemConcept.php | 169 +- .../FHIRCodeSystemDesignation.php | 112 +- .../FHIRCodeSystem/FHIRCodeSystemFilter.php | 131 +- .../FHIRCodeSystem/FHIRCodeSystemProperty.php | 129 +- .../FHIRCodeSystemProperty1.php | 197 +- .../FHIRCommunicationPayload.php | 112 +- .../FHIRCommunicationRequestPayload.php | 112 +- .../FHIRCompartmentDefinitionResource.php | 114 +- .../FHIRCompositionAttester.php | 112 +- .../FHIRComposition/FHIRCompositionEvent.php | 116 +- .../FHIRCompositionRelatesTo.php | 112 +- .../FHIRCompositionSection.php | 237 +- .../FHIRConceptMapDependsOn.php | 129 +- .../FHIRConceptMap/FHIRConceptMapElement.php | 114 +- .../FHIRConceptMap/FHIRConceptMapGroup.php | 165 +- .../FHIRConceptMap/FHIRConceptMapTarget.php | 167 +- .../FHIRConceptMap/FHIRConceptMapUnmapped.php | 129 +- .../FHIRCondition/FHIRConditionEvidence.php | 99 +- .../FHIRCondition/FHIRConditionStage.php | 114 +- .../FHIRConsent/FHIRConsentActor.php | 95 +- .../FHIRConsent/FHIRConsentData.php | 95 +- .../FHIRConsent/FHIRConsentPolicy.php | 95 +- .../FHIRConsent/FHIRConsentProvision.php | 264 +- .../FHIRConsent/FHIRConsentVerification.php | 112 +- .../FHIRContract/FHIRContractAction.php | 478 +- .../FHIRContract/FHIRContractAnswer.php | 265 +- .../FHIRContract/FHIRContractAsset.php | 338 +- .../FHIRContractContentDefinition.php | 163 +- .../FHIRContract/FHIRContractContext.php | 114 +- .../FHIRContract/FHIRContractFriendly.php | 95 +- .../FHIRContract/FHIRContractLegal.php | 95 +- .../FHIRContract/FHIRContractOffer.php | 243 +- .../FHIRContract/FHIRContractParty.php | 97 +- .../FHIRContract/FHIRContractRule.php | 95 +- .../FHIRContractSecurityLabel.php | 135 +- .../FHIRContract/FHIRContractSigner.php | 114 +- .../FHIRContract/FHIRContractSubject.php | 97 +- .../FHIRContract/FHIRContractTerm.php | 290 +- .../FHIRContract/FHIRContractValuedItem.php | 320 +- .../FHIRCoverage/FHIRCoverageClass.php | 112 +- .../FHIRCoverageCostToBeneficiary.php | 131 +- .../FHIRCoverage/FHIRCoverageException.php | 95 +- ...HIRCoverageEligibilityRequestDiagnosis.php | 95 +- ...HIRCoverageEligibilityRequestInsurance.php | 112 +- .../FHIRCoverageEligibilityRequestItem.php | 239 +- ...verageEligibilityRequestSupportingInfo.php | 112 +- ...FHIRCoverageEligibilityResponseBenefit.php | 180 +- .../FHIRCoverageEligibilityResponseError.php | 78 +- ...IRCoverageEligibilityResponseInsurance.php | 131 +- .../FHIRCoverageEligibilityResponseItem.php | 305 +- .../FHIRDetectedIssueEvidence.php | 99 +- .../FHIRDetectedIssueMitigation.php | 112 +- .../FHIRDevice/FHIRDeviceDeviceName.php | 95 +- .../FHIRDevice/FHIRDeviceProperty.php | 116 +- .../FHIRDevice/FHIRDeviceSpecialization.php | 95 +- .../FHIRDevice/FHIRDeviceUdiCarrier.php | 163 +- .../FHIRDevice/FHIRDeviceVersion.php | 112 +- .../FHIRDeviceDefinitionCapability.php | 97 +- .../FHIRDeviceDefinitionDeviceName.php | 95 +- .../FHIRDeviceDefinitionMaterial.php | 112 +- .../FHIRDeviceDefinitionProperty.php | 116 +- .../FHIRDeviceDefinitionSpecialization.php | 95 +- ...HIRDeviceDefinitionUdiDeviceIdentifier.php | 112 +- .../FHIRDeviceMetricCalibration.php | 112 +- .../FHIRDeviceRequestParameter.php | 146 +- .../FHIRDiagnosticReportMedia.php | 95 +- .../FHIRDocumentManifestRelated.php | 95 +- .../FHIRDocumentReferenceContent.php | 95 +- .../FHIRDocumentReferenceContext.php | 186 +- .../FHIRDocumentReferenceRelatesTo.php | 95 +- .../FHIRBackboneElement/FHIRDosage.php | 303 +- .../FHIRDosage/FHIRDosageDoseAndRate.php | 163 +- .../FHIREffectEvidenceSynthesisCertainty.php | 118 +- ...EvidenceSynthesisCertaintySubcomponent.php | 116 +- ...REffectEvidenceSynthesisEffectEstimate.php | 165 +- ...fectEvidenceSynthesisPrecisionEstimate.php | 129 +- ...fectEvidenceSynthesisResultsByExposure.php | 129 +- .../FHIREffectEvidenceSynthesisSampleSize.php | 112 +- .../FHIRElementDefinition.php | 3426 +++++++++++++- .../FHIRElementDefinitionBase.php | 112 +- .../FHIRElementDefinitionBinding.php | 112 +- .../FHIRElementDefinitionConstraint.php | 180 +- .../FHIRElementDefinitionDiscriminator.php | 95 +- .../FHIRElementDefinitionExample.php | 928 +++- .../FHIRElementDefinitionMapping.php | 129 +- .../FHIRElementDefinitionSlicing.php | 131 +- .../FHIRElementDefinitionType.php | 152 +- .../FHIREncounterClassHistory.php | 95 +- .../FHIREncounter/FHIREncounterDiagnosis.php | 112 +- .../FHIREncounterHospitalization.php | 220 +- .../FHIREncounter/FHIREncounterLocation.php | 129 +- .../FHIREncounterParticipant.php | 114 +- .../FHIREncounterStatusHistory.php | 95 +- .../FHIREpisodeOfCareDiagnosis.php | 112 +- .../FHIREpisodeOfCareStatusHistory.php | 95 +- .../FHIREvidenceVariableCharacteristic.php | 318 +- .../FHIRExampleScenarioActor.php | 129 +- .../FHIRExampleScenarioAlternative.php | 114 +- .../FHIRExampleScenarioContainedInstance.php | 95 +- .../FHIRExampleScenarioInstance.php | 167 +- .../FHIRExampleScenarioOperation.php | 231 +- .../FHIRExampleScenarioProcess.php | 148 +- .../FHIRExampleScenarioStep.php | 133 +- .../FHIRExampleScenarioVersion.php | 95 +- .../FHIRExplanationOfBenefitAccident.php | 129 +- .../FHIRExplanationOfBenefitAddItem.php | 438 +- .../FHIRExplanationOfBenefitAdjudication.php | 129 +- ...FHIRExplanationOfBenefitBenefitBalance.php | 199 +- .../FHIRExplanationOfBenefitCareTeam.php | 146 +- .../FHIRExplanationOfBenefitDetail.php | 311 +- .../FHIRExplanationOfBenefitDetail1.php | 222 +- .../FHIRExplanationOfBenefitDiagnosis.php | 165 +- .../FHIRExplanationOfBenefitFinancial.php | 163 +- .../FHIRExplanationOfBenefitInsurance.php | 114 +- .../FHIRExplanationOfBenefitItem.php | 527 ++- .../FHIRExplanationOfBenefitPayee.php | 95 +- .../FHIRExplanationOfBenefitPayment.php | 163 +- .../FHIRExplanationOfBenefitProcedure.php | 167 +- .../FHIRExplanationOfBenefitProcessNote.php | 129 +- .../FHIRExplanationOfBenefitRelated.php | 112 +- .../FHIRExplanationOfBenefitSubDetail.php | 292 +- .../FHIRExplanationOfBenefitSubDetail1.php | 203 +- ...FHIRExplanationOfBenefitSupportingInfo.php | 248 +- .../FHIRExplanationOfBenefitTotal.php | 95 +- .../FHIRFamilyMemberHistoryCondition.php | 199 +- .../FHIRGoal/FHIRGoalTarget.php | 231 +- .../FHIRGraphDefinitionCompartment.php | 146 +- .../FHIRGraphDefinitionLink.php | 165 +- .../FHIRGraphDefinitionTarget.php | 150 +- .../FHIRGroup/FHIRGroupCharacteristic.php | 197 +- .../FHIRGroup/FHIRGroupMember.php | 112 +- .../FHIRHealthcareServiceAvailableTime.php | 131 +- .../FHIRHealthcareServiceEligibility.php | 95 +- .../FHIRHealthcareServiceNotAvailable.php | 95 +- .../FHIRImagingStudyInstance.php | 129 +- .../FHIRImagingStudyPerformer.php | 95 +- .../FHIRImagingStudySeries.php | 273 +- .../FHIRImmunizationEducation.php | 129 +- .../FHIRImmunizationPerformer.php | 95 +- .../FHIRImmunizationProtocolApplied.php | 182 +- .../FHIRImmunizationReaction.php | 112 +- ...mmunizationRecommendationDateCriterion.php | 95 +- ...munizationRecommendationRecommendation.php | 311 +- .../FHIRImplementationGuideDefinition.php | 154 +- .../FHIRImplementationGuideDependsOn.php | 112 +- .../FHIRImplementationGuideGlobal.php | 95 +- .../FHIRImplementationGuideGrouping.php | 95 +- .../FHIRImplementationGuideManifest.php | 154 +- .../FHIRImplementationGuidePage.php | 148 +- .../FHIRImplementationGuidePage1.php | 114 +- .../FHIRImplementationGuideParameter.php | 95 +- .../FHIRImplementationGuideResource.php | 182 +- .../FHIRImplementationGuideResource1.php | 129 +- .../FHIRImplementationGuideTemplate.php | 112 +- .../FHIRInsurancePlanBenefit.php | 114 +- .../FHIRInsurancePlanBenefit1.php | 97 +- .../FHIRInsurancePlanContact.php | 131 +- .../FHIRInsurancePlanCost.php | 131 +- .../FHIRInsurancePlanCoverage.php | 116 +- .../FHIRInsurancePlanGeneralCost.php | 129 +- .../FHIRInsurancePlanLimit.php | 95 +- .../FHIRInsurancePlanPlan.php | 173 +- .../FHIRInsurancePlanSpecificCost.php | 97 +- .../FHIRInvoice/FHIRInvoiceLineItem.php | 131 +- .../FHIRInvoice/FHIRInvoiceParticipant.php | 95 +- .../FHIRInvoice/FHIRInvoicePriceComponent.php | 129 +- .../FHIRLinkage/FHIRLinkageItem.php | 95 +- .../FHIRList/FHIRListEntry.php | 129 +- .../FHIRLocationHoursOfOperation.php | 131 +- .../FHIRLocation/FHIRLocationPosition.php | 112 +- .../FHIRMarketingStatus.php | 146 +- .../FHIRMeasure/FHIRMeasureComponent.php | 112 +- .../FHIRMeasure/FHIRMeasureGroup.php | 133 +- .../FHIRMeasure/FHIRMeasurePopulation.php | 112 +- .../FHIRMeasure/FHIRMeasureStratifier.php | 131 +- .../FHIRMeasureSupplementalData.php | 131 +- .../FHIRMeasureReportComponent.php | 95 +- .../FHIRMeasureReportGroup.php | 133 +- .../FHIRMeasureReportPopulation.php | 112 +- .../FHIRMeasureReportPopulation1.php | 112 +- .../FHIRMeasureReportStratifier.php | 99 +- .../FHIRMeasureReportStratum.php | 133 +- .../FHIRMedication/FHIRMedicationBatch.php | 95 +- .../FHIRMedicationIngredient.php | 129 +- .../FHIRMedicationAdministrationDosage.php | 180 +- .../FHIRMedicationAdministrationPerformer.php | 95 +- .../FHIRMedicationDispensePerformer.php | 95 +- .../FHIRMedicationDispenseSubstitution.php | 133 +- ...ationKnowledgeAdministrationGuidelines.php | 133 +- .../FHIRMedicationKnowledgeCost.php | 112 +- .../FHIRMedicationKnowledgeDosage.php | 97 +- ...RMedicationKnowledgeDrugCharacteristic.php | 146 +- .../FHIRMedicationKnowledgeIngredient.php | 129 +- .../FHIRMedicationKnowledgeKinetics.php | 116 +- .../FHIRMedicationKnowledgeMaxDispense.php | 95 +- ...icationKnowledgeMedicineClassification.php | 97 +- ...IRMedicationKnowledgeMonitoringProgram.php | 95 +- .../FHIRMedicationKnowledgeMonograph.php | 95 +- .../FHIRMedicationKnowledgePackaging.php | 95 +- ...icationKnowledgePatientCharacteristics.php | 114 +- .../FHIRMedicationKnowledgeRegulatory.php | 133 +- ...ionKnowledgeRelatedMedicationKnowledge.php | 97 +- .../FHIRMedicationKnowledgeSchedule.php | 78 +- .../FHIRMedicationKnowledgeSubstitution.php | 95 +- .../FHIRMedicationRequestDispenseRequest.php | 180 +- .../FHIRMedicationRequestInitialFill.php | 95 +- .../FHIRMedicationRequestSubstitution.php | 112 +- .../FHIRMedicinalProductCountryLanguage.php | 112 +- ...lProductManufacturingBusinessOperation.php | 165 +- .../FHIRMedicinalProductName.php | 116 +- .../FHIRMedicinalProductNamePart.php | 95 +- ...FHIRMedicinalProductSpecialDesignation.php | 199 +- ...thorizationJurisdictionalAuthorization.php | 150 +- ...MedicinalProductAuthorizationProcedure.php | 148 +- ...nalProductContraindicationOtherTherapy.php | 112 +- ...MedicinalProductIndicationOtherTherapy.php | 112 +- ...inalProductIngredientReferenceStrength.php | 148 +- ...nalProductIngredientSpecifiedSubstance.php | 131 +- ...FHIRMedicinalProductIngredientStrength.php | 184 +- ...HIRMedicinalProductIngredientSubstance.php | 97 +- ...MedicinalProductInteractionInteractant.php | 95 +- ...edicinalProductPackagedBatchIdentifier.php | 95 +- ...HIRMedicinalProductPackagedPackageItem.php | 283 +- ...alProductPharmaceuticalCharacteristics.php | 95 +- ...uctPharmaceuticalRouteOfAdministration.php | 182 +- ...inalProductPharmaceuticalTargetSpecies.php | 97 +- ...lProductPharmaceuticalWithdrawalPeriod.php | 112 +- .../FHIRMessageDefinitionAllowedResponse.php | 95 +- .../FHIRMessageDefinitionFocus.php | 129 +- .../FHIRMessageHeaderDestination.php | 129 +- .../FHIRMessageHeaderResponse.php | 112 +- .../FHIRMessageHeaderSource.php | 146 +- .../FHIRMolecularSequenceInner.php | 95 +- .../FHIRMolecularSequenceOuter.php | 95 +- .../FHIRMolecularSequenceQuality.php | 316 +- .../FHIRMolecularSequenceReferenceSeq.php | 214 +- .../FHIRMolecularSequenceRepository.php | 163 +- .../FHIRMolecularSequenceRoc.php | 194 +- .../FHIRMolecularSequenceStructureVariant.php | 146 +- .../FHIRMolecularSequenceVariant.php | 163 +- .../FHIRNamingSystemUniqueId.php | 146 +- .../FHIRNutritionOrderAdministration.php | 129 +- .../FHIRNutritionOrderEnteralFormula.php | 216 +- .../FHIRNutritionOrderNutrient.php | 95 +- .../FHIRNutritionOrderOralDiet.php | 173 +- .../FHIRNutritionOrderSupplement.php | 148 +- .../FHIRNutritionOrderTexture.php | 95 +- .../FHIRObservationComponent.php | 320 +- .../FHIRObservationReferenceRange.php | 165 +- ...ObservationDefinitionQualifiedInterval.php | 199 +- ...servationDefinitionQuantitativeDetails.php | 129 +- .../FHIROperationDefinitionBinding.php | 95 +- .../FHIROperationDefinitionOverload.php | 97 +- .../FHIROperationDefinitionParameter.php | 254 +- .../FHIROperationDefinitionReferencedFrom.php | 95 +- .../FHIROperationOutcomeIssue.php | 167 +- .../FHIROrganizationContact.php | 131 +- .../FHIRParametersParameter.php | 964 +++- .../FHIRPatient/FHIRPatientCommunication.php | 95 +- .../FHIRPatient/FHIRPatientContact.php | 184 +- .../FHIRPatient/FHIRPatientLink.php | 95 +- .../FHIRPaymentReconciliationDetail.php | 231 +- .../FHIRPaymentReconciliationProcessNote.php | 95 +- .../FHIRPerson/FHIRPersonLink.php | 95 +- .../FHIRPlanDefinitionAction.php | 663 ++- .../FHIRPlanDefinitionCondition.php | 95 +- .../FHIRPlanDefinitionDynamicValue.php | 95 +- .../FHIRPlanDefinitionGoal.php | 186 +- .../FHIRPlanDefinitionParticipant.php | 95 +- .../FHIRPlanDefinitionRelatedAction.php | 129 +- .../FHIRPlanDefinitionTarget.php | 146 +- .../FHIRBackboneElement/FHIRPopulation.php | 146 +- .../FHIRPractitionerQualification.php | 131 +- .../FHIRPractitionerRoleAvailableTime.php | 131 +- .../FHIRPractitionerRoleNotAvailable.php | 95 +- .../FHIRProcedureFocalDevice.php | 95 +- .../FHIRProcedure/FHIRProcedurePerformer.php | 112 +- .../FHIRProdCharacteristic.php | 254 +- .../FHIRProductShelfLife.php | 131 +- .../FHIRProvenance/FHIRProvenanceAgent.php | 131 +- .../FHIRProvenance/FHIRProvenanceEntity.php | 114 +- .../FHIRQuestionnaireAnswerOption.php | 180 +- .../FHIRQuestionnaireEnableWhen.php | 265 +- .../FHIRQuestionnaireInitial.php | 265 +- .../FHIRQuestionnaireItem.php | 343 +- .../FHIRQuestionnaireResponseAnswer.php | 284 +- .../FHIRQuestionnaireResponseItem.php | 150 +- .../FHIRRelatedPersonCommunication.php | 95 +- .../FHIRRequestGroupAction.php | 481 +- .../FHIRRequestGroupCondition.php | 95 +- .../FHIRRequestGroupRelatedAction.php | 129 +- ...esearchElementDefinitionCharacteristic.php | 420 +- .../FHIRResearchStudyArm.php | 112 +- .../FHIRResearchStudyObjective.php | 95 +- .../FHIRRiskAssessmentPrediction.php | 197 +- .../FHIRRiskEvidenceSynthesisCertainty.php | 118 +- ...EvidenceSynthesisCertaintySubcomponent.php | 116 +- ...RiskEvidenceSynthesisPrecisionEstimate.php | 129 +- .../FHIRRiskEvidenceSynthesisRiskEstimate.php | 182 +- .../FHIRRiskEvidenceSynthesisSampleSize.php | 112 +- .../FHIRSearchParameterComponent.php | 95 +- .../FHIRSpecimen/FHIRSpecimenCollection.php | 214 +- .../FHIRSpecimen/FHIRSpecimenContainer.php | 182 +- .../FHIRSpecimen/FHIRSpecimenProcessing.php | 148 +- .../FHIRSpecimenDefinitionAdditive.php | 95 +- .../FHIRSpecimenDefinitionContainer.php | 216 +- .../FHIRSpecimenDefinitionHandling.php | 129 +- .../FHIRSpecimenDefinitionTypeTested.php | 201 +- .../FHIRStructureDefinitionContext.php | 95 +- .../FHIRStructureDefinitionDifferential.php | 80 +- .../FHIRStructureDefinitionMapping.php | 129 +- .../FHIRStructureDefinitionSnapshot.php | 80 +- .../FHIRStructureMapDependent.php | 97 +- .../FHIRStructureMapGroup.php | 167 +- .../FHIRStructureMapInput.php | 129 +- .../FHIRStructureMapParameter.php | 146 +- .../FHIRStructureMap/FHIRStructureMapRule.php | 171 +- .../FHIRStructureMapSource.php | 1081 ++++- .../FHIRStructureMapStructure.php | 129 +- .../FHIRStructureMapTarget.php | 201 +- .../FHIRSubscriptionChannel.php | 131 +- .../FHIRSubstance/FHIRSubstanceIngredient.php | 112 +- .../FHIRSubstance/FHIRSubstanceInstance.php | 112 +- .../FHIRSubstanceAmount.php | 163 +- .../FHIRSubstanceAmountReferenceRange.php | 95 +- .../FHIRSubstanceNucleicAcidLinkage.php | 129 +- .../FHIRSubstanceNucleicAcidSubunit.php | 201 +- .../FHIRSubstanceNucleicAcidSugar.php | 112 +- ...SubstancePolymerDegreeOfPolymerisation.php | 95 +- .../FHIRSubstancePolymerMonomerSet.php | 97 +- .../FHIRSubstancePolymerRepeat.php | 131 +- .../FHIRSubstancePolymerRepeatUnit.php | 150 +- .../FHIRSubstancePolymerStartingMaterial.php | 129 +- ...bstancePolymerStructuralRepresentation.php | 112 +- .../FHIRSubstanceProteinSubunit.php | 197 +- ...anceReferenceInformationClassification.php | 133 +- .../FHIRSubstanceReferenceInformationGene.php | 114 +- ...bstanceReferenceInformationGeneElement.php | 114 +- ...HIRSubstanceReferenceInformationTarget.php | 233 +- .../FHIRSubstanceSourceMaterialAuthor.php | 95 +- ...tanceSourceMaterialFractionDescription.php | 95 +- .../FHIRSubstanceSourceMaterialHybrid.php | 146 +- .../FHIRSubstanceSourceMaterialOrganism.php | 199 +- ...SubstanceSourceMaterialOrganismGeneral.php | 129 +- ...SubstanceSourceMaterialPartDescription.php | 95 +- .../FHIRSubstanceSpecificationCode.php | 148 +- .../FHIRSubstanceSpecificationIsotope.php | 146 +- .../FHIRSubstanceSpecificationMoiety.php | 197 +- ...RSubstanceSpecificationMolecularWeight.php | 112 +- .../FHIRSubstanceSpecificationName.php | 262 +- .../FHIRSubstanceSpecificationOfficial.php | 112 +- .../FHIRSubstanceSpecificationProperty.php | 180 +- ...FHIRSubstanceSpecificationRelationship.php | 250 +- ...IRSubstanceSpecificationRepresentation.php | 112 +- .../FHIRSubstanceSpecificationStructure.php | 203 +- .../FHIRSupplyDeliverySuppliedItem.php | 112 +- .../FHIRSupplyRequestParameter.php | 146 +- .../FHIRTask/FHIRTaskInput.php | 928 +++- .../FHIRTask/FHIRTaskOutput.php | 928 +++- .../FHIRTask/FHIRTaskRestriction.php | 114 +- .../FHIRTerminologyCapabilitiesClosure.php | 78 +- .../FHIRTerminologyCapabilitiesCodeSystem.php | 114 +- .../FHIRTerminologyCapabilitiesExpansion.php | 148 +- .../FHIRTerminologyCapabilitiesFilter.php | 97 +- ...RTerminologyCapabilitiesImplementation.php | 95 +- .../FHIRTerminologyCapabilitiesParameter.php | 95 +- .../FHIRTerminologyCapabilitiesSoftware.php | 95 +- ...FHIRTerminologyCapabilitiesTranslation.php | 78 +- ...HIRTerminologyCapabilitiesValidateCode.php | 78 +- .../FHIRTerminologyCapabilitiesVersion.php | 169 +- .../FHIRTestReport/FHIRTestReportAction.php | 95 +- .../FHIRTestReport/FHIRTestReportAction1.php | 95 +- .../FHIRTestReport/FHIRTestReportAction2.php | 78 +- .../FHIRTestReport/FHIRTestReportAssert.php | 112 +- .../FHIRTestReportOperation.php | 112 +- .../FHIRTestReportParticipant.php | 112 +- .../FHIRTestReport/FHIRTestReportSetup.php | 80 +- .../FHIRTestReport/FHIRTestReportTeardown.php | 80 +- .../FHIRTestReport/FHIRTestReportTest.php | 114 +- .../FHIRTestScript/FHIRTestScriptAction.php | 95 +- .../FHIRTestScript/FHIRTestScriptAction1.php | 95 +- .../FHIRTestScript/FHIRTestScriptAction2.php | 78 +- .../FHIRTestScript/FHIRTestScriptAssert.php | 435 +- .../FHIRTestScriptCapability.php | 184 +- .../FHIRTestScriptDestination.php | 95 +- .../FHIRTestScript/FHIRTestScriptFixture.php | 112 +- .../FHIRTestScript/FHIRTestScriptLink.php | 95 +- .../FHIRTestScript/FHIRTestScriptMetadata.php | 99 +- .../FHIRTestScriptOperation.php | 352 +- .../FHIRTestScript/FHIRTestScriptOrigin.php | 95 +- .../FHIRTestScriptRequestHeader.php | 95 +- .../FHIRTestScript/FHIRTestScriptSetup.php | 80 +- .../FHIRTestScript/FHIRTestScriptTeardown.php | 80 +- .../FHIRTestScript/FHIRTestScriptTest.php | 114 +- .../FHIRTestScript/FHIRTestScriptVariable.php | 197 +- .../FHIRBackboneElement/FHIRTiming.php | 114 +- .../FHIRTiming/FHIRTimingRepeat.php | 356 +- .../FHIRValueSet/FHIRValueSetCompose.php | 133 +- .../FHIRValueSet/FHIRValueSetConcept.php | 114 +- .../FHIRValueSet/FHIRValueSetContains.php | 201 +- .../FHIRValueSet/FHIRValueSetDesignation.php | 112 +- .../FHIRValueSet/FHIRValueSetExpansion.php | 167 +- .../FHIRValueSet/FHIRValueSetFilter.php | 112 +- .../FHIRValueSet/FHIRValueSetInclude.php | 152 +- .../FHIRValueSet/FHIRValueSetParameter.php | 197 +- .../FHIRVerificationResultAttestation.php | 197 +- .../FHIRVerificationResultPrimarySource.php | 186 +- .../FHIRVerificationResultValidator.php | 112 +- ...HIRVisionPrescriptionLensSpecification.php | 303 +- .../FHIRVisionPrescriptionPrism.php | 95 +- .../R4/FHIRElement/FHIRBase64Binary.php | 66 +- .../R4/FHIRElement/FHIRBindingStrength.php | 66 +- ...FHIRBiologicallyDerivedProductCategory.php | 66 +- .../FHIRBiologicallyDerivedProductStatus.php | 66 +- ...BiologicallyDerivedProductStorageScale.php | 66 +- .../R4/FHIRElement/FHIRBoolean.php | 66 +- .../R4/FHIRElement/FHIRBundleType.php | 66 +- .../R4/FHIRElement/FHIRCanonical.php | 66 +- .../FHIRCapabilityStatementKind.php | 66 +- .../FHIRElement/FHIRCarePlanActivityKind.php | 66 +- .../FHIRCarePlanActivityStatus.php | 66 +- .../R4/FHIRElement/FHIRCarePlanIntent.php | 66 +- .../R4/FHIRElement/FHIRCareTeamStatus.php | 66 +- .../FHIRCatalogEntryRelationType.php | 66 +- .../R4/FHIRElement/FHIRChargeItemStatus.php | 66 +- .../FHIRElement/FHIRClaimProcessingCodes.php | 66 +- .../FHIRClinicalImpressionStatus.php | 66 +- .../R4/FHIRElement/FHIRCode.php | 66 +- .../R4/FHIRElement/FHIRCodeSearchSupport.php | 66 +- .../FHIRElement/FHIRCodeSystemContentMode.php | 66 +- .../FHIRCodeSystemHierarchyMeaning.php | 66 +- .../R4/FHIRElement/FHIRCodeableConcept.php | 85 +- .../R4/FHIRElement/FHIRCoding.php | 134 +- .../R4/FHIRElement/FHIRCompartmentType.php | 66 +- .../FHIRCompositionAttestationMode.php | 66 +- .../R4/FHIRElement/FHIRCompositionStatus.php | 66 +- .../FHIRElement/FHIRConceptMapEquivalence.php | 66 +- .../FHIRConceptMapGroupUnmappedMode.php | 66 +- .../FHIRConditionalDeleteStatus.php | 66 +- .../FHIRElement/FHIRConditionalReadStatus.php | 66 +- .../R4/FHIRElement/FHIRConsentDataMeaning.php | 66 +- .../FHIRElement/FHIRConsentProvisionType.php | 66 +- .../R4/FHIRElement/FHIRConsentState.php | 66 +- .../R4/FHIRElement/FHIRConstraintSeverity.php | 66 +- .../R4/FHIRElement/FHIRContactDetail.php | 85 +- .../R4/FHIRElement/FHIRContactPoint.php | 134 +- .../R4/FHIRElement/FHIRContactPointSystem.php | 66 +- .../R4/FHIRElement/FHIRContactPointUse.php | 66 +- ...ContractResourcePublicationStatusCodes.php | 66 +- .../FHIRContractResourceStatusCodes.php | 66 +- .../R4/FHIRElement/FHIRContributor.php | 102 +- .../R4/FHIRElement/FHIRContributorType.php | 66 +- .../R4/FHIRElement/FHIRDataRequirement.php | 212 +- .../FHIRDataRequirementCodeFilter.php | 119 +- .../FHIRDataRequirementDateFilter.php | 134 +- .../FHIRDataRequirementSort.php | 83 +- .../R4/FHIRElement/FHIRDate.php | 66 +- .../R4/FHIRElement/FHIRDateTime.php | 66 +- .../R4/FHIRElement/FHIRDaysOfWeek.php | 66 +- .../R4/FHIRElement/FHIRDecimal.php | 66 +- .../FHIRElement/FHIRDetectedIssueSeverity.php | 66 +- .../FHIRDeviceMetricCalibrationState.php | 66 +- .../FHIRDeviceMetricCalibrationType.php | 66 +- .../FHIRElement/FHIRDeviceMetricCategory.php | 66 +- .../R4/FHIRElement/FHIRDeviceMetricColor.php | 66 +- .../FHIRDeviceMetricOperationalStatus.php | 66 +- .../R4/FHIRElement/FHIRDeviceNameType.php | 66 +- .../FHIRDeviceUseStatementStatus.php | 66 +- .../FHIRDiagnosticReportStatus.php | 66 +- .../R4/FHIRElement/FHIRDiscriminatorType.php | 66 +- .../R4/FHIRElement/FHIRDocumentMode.php | 66 +- .../FHIRDocumentReferenceStatus.php | 66 +- .../FHIRDocumentRelationshipType.php | 66 +- .../FHIREligibilityRequestPurpose.php | 66 +- .../FHIREligibilityResponsePurpose.php | 66 +- .../R4/FHIRElement/FHIREnableWhenBehavior.php | 66 +- .../FHIREncounterLocationStatus.php | 66 +- .../R4/FHIRElement/FHIREncounterStatus.php | 66 +- .../R4/FHIRElement/FHIREndpointStatus.php | 66 +- .../FHIRElement/FHIREpisodeOfCareStatus.php | 66 +- .../FHIRElement/FHIREventCapabilityMode.php | 66 +- .../R4/FHIRElement/FHIREventStatus.php | 66 +- .../R4/FHIRElement/FHIREventTiming.php | 66 +- .../FHIRElement/FHIREvidenceVariableType.php | 66 +- .../FHIRExampleScenarioActorType.php | 66 +- .../FHIRExplanationOfBenefitStatus.php | 66 +- .../R4/FHIRElement/FHIRExposureState.php | 66 +- .../R4/FHIRElement/FHIRExpression.php | 134 +- .../R4/FHIRElement/FHIRExpressionLanguage.php | 66 +- .../R4/FHIRElement/FHIRExtension.php | 916 +++- .../FHIRElement/FHIRExtensionContextType.php | 66 +- .../R4/FHIRElement/FHIRFHIRDeviceStatus.php | 66 +- .../FHIRElement/FHIRFHIRSubstanceStatus.php | 66 +- .../R4/FHIRElement/FHIRFHIRVersion.php | 66 +- .../FHIRElement/FHIRFamilyHistoryStatus.php | 66 +- .../R4/FHIRElement/FHIRFilterOperator.php | 66 +- .../FHIRFinancialResourceStatusCodes.php | 66 +- .../R4/FHIRElement/FHIRFlagStatus.php | 66 +- .../FHIRElement/FHIRGoalLifecycleStatus.php | 66 +- .../FHIRElement/FHIRGraphCompartmentRule.php | 66 +- .../FHIRElement/FHIRGraphCompartmentUse.php | 66 +- .../R4/FHIRElement/FHIRGroupMeasure.php | 66 +- .../R4/FHIRElement/FHIRGroupType.php | 66 +- .../FHIRGuidanceResponseStatus.php | 66 +- .../FHIRElement/FHIRGuidePageGeneration.php | 66 +- .../R4/FHIRElement/FHIRGuideParameterCode.php | 66 +- .../R4/FHIRElement/FHIRHTTPVerb.php | 66 +- .../R4/FHIRElement/FHIRHumanName.php | 174 +- .../R4/FHIRElement/FHIRId.php | 66 +- .../R4/FHIRElement/FHIRIdentifier.php | 151 +- .../R4/FHIRElement/FHIRIdentifierUse.php | 66 +- .../FHIRIdentityAssuranceLevel.php | 66 +- .../R4/FHIRElement/FHIRImagingStudyStatus.php | 66 +- .../FHIRImmunizationEvaluationStatusCodes.php | 66 +- .../FHIRImmunizationStatusCodes.php | 66 +- .../R4/FHIRElement/FHIRInstant.php | 66 +- .../R4/FHIRElement/FHIRInteger.php | 66 +- .../FHIRInvoicePriceComponentType.php | 66 +- .../R4/FHIRElement/FHIRInvoiceStatus.php | 66 +- .../R4/FHIRElement/FHIRIssueSeverity.php | 66 +- .../R4/FHIRElement/FHIRIssueType.php | 66 +- .../R4/FHIRElement/FHIRLinkType.php | 66 +- .../R4/FHIRElement/FHIRLinkageType.php | 66 +- .../R4/FHIRElement/FHIRListMode.php | 66 +- .../R4/FHIRElement/FHIRListStatus.php | 66 +- .../R4/FHIRElement/FHIRLocationMode.php | 66 +- .../R4/FHIRElement/FHIRLocationStatus.php | 66 +- .../R4/FHIRElement/FHIRMarkdown.php | 66 +- .../FHIRElement/FHIRMeasureReportStatus.php | 66 +- .../R4/FHIRElement/FHIRMeasureReportType.php | 66 +- .../FHIRMedicationRequestIntent.php | 66 +- .../FHIRElement/FHIRMedicationStatusCodes.php | 66 +- .../FHIRMedicationrequestStatus.php | 66 +- .../FHIRMessageSignificanceCategory.php | 66 +- .../FHIRMessageheaderResponseRequest.php | 66 +- .../R4/FHIRElement/FHIRMeta.php | 157 +- .../R4/FHIRElement/FHIRMoney.php | 83 +- .../R4/FHIRElement/FHIRNameUse.php | 66 +- .../FHIRNamingSystemIdentifierType.php | 66 +- .../R4/FHIRElement/FHIRNamingSystemType.php | 66 +- .../R4/FHIRElement/FHIRNarrative.php | 83 +- .../R4/FHIRElement/FHIRNarrativeStatus.php | 66 +- .../R4/FHIRElement/FHIRNoteType.php | 66 +- .../FHIRElement/FHIRObservationDataType.php | 66 +- .../FHIRObservationRangeCategory.php | 66 +- .../R4/FHIRElement/FHIRObservationStatus.php | 66 +- .../R4/FHIRElement/FHIROid.php | 66 +- .../R4/FHIRElement/FHIROperationKind.php | 66 +- .../FHIRElement/FHIROperationParameterUse.php | 66 +- .../R4/FHIRElement/FHIROrientationType.php | 66 +- .../FHIRElement/FHIRParameterDefinition.php | 168 +- .../FHIRElement/FHIRParticipantRequired.php | 66 +- .../FHIRElement/FHIRParticipationStatus.php | 66 +- .../R4/FHIRElement/FHIRPeriod.php | 83 +- .../R4/FHIRElement/FHIRPositiveInt.php | 66 +- .../FHIRPropertyRepresentation.php | 66 +- .../R4/FHIRElement/FHIRPropertyType.php | 66 +- .../FHIRElement/FHIRProvenanceEntityRole.php | 66 +- .../R4/FHIRElement/FHIRPublicationStatus.php | 66 +- .../R4/FHIRElement/FHIRQualityType.php | 66 +- .../R4/FHIRElement/FHIRQuantity.php | 134 +- .../R4/FHIRElement/FHIRQuantity/FHIRAge.php | 109 +- .../R4/FHIRElement/FHIRQuantity/FHIRCount.php | 109 +- .../FHIRElement/FHIRQuantity/FHIRDistance.php | 109 +- .../FHIRElement/FHIRQuantity/FHIRDuration.php | 109 +- .../R4/FHIRElement/FHIRQuantityComparator.php | 66 +- .../FHIRQuestionnaireItemOperator.php | 66 +- .../FHIRElement/FHIRQuestionnaireItemType.php | 66 +- .../FHIRQuestionnaireResponseStatus.php | 66 +- .../R4/FHIRElement/FHIRRange.php | 83 +- .../R4/FHIRElement/FHIRRatio.php | 83 +- .../R4/FHIRElement/FHIRReference.php | 117 +- .../FHIRReferenceHandlingPolicy.php | 66 +- .../FHIRElement/FHIRReferenceVersionRules.php | 66 +- .../R4/FHIRElement/FHIRRelatedArtifact.php | 168 +- .../FHIRElement/FHIRRelatedArtifactType.php | 66 +- .../R4/FHIRElement/FHIRRemittanceOutcome.php | 66 +- .../R4/FHIRElement/FHIRRepositoryType.php | 66 +- .../R4/FHIRElement/FHIRRequestIntent.php | 66 +- .../R4/FHIRElement/FHIRRequestPriority.php | 66 +- .../FHIRElement/FHIRRequestResourceType.php | 66 +- .../R4/FHIRElement/FHIRRequestStatus.php | 66 +- .../FHIRElement/FHIRResearchElementType.php | 66 +- .../FHIRElement/FHIRResearchStudyStatus.php | 66 +- .../FHIRElement/FHIRResearchSubjectStatus.php | 66 +- .../R4/FHIRElement/FHIRResourceType.php | 66 +- .../FHIRElement/FHIRResourceVersionPolicy.php | 66 +- .../R4/FHIRElement/FHIRResponseType.php | 66 +- .../FHIRElement/FHIRRestfulCapabilityMode.php | 66 +- .../R4/FHIRElement/FHIRSPDXLicense.php | 66 +- .../R4/FHIRElement/FHIRSampledData.php | 168 +- .../FHIRElement/FHIRSampledDataDataType.php | 66 +- .../R4/FHIRElement/FHIRSearchComparator.php | 66 +- .../R4/FHIRElement/FHIRSearchEntryMode.php | 66 +- .../R4/FHIRElement/FHIRSearchModifierCode.php | 66 +- .../R4/FHIRElement/FHIRSearchParamType.php | 66 +- .../R4/FHIRElement/FHIRSequenceType.php | 66 +- .../R4/FHIRElement/FHIRSignature.php | 170 +- .../R4/FHIRElement/FHIRSlicingRules.php | 66 +- .../R4/FHIRElement/FHIRSlotStatus.php | 66 +- .../R4/FHIRElement/FHIRSortDirection.php | 66 +- .../FHIRSpecimenContainedPreference.php | 66 +- .../R4/FHIRElement/FHIRSpecimenStatus.php | 66 +- .../R4/FHIRElement/FHIRStatus.php | 66 +- .../R4/FHIRElement/FHIRStrandType.php | 66 +- .../R4/FHIRElement/FHIRString.php | 66 +- .../FHIRStructureDefinitionKind.php | 66 +- .../FHIRStructureMapContextType.php | 66 +- .../FHIRStructureMapGroupTypeMode.php | 66 +- .../FHIRElement/FHIRStructureMapInputMode.php | 66 +- .../FHIRElement/FHIRStructureMapModelMode.php | 66 +- .../FHIRStructureMapSourceListMode.php | 66 +- .../FHIRStructureMapTargetListMode.php | 66 +- .../FHIRElement/FHIRStructureMapTransform.php | 66 +- .../FHIRSubscriptionChannelType.php | 66 +- .../R4/FHIRElement/FHIRSubscriptionStatus.php | 66 +- .../FHIRElement/FHIRSupplyDeliveryStatus.php | 66 +- .../FHIRElement/FHIRSupplyRequestStatus.php | 66 +- .../FHIRSystemRestfulInteraction.php | 66 +- .../R4/FHIRElement/FHIRTaskIntent.php | 66 +- .../R4/FHIRElement/FHIRTaskStatus.php | 66 +- .../FHIRTestReportActionResult.php | 66 +- .../FHIRTestReportParticipantType.php | 66 +- .../R4/FHIRElement/FHIRTestReportResult.php | 66 +- .../R4/FHIRElement/FHIRTestReportStatus.php | 66 +- .../FHIRTestScriptRequestMethodCode.php | 66 +- .../R4/FHIRElement/FHIRTime.php | 66 +- .../R4/FHIRElement/FHIRTriggerDefinition.php | 187 +- .../R4/FHIRElement/FHIRTriggerType.php | 66 +- .../R4/FHIRElement/FHIRTypeDerivationRule.php | 66 +- .../FHIRTypeRestfulInteraction.php | 66 +- .../R4/FHIRElement/FHIRUDIEntryType.php | 66 +- .../R4/FHIRElement/FHIRUnitsOfTime.php | 66 +- .../R4/FHIRElement/FHIRUnsignedInt.php | 66 +- .../R4/FHIRElement/FHIRUri.php | 66 +- .../R4/FHIRElement/FHIRUrl.php | 66 +- .../R4/FHIRElement/FHIRUsageContext.php | 134 +- .../R4/FHIRElement/FHIRUse.php | 66 +- .../R4/FHIRElement/FHIRUuid.php | 66 +- .../FHIRVConfidentialityClassification.php | 66 +- .../R4/FHIRElement/FHIRVariableType.php | 66 +- .../R4/FHIRElement/FHIRVisionBase.php | 66 +- .../R4/FHIRElement/FHIRVisionEyes.php | 66 +- .../R4/FHIRElement/FHIRXPathUsageType.php | 66 +- .../PHPFHIRGenerated/R4/FHIRIdPrimitive.php | 38 +- .../R4/FHIRInstantPrimitive.php | 40 +- .../R4/FHIRIntegerPrimitive.php | 38 +- .../R4/FHIRMarkdownPrimitive.php | 38 +- .../PHPFHIRGenerated/R4/FHIROidPrimitive.php | 38 +- .../R4/FHIRPositiveIntPrimitive.php | 38 +- .../PHPFHIRGenerated/R4/FHIRResource.php | 46 +- .../R4/FHIRResource/FHIRBinary.php | 124 +- .../R4/FHIRResource/FHIRBundle.php | 196 +- .../R4/FHIRResource/FHIRDomainResource.php | 147 +- .../FHIRDomainResource/FHIRAccount.php | 316 +- .../FHIRActivityDefinition.php | 1058 ++++- .../FHIRDomainResource/FHIRAdverseEvent.php | 475 +- .../FHIRAllergyIntolerance.php | 469 +- .../FHIRDomainResource/FHIRAppointment.php | 517 ++- .../FHIRAppointmentResponse.php | 261 +- .../FHIRDomainResource/FHIRAuditEvent.php | 316 +- .../FHIRDomainResource/FHIRBasic.php | 208 +- .../FHIRBiologicallyDerivedProduct.php | 318 +- .../FHIRDomainResource/FHIRBodyStructure.php | 263 +- .../FHIRCapabilityStatement.php | 585 ++- .../FHIRDomainResource/FHIRCarePlan.php | 540 ++- .../FHIRDomainResource/FHIRCareTeam.php | 358 +- .../FHIRDomainResource/FHIRCatalogEntry.php | 354 +- .../FHIRDomainResource/FHIRChargeItem.php | 636 ++- .../FHIRChargeItemDefinition.php | 532 ++- .../FHIRDomainResource/FHIRClaim.php | 596 ++- .../FHIRDomainResource/FHIRClaimResponse.php | 598 ++- .../FHIRClinicalImpression.php | 496 ++- .../FHIRDomainResource/FHIRCodeSystem.php | 577 ++- .../FHIRDomainResource/FHIRCommunication.php | 540 ++- .../FHIRCommunicationRequest.php | 534 ++- .../FHIRCompartmentDefinition.php | 365 +- .../FHIRDomainResource/FHIRComposition.php | 388 +- .../FHIRDomainResource/FHIRConceptMap.php | 469 +- .../FHIRDomainResource/FHIRCondition.php | 558 ++- .../FHIRDomainResource/FHIRConsent.php | 371 +- .../FHIRDomainResource/FHIRContract.php | 744 +++- .../FHIRDomainResource/FHIRCoverage.php | 420 +- .../FHIRCoverageEligibilityRequest.php | 386 +- .../FHIRCoverageEligibilityResponse.php | 401 +- .../FHIRDomainResource/FHIRDetectedIssue.php | 350 +- .../FHIRDomainResource/FHIRDevice.php | 583 ++- .../FHIRDeviceDefinition.php | 538 ++- .../FHIRDomainResource/FHIRDeviceMetric.php | 295 +- .../FHIRDomainResource/FHIRDeviceRequest.php | 604 ++- .../FHIRDeviceUseStatement.php | 388 +- .../FHIRDiagnosticReport.php | 466 +- .../FHIRDocumentManifest.php | 335 +- .../FHIRDocumentReference.php | 405 +- .../FHIREffectEvidenceSynthesis.php | 710 ++- .../FHIRDomainResource/FHIREncounter.php | 538 ++- .../FHIRDomainResource/FHIREndpoint.php | 318 +- .../FHIREnrollmentRequest.php | 242 +- .../FHIREnrollmentResponse.php | 259 +- .../FHIRDomainResource/FHIREpisodeOfCare.php | 339 +- .../FHIREventDefinition.php | 636 ++- .../FHIRDomainResource/FHIREvidence.php | 623 ++- .../FHIREvidenceVariable.php | 604 ++- .../FHIRExampleScenario.php | 426 +- .../FHIRExplanationOfBenefit.php | 882 +++- .../FHIRFamilyMemberHistory.php | 577 ++- .../FHIRDomainResource/FHIRFlag.php | 261 +- .../FHIRDomainResource/FHIRGoal.php | 424 +- .../FHIRGraphDefinition.php | 384 +- .../FHIRDomainResource/FHIRGroup.php | 297 +- .../FHIRGuidanceResponse.php | 422 +- .../FHIRHealthcareService.php | 561 ++- .../FHIRDomainResource/FHIRImagingStudy.php | 481 +- .../FHIRDomainResource/FHIRImmunization.php | 634 ++- .../FHIRImmunizationEvaluation.php | 380 +- .../FHIRImmunizationRecommendation.php | 210 +- .../FHIRImplementationGuide.php | 473 +- .../FHIRDomainResource/FHIRInsurancePlan.php | 377 +- .../FHIRDomainResource/FHIRInvoice.php | 403 +- .../FHIRDomainResource/FHIRLibrary.php | 691 ++- .../FHIRDomainResource/FHIRLinkage.php | 174 +- .../FHIRDomainResource/FHIRList.php | 348 +- .../FHIRDomainResource/FHIRLocation.php | 422 +- .../FHIRDomainResource/FHIRMeasure.php | 865 +++- .../FHIRDomainResource/FHIRMeasureReport.php | 314 +- .../FHIRDomainResource/FHIRMedia.php | 522 ++- .../FHIRDomainResource/FHIRMedication.php | 261 +- .../FHIRMedicationAdministration.php | 500 ++- .../FHIRMedicationDispense.php | 583 ++- .../FHIRMedicationKnowledge.php | 525 ++- .../FHIRMedicationRequest.php | 725 ++- .../FHIRMedicationStatement.php | 462 +- .../FHIRMedicinalProduct.php | 489 +- .../FHIRMedicinalProductAuthorization.php | 401 +- .../FHIRMedicinalProductContraindication.php | 250 +- .../FHIRMedicinalProductIndication.php | 284 +- .../FHIRMedicinalProductIngredient.php | 227 +- .../FHIRMedicinalProductInteraction.php | 244 +- .../FHIRMedicinalProductManufactured.php | 246 +- .../FHIRMedicinalProductPackaged.php | 286 +- .../FHIRMedicinalProductPharmaceutical.php | 250 +- .../FHIRMedicinalProductUndesirableEffect.php | 210 +- .../FHIRMessageDefinition.php | 564 ++- .../FHIRDomainResource/FHIRMessageHeader.php | 329 +- .../FHIRMolecularSequence.php | 405 +- .../FHIRDomainResource/FHIRNamingSystem.php | 350 +- .../FHIRDomainResource/FHIRNutritionOrder.php | 428 +- .../FHIRDomainResource/FHIRObservation.php | 774 +++- .../FHIRObservationDefinition.php | 350 +- .../FHIROperationDefinition.php | 575 ++- .../FHIROperationOutcome.php | 140 +- .../FHIRDomainResource/FHIROrganization.php | 305 +- .../FHIROrganizationAffiliation.php | 341 +- .../FHIRDomainResource/FHIRPatient.php | 445 +- .../FHIRDomainResource/FHIRPaymentNotice.php | 327 +- .../FHIRPaymentReconciliation.php | 382 +- .../FHIRDomainResource/FHIRPerson.php | 301 +- .../FHIRDomainResource/FHIRPlanDefinition.php | 691 ++- .../FHIRDomainResource/FHIRPractitioner.php | 305 +- .../FHIRPractitionerRole.php | 377 +- .../FHIRDomainResource/FHIRProcedure.php | 699 ++- .../FHIRDomainResource/FHIRProvenance.php | 320 +- .../FHIRDomainResource/FHIRQuestionnaire.php | 511 ++- .../FHIRQuestionnaireResponse.php | 314 +- .../FHIRDomainResource/FHIRRelatedPerson.php | 339 +- .../FHIRDomainResource/FHIRRequestGroup.php | 445 +- .../FHIRResearchDefinition.php | 740 ++- .../FHIRResearchElementDefinition.php | 725 ++- .../FHIRDomainResource/FHIRResearchStudy.php | 559 ++- .../FHIRResearchSubject.php | 259 +- .../FHIRDomainResource/FHIRRiskAssessment.php | 439 +- .../FHIRRiskEvidenceSynthesis.php | 672 ++- .../FHIRDomainResource/FHIRSchedule.php | 267 +- .../FHIRSearchParameter.php | 581 ++- .../FHIRDomainResource/FHIRServiceRequest.php | 803 +++- .../FHIRDomainResource/FHIRSlot.php | 316 +- .../FHIRDomainResource/FHIRSpecimen.php | 356 +- .../FHIRSpecimenDefinition.php | 229 +- .../FHIRStructureDefinition.php | 596 ++- .../FHIRDomainResource/FHIRStructureMap.php | 441 +- .../FHIRDomainResource/FHIRSubscription.php | 242 +- .../FHIRDomainResource/FHIRSubstance.php | 248 +- .../FHIRSubstanceNucleicAcid.php | 208 +- .../FHIRSubstancePolymer.php | 231 +- .../FHIRSubstanceProtein.php | 193 +- .../FHIRSubstanceReferenceInformation.php | 214 +- .../FHIRSubstanceSourceMaterial.php | 354 +- .../FHIRSubstanceSpecification.php | 458 +- .../FHIRDomainResource/FHIRSupplyDelivery.php | 350 +- .../FHIRDomainResource/FHIRSupplyRequest.php | 437 +- .../FHIRDomainResource/FHIRTask.php | 666 ++- .../FHIRTerminologyCapabilities.php | 537 ++- .../FHIRDomainResource/FHIRTestReport.php | 329 +- .../FHIRDomainResource/FHIRTestScript.php | 547 ++- .../FHIRDomainResource/FHIRValueSet.php | 435 +- .../FHIRVerificationResult.php | 369 +- .../FHIRVisionPrescription.php | 261 +- .../R4/FHIRResource/FHIRParameters.php | 92 +- .../R4/FHIRResourceContainer.php | 756 +++- .../R4/FHIRSampledDataDataTypePrimitive.php | 38 +- .../R4/FHIRStringPrimitive.php | 38 +- .../PHPFHIRGenerated/R4/FHIRTimePrimitive.php | 40 +- .../R4/FHIRUnsignedIntPrimitive.php | 38 +- .../PHPFHIRGenerated/R4/FHIRUriPrimitive.php | 38 +- .../PHPFHIRGenerated/R4/FHIRUrlPrimitive.php | 38 +- .../PHPFHIRGenerated/R4/FHIRUuidPrimitive.php | 38 +- .../PHPFHIRGenerated/R4/PHPFHIRAutoloader.php | 5 +- .../R4/PHPFHIRCommentContainerInterface.php | 2 +- .../R4/PHPFHIRCommentContainerTrait.php | 2 +- .../PHPFHIRGenerated/R4/PHPFHIRConstants.php | 6 +- .../R4/PHPFHIRContainedTypeInterface.php | 2 +- .../R4/PHPFHIRResponseParser.php | 2 +- .../R4/PHPFHIRResponseParserConfig.php | 2 +- .../FHIRBase64BinaryPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRBooleanPrimitiveTest.php | 2 +- .../FHIRCanonicalPrimitiveTest.php | 2 +- .../FHIRAccountStatusListTest.php | 2 +- .../FHIRActionCardinalityBehaviorListTest.php | 2 +- .../FHIRActionConditionKindListTest.php | 2 +- .../FHIRActionGroupingBehaviorListTest.php | 2 +- .../FHIRActionParticipantTypeListTest.php | 2 +- .../FHIRActionPrecheckBehaviorListTest.php | 2 +- .../FHIRActionRelationshipTypeListTest.php | 2 +- .../FHIRActionRequiredBehaviorListTest.php | 2 +- .../FHIRActionSelectionBehaviorListTest.php | 2 +- .../FHIRAddressTypeListTest.php | 2 +- .../FHIRAddressUseListTest.php | 2 +- .../FHIRAdministrativeGenderListTest.php | 2 +- .../FHIRAdverseEventActualityListTest.php | 2 +- .../FHIRAggregationModeListTest.php | 2 +- ...FHIRAllergyIntoleranceCategoryListTest.php | 2 +- ...RAllergyIntoleranceCriticalityListTest.php | 2 +- ...FHIRAllergyIntoleranceSeverityListTest.php | 2 +- .../FHIRAllergyIntoleranceTypeListTest.php | 2 +- .../FHIRAppointmentStatusListTest.php | 2 +- .../FHIRAssertionDirectionTypeListTest.php | 2 +- .../FHIRAssertionOperatorTypeListTest.php | 2 +- .../FHIRAssertionResponseTypesListTest.php | 2 +- .../FHIRAuditEventActionListTest.php | 2 +- ...FHIRAuditEventAgentNetworkTypeListTest.php | 2 +- .../FHIRAuditEventOutcomeListTest.php | 2 +- .../FHIRBindingStrengthListTest.php | 2 +- ...ogicallyDerivedProductCategoryListTest.php | 2 +- ...ologicallyDerivedProductStatusListTest.php | 2 +- ...allyDerivedProductStorageScaleListTest.php | 2 +- .../FHIRBundleTypeListTest.php | 2 +- .../FHIRCapabilityStatementKindListTest.php | 2 +- .../FHIRCarePlanActivityKindListTest.php | 2 +- .../FHIRCarePlanActivityStatusListTest.php | 2 +- .../FHIRCarePlanIntentListTest.php | 2 +- .../FHIRCareTeamStatusListTest.php | 2 +- .../FHIRCatalogEntryRelationTypeListTest.php | 2 +- .../FHIRChargeItemStatusListTest.php | 2 +- .../FHIRClaimProcessingCodesListTest.php | 2 +- .../FHIRClinicalImpressionStatusListTest.php | 2 +- .../FHIRCodeSearchSupportListTest.php | 2 +- .../FHIRCodeSystemContentModeListTest.php | 2 +- ...FHIRCodeSystemHierarchyMeaningListTest.php | 2 +- .../FHIRCompartmentTypeListTest.php | 2 +- ...FHIRCompositionAttestationModeListTest.php | 2 +- .../FHIRCompositionStatusListTest.php | 2 +- .../FHIRConceptMapEquivalenceListTest.php | 2 +- ...HIRConceptMapGroupUnmappedModeListTest.php | 2 +- .../FHIRConditionalDeleteStatusListTest.php | 2 +- .../FHIRConditionalReadStatusListTest.php | 2 +- .../FHIRConsentDataMeaningListTest.php | 2 +- .../FHIRConsentProvisionTypeListTest.php | 2 +- .../FHIRConsentStateListTest.php | 2 +- .../FHIRConstraintSeverityListTest.php | 2 +- .../FHIRContactPointSystemListTest.php | 2 +- .../FHIRContactPointUseListTest.php | 2 +- ...ResourcePublicationStatusCodesListTest.php | 2 +- ...HIRContractResourceStatusCodesListTest.php | 2 +- .../FHIRContributorTypeListTest.php | 2 +- .../FHIRDaysOfWeekListTest.php | 2 +- .../FHIRDetectedIssueSeverityListTest.php | 2 +- ...IRDeviceMetricCalibrationStateListTest.php | 2 +- ...HIRDeviceMetricCalibrationTypeListTest.php | 2 +- .../FHIRDeviceMetricCategoryListTest.php | 2 +- .../FHIRDeviceMetricColorListTest.php | 2 +- ...RDeviceMetricOperationalStatusListTest.php | 2 +- .../FHIRDeviceNameTypeListTest.php | 2 +- .../FHIRDeviceUseStatementStatusListTest.php | 2 +- .../FHIRDiagnosticReportStatusListTest.php | 2 +- .../FHIRDiscriminatorTypeListTest.php | 2 +- .../FHIRDocumentModeListTest.php | 2 +- .../FHIRDocumentReferenceStatusListTest.php | 2 +- .../FHIRDocumentRelationshipTypeListTest.php | 2 +- .../FHIREligibilityRequestPurposeListTest.php | 2 +- ...FHIREligibilityResponsePurposeListTest.php | 2 +- .../FHIREnableWhenBehaviorListTest.php | 2 +- .../FHIREncounterLocationStatusListTest.php | 2 +- .../FHIREncounterStatusListTest.php | 2 +- .../FHIREndpointStatusListTest.php | 2 +- .../FHIREpisodeOfCareStatusListTest.php | 2 +- .../FHIREventCapabilityModeListTest.php | 2 +- .../FHIREventStatusListTest.php | 2 +- .../FHIREventTimingListTest.php | 2 +- .../FHIREvidenceVariableTypeListTest.php | 2 +- .../FHIRExampleScenarioActorTypeListTest.php | 2 +- ...FHIRExplanationOfBenefitStatusListTest.php | 2 +- .../FHIRExposureStateListTest.php | 2 +- .../FHIRExpressionLanguageListTest.php | 2 +- .../FHIRExtensionContextTypeListTest.php | 2 +- .../FHIRFHIRDeviceStatusListTest.php | 2 +- .../FHIRFHIRSubstanceStatusListTest.php | 2 +- .../FHIRFHIRVersionListTest.php | 2 +- .../FHIRFamilyHistoryStatusListTest.php | 2 +- .../FHIRFilterOperatorListTest.php | 2 +- ...IRFinancialResourceStatusCodesListTest.php | 2 +- .../FHIRFlagStatusListTest.php | 2 +- .../FHIRGoalLifecycleStatusListTest.php | 2 +- .../FHIRGraphCompartmentRuleListTest.php | 2 +- .../FHIRGraphCompartmentUseListTest.php | 2 +- .../FHIRGroupMeasureListTest.php | 2 +- .../FHIRGroupTypeListTest.php | 2 +- .../FHIRGuidanceResponseStatusListTest.php | 2 +- .../FHIRGuidePageGenerationListTest.php | 2 +- .../FHIRGuideParameterCodeListTest.php | 2 +- .../FHIRHTTPVerbListTest.php | 2 +- .../FHIRIdentifierUseListTest.php | 2 +- .../FHIRIdentityAssuranceLevelListTest.php | 2 +- .../FHIRImagingStudyStatusListTest.php | 2 +- ...unizationEvaluationStatusCodesListTest.php | 2 +- .../FHIRImmunizationStatusCodesListTest.php | 2 +- .../FHIRInvoicePriceComponentTypeListTest.php | 2 +- .../FHIRInvoiceStatusListTest.php | 2 +- .../FHIRIssueSeverityListTest.php | 2 +- .../FHIRIssueTypeListTest.php | 2 +- .../FHIRLinkTypeListTest.php | 2 +- .../FHIRLinkageTypeListTest.php | 2 +- .../FHIRListModeListTest.php | 2 +- .../FHIRListStatusListTest.php | 2 +- .../FHIRLocationModeListTest.php | 2 +- .../FHIRLocationStatusListTest.php | 2 +- .../FHIRMeasureReportStatusListTest.php | 2 +- .../FHIRMeasureReportTypeListTest.php | 2 +- .../FHIRMedicationRequestIntentListTest.php | 2 +- .../FHIRMedicationStatusCodesListTest.php | 2 +- .../FHIRMedicationrequestStatusListTest.php | 2 +- ...HIRMessageSignificanceCategoryListTest.php | 2 +- ...IRMessageheaderResponseRequestListTest.php | 2 +- .../FHIRCodePrimitive/FHIRNameUseListTest.php | 2 +- ...FHIRNamingSystemIdentifierTypeListTest.php | 2 +- .../FHIRNamingSystemTypeListTest.php | 2 +- .../FHIRNarrativeStatusListTest.php | 2 +- .../FHIRNoteTypeListTest.php | 2 +- .../FHIRObservationDataTypeListTest.php | 2 +- .../FHIRObservationRangeCategoryListTest.php | 2 +- .../FHIRObservationStatusListTest.php | 2 +- .../FHIROperationKindListTest.php | 2 +- .../FHIROperationParameterUseListTest.php | 2 +- .../FHIROrientationTypeListTest.php | 2 +- .../FHIRParticipantRequiredListTest.php | 2 +- .../FHIRParticipationStatusListTest.php | 2 +- .../FHIRPropertyRepresentationListTest.php | 2 +- .../FHIRPropertyTypeListTest.php | 2 +- .../FHIRProvenanceEntityRoleListTest.php | 2 +- .../FHIRPublicationStatusListTest.php | 2 +- .../FHIRQualityTypeListTest.php | 2 +- .../FHIRQuantityComparatorListTest.php | 2 +- .../FHIRQuestionnaireItemOperatorListTest.php | 2 +- .../FHIRQuestionnaireItemTypeListTest.php | 2 +- ...HIRQuestionnaireResponseStatusListTest.php | 2 +- .../FHIRReferenceHandlingPolicyListTest.php | 2 +- .../FHIRReferenceVersionRulesListTest.php | 2 +- .../FHIRRelatedArtifactTypeListTest.php | 2 +- .../FHIRRemittanceOutcomeListTest.php | 2 +- .../FHIRRepositoryTypeListTest.php | 2 +- .../FHIRRequestIntentListTest.php | 2 +- .../FHIRRequestPriorityListTest.php | 2 +- .../FHIRRequestResourceTypeListTest.php | 2 +- .../FHIRRequestStatusListTest.php | 2 +- .../FHIRResearchElementTypeListTest.php | 2 +- .../FHIRResearchStudyStatusListTest.php | 2 +- .../FHIRResearchSubjectStatusListTest.php | 2 +- .../FHIRResourceTypeListTest.php | 2 +- .../FHIRResourceVersionPolicyListTest.php | 2 +- .../FHIRResponseTypeListTest.php | 2 +- .../FHIRRestfulCapabilityModeListTest.php | 2 +- .../FHIRSPDXLicenseListTest.php | 2 +- .../FHIRSearchComparatorListTest.php | 2 +- .../FHIRSearchEntryModeListTest.php | 2 +- .../FHIRSearchModifierCodeListTest.php | 2 +- .../FHIRSearchParamTypeListTest.php | 2 +- .../FHIRSequenceTypeListTest.php | 2 +- .../FHIRSlicingRulesListTest.php | 2 +- .../FHIRSlotStatusListTest.php | 2 +- .../FHIRSortDirectionListTest.php | 2 +- ...HIRSpecimenContainedPreferenceListTest.php | 2 +- .../FHIRSpecimenStatusListTest.php | 2 +- .../FHIRCodePrimitive/FHIRStatusListTest.php | 2 +- .../FHIRStrandTypeListTest.php | 2 +- .../FHIRStructureDefinitionKindListTest.php | 2 +- .../FHIRStructureMapContextTypeListTest.php | 2 +- .../FHIRStructureMapGroupTypeModeListTest.php | 2 +- .../FHIRStructureMapInputModeListTest.php | 2 +- .../FHIRStructureMapModelModeListTest.php | 2 +- ...FHIRStructureMapSourceListModeListTest.php | 2 +- ...FHIRStructureMapTargetListModeListTest.php | 2 +- .../FHIRStructureMapTransformListTest.php | 2 +- .../FHIRSubscriptionChannelTypeListTest.php | 2 +- .../FHIRSubscriptionStatusListTest.php | 2 +- .../FHIRSupplyDeliveryStatusListTest.php | 2 +- .../FHIRSupplyRequestStatusListTest.php | 2 +- .../FHIRSystemRestfulInteractionListTest.php | 2 +- .../FHIRTaskIntentListTest.php | 2 +- .../FHIRTaskStatusListTest.php | 2 +- .../FHIRTestReportActionResultListTest.php | 2 +- .../FHIRTestReportParticipantTypeListTest.php | 2 +- .../FHIRTestReportResultListTest.php | 2 +- .../FHIRTestReportStatusListTest.php | 2 +- ...HIRTestScriptRequestMethodCodeListTest.php | 2 +- .../FHIRTriggerTypeListTest.php | 2 +- .../FHIRTypeDerivationRuleListTest.php | 2 +- .../FHIRTypeRestfulInteractionListTest.php | 2 +- .../FHIRUDIEntryTypeListTest.php | 2 +- .../FHIRUnitsOfTimeListTest.php | 2 +- .../FHIRCodePrimitive/FHIRUseListTest.php | 2 +- ...VConfidentialityClassificationListTest.php | 2 +- .../FHIRVariableTypeListTest.php | 2 +- .../FHIRVisionBaseListTest.php | 2 +- .../FHIRVisionEyesListTest.php | 2 +- .../FHIRXPathUsageTypeListTest.php | 2 +- .../R4/PHPFHIRTests/FHIRCodePrimitiveTest.php | 2 +- .../R4/PHPFHIRTests/FHIRDatePrimitiveTest.php | 2 +- .../FHIRDateTimePrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRDecimalPrimitiveTest.php | 2 +- .../FHIRElement/FHIRAccountStatusTest.php | 2 +- .../FHIRActionCardinalityBehaviorTest.php | 2 +- .../FHIRActionConditionKindTest.php | 2 +- .../FHIRActionGroupingBehaviorTest.php | 2 +- .../FHIRActionParticipantTypeTest.php | 2 +- .../FHIRActionPrecheckBehaviorTest.php | 2 +- .../FHIRActionRelationshipTypeTest.php | 2 +- .../FHIRActionRequiredBehaviorTest.php | 2 +- .../FHIRActionSelectionBehaviorTest.php | 2 +- .../FHIRElement/FHIRAddressTest.php | 2 +- .../FHIRElement/FHIRAddressTypeTest.php | 2 +- .../FHIRElement/FHIRAddressUseTest.php | 2 +- .../FHIRAdministrativeGenderTest.php | 2 +- .../FHIRAdverseEventActualityTest.php | 2 +- .../FHIRElement/FHIRAggregationModeTest.php | 2 +- .../FHIRAllergyIntoleranceCategoryTest.php | 2 +- .../FHIRAllergyIntoleranceCriticalityTest.php | 2 +- .../FHIRAllergyIntoleranceSeverityTest.php | 2 +- .../FHIRAllergyIntoleranceTypeTest.php | 2 +- .../FHIRElement/FHIRAnnotationTest.php | 2 +- .../FHIRElement/FHIRAppointmentStatusTest.php | 2 +- .../FHIRAssertionDirectionTypeTest.php | 2 +- .../FHIRAssertionOperatorTypeTest.php | 2 +- .../FHIRAssertionResponseTypesTest.php | 2 +- .../FHIRElement/FHIRAttachmentTest.php | 2 +- .../FHIRElement/FHIRAuditEventActionTest.php | 2 +- .../FHIRAuditEventAgentNetworkTypeTest.php | 2 +- .../FHIRElement/FHIRAuditEventOutcomeTest.php | 2 +- .../FHIRAccount/FHIRAccountCoverageTest.php | 2 +- .../FHIRAccount/FHIRAccountGuarantorTest.php | 2 +- ...FHIRActivityDefinitionDynamicValueTest.php | 2 +- .../FHIRActivityDefinitionParticipantTest.php | 2 +- .../FHIRAdverseEventCausalityTest.php | 2 +- .../FHIRAdverseEventSuspectEntityTest.php | 2 +- .../FHIRAllergyIntoleranceReactionTest.php | 2 +- .../FHIRAppointmentParticipantTest.php | 2 +- .../FHIRAuditEventAgentTest.php | 2 +- .../FHIRAuditEventDetailTest.php | 2 +- .../FHIRAuditEventEntityTest.php | 2 +- .../FHIRAuditEventNetworkTest.php | 2 +- .../FHIRAuditEventSourceTest.php | 2 +- ...ologicallyDerivedProductCollectionTest.php | 2 +- ...ogicallyDerivedProductManipulationTest.php | 2 +- ...ologicallyDerivedProductProcessingTest.php | 2 +- ...RBiologicallyDerivedProductStorageTest.php | 2 +- .../FHIRBundle/FHIRBundleEntryTest.php | 2 +- .../FHIRBundle/FHIRBundleLinkTest.php | 2 +- .../FHIRBundle/FHIRBundleRequestTest.php | 2 +- .../FHIRBundle/FHIRBundleResponseTest.php | 2 +- .../FHIRBundle/FHIRBundleSearchTest.php | 2 +- .../FHIRCapabilityStatementDocumentTest.php | 2 +- .../FHIRCapabilityStatementEndpointTest.php | 2 +- ...RCapabilityStatementImplementationTest.php | 2 +- ...HIRCapabilityStatementInteraction1Test.php | 2 +- ...FHIRCapabilityStatementInteractionTest.php | 2 +- .../FHIRCapabilityStatementMessagingTest.php | 2 +- .../FHIRCapabilityStatementOperationTest.php | 2 +- .../FHIRCapabilityStatementResourceTest.php | 2 +- .../FHIRCapabilityStatementRestTest.php | 2 +- ...FHIRCapabilityStatementSearchParamTest.php | 2 +- .../FHIRCapabilityStatementSecurityTest.php | 2 +- .../FHIRCapabilityStatementSoftwareTest.php | 2 +- ...apabilityStatementSupportedMessageTest.php | 2 +- .../FHIRCarePlan/FHIRCarePlanActivityTest.php | 2 +- .../FHIRCarePlan/FHIRCarePlanDetailTest.php | 2 +- .../FHIRCareTeamParticipantTest.php | 2 +- .../FHIRCatalogEntryRelatedEntryTest.php | 2 +- .../FHIRChargeItemPerformerTest.php | 2 +- ...RChargeItemDefinitionApplicabilityTest.php | 2 +- ...ChargeItemDefinitionPriceComponentTest.php | 2 +- ...RChargeItemDefinitionPropertyGroupTest.php | 2 +- .../FHIRClaim/FHIRClaimAccidentTest.php | 2 +- .../FHIRClaim/FHIRClaimCareTeamTest.php | 2 +- .../FHIRClaim/FHIRClaimDetailTest.php | 2 +- .../FHIRClaim/FHIRClaimDiagnosisTest.php | 2 +- .../FHIRClaim/FHIRClaimInsuranceTest.php | 2 +- .../FHIRClaim/FHIRClaimItemTest.php | 2 +- .../FHIRClaim/FHIRClaimPayeeTest.php | 2 +- .../FHIRClaim/FHIRClaimProcedureTest.php | 2 +- .../FHIRClaim/FHIRClaimRelatedTest.php | 2 +- .../FHIRClaim/FHIRClaimSubDetailTest.php | 2 +- .../FHIRClaim/FHIRClaimSupportingInfoTest.php | 2 +- .../FHIRClaimResponseAddItemTest.php | 2 +- .../FHIRClaimResponseAdjudicationTest.php | 2 +- .../FHIRClaimResponseDetail1Test.php | 2 +- .../FHIRClaimResponseDetailTest.php | 2 +- .../FHIRClaimResponseErrorTest.php | 2 +- .../FHIRClaimResponseInsuranceTest.php | 2 +- .../FHIRClaimResponseItemTest.php | 2 +- .../FHIRClaimResponsePaymentTest.php | 2 +- .../FHIRClaimResponseProcessNoteTest.php | 2 +- .../FHIRClaimResponseSubDetail1Test.php | 2 +- .../FHIRClaimResponseSubDetailTest.php | 2 +- .../FHIRClaimResponseTotalTest.php | 2 +- .../FHIRClinicalImpressionFindingTest.php | 2 +- ...HIRClinicalImpressionInvestigationTest.php | 2 +- .../FHIRCodeSystemConceptTest.php | 2 +- .../FHIRCodeSystemDesignationTest.php | 2 +- .../FHIRCodeSystemFilterTest.php | 2 +- .../FHIRCodeSystemProperty1Test.php | 2 +- .../FHIRCodeSystemPropertyTest.php | 2 +- .../FHIRCommunicationPayloadTest.php | 2 +- .../FHIRCommunicationRequestPayloadTest.php | 2 +- .../FHIRCompartmentDefinitionResourceTest.php | 2 +- .../FHIRCompositionAttesterTest.php | 2 +- .../FHIRCompositionEventTest.php | 2 +- .../FHIRCompositionRelatesToTest.php | 2 +- .../FHIRCompositionSectionTest.php | 2 +- .../FHIRConceptMapDependsOnTest.php | 2 +- .../FHIRConceptMapElementTest.php | 2 +- .../FHIRConceptMapGroupTest.php | 2 +- .../FHIRConceptMapTargetTest.php | 2 +- .../FHIRConceptMapUnmappedTest.php | 2 +- .../FHIRConditionEvidenceTest.php | 2 +- .../FHIRCondition/FHIRConditionStageTest.php | 2 +- .../FHIRConsent/FHIRConsentActorTest.php | 2 +- .../FHIRConsent/FHIRConsentDataTest.php | 2 +- .../FHIRConsent/FHIRConsentPolicyTest.php | 2 +- .../FHIRConsent/FHIRConsentProvisionTest.php | 2 +- .../FHIRConsentVerificationTest.php | 2 +- .../FHIRContract/FHIRContractActionTest.php | 2 +- .../FHIRContract/FHIRContractAnswerTest.php | 2 +- .../FHIRContract/FHIRContractAssetTest.php | 2 +- .../FHIRContractContentDefinitionTest.php | 2 +- .../FHIRContract/FHIRContractContextTest.php | 2 +- .../FHIRContract/FHIRContractFriendlyTest.php | 2 +- .../FHIRContract/FHIRContractLegalTest.php | 2 +- .../FHIRContract/FHIRContractOfferTest.php | 2 +- .../FHIRContract/FHIRContractPartyTest.php | 2 +- .../FHIRContract/FHIRContractRuleTest.php | 2 +- .../FHIRContractSecurityLabelTest.php | 2 +- .../FHIRContract/FHIRContractSignerTest.php | 2 +- .../FHIRContract/FHIRContractSubjectTest.php | 2 +- .../FHIRContract/FHIRContractTermTest.php | 2 +- .../FHIRContractValuedItemTest.php | 2 +- .../FHIRCoverage/FHIRCoverageClassTest.php | 2 +- .../FHIRCoverageCostToBeneficiaryTest.php | 2 +- .../FHIRCoverageExceptionTest.php | 2 +- ...overageEligibilityRequestDiagnosisTest.php | 2 +- ...overageEligibilityRequestInsuranceTest.php | 2 +- ...FHIRCoverageEligibilityRequestItemTest.php | 2 +- ...geEligibilityRequestSupportingInfoTest.php | 2 +- ...CoverageEligibilityResponseBenefitTest.php | 2 +- ...IRCoverageEligibilityResponseErrorTest.php | 2 +- ...verageEligibilityResponseInsuranceTest.php | 2 +- ...HIRCoverageEligibilityResponseItemTest.php | 2 +- .../FHIRDetectedIssueEvidenceTest.php | 2 +- .../FHIRDetectedIssueMitigationTest.php | 2 +- .../FHIRDevice/FHIRDeviceDeviceNameTest.php | 2 +- .../FHIRDevice/FHIRDevicePropertyTest.php | 2 +- .../FHIRDeviceSpecializationTest.php | 2 +- .../FHIRDevice/FHIRDeviceUdiCarrierTest.php | 2 +- .../FHIRDevice/FHIRDeviceVersionTest.php | 2 +- .../FHIRDeviceDefinitionCapabilityTest.php | 2 +- .../FHIRDeviceDefinitionDeviceNameTest.php | 2 +- .../FHIRDeviceDefinitionMaterialTest.php | 2 +- .../FHIRDeviceDefinitionPropertyTest.php | 2 +- ...FHIRDeviceDefinitionSpecializationTest.php | 2 +- ...eviceDefinitionUdiDeviceIdentifierTest.php | 2 +- .../FHIRDeviceMetricCalibrationTest.php | 2 +- .../FHIRDeviceRequestParameterTest.php | 2 +- .../FHIRDiagnosticReportMediaTest.php | 2 +- .../FHIRDocumentManifestRelatedTest.php | 2 +- .../FHIRDocumentReferenceContentTest.php | 2 +- .../FHIRDocumentReferenceContextTest.php | 2 +- .../FHIRDocumentReferenceRelatesToTest.php | 2 +- .../FHIRDosage/FHIRDosageDoseAndRateTest.php | 2 +- .../FHIRBackboneElement/FHIRDosageTest.php | 2 +- ...enceSynthesisCertaintySubcomponentTest.php | 2 +- ...IREffectEvidenceSynthesisCertaintyTest.php | 2 +- ...ectEvidenceSynthesisEffectEstimateTest.php | 2 +- ...EvidenceSynthesisPrecisionEstimateTest.php | 2 +- ...EvidenceSynthesisResultsByExposureTest.php | 2 +- ...REffectEvidenceSynthesisSampleSizeTest.php | 2 +- .../FHIRElementDefinitionBaseTest.php | 2 +- .../FHIRElementDefinitionBindingTest.php | 2 +- .../FHIRElementDefinitionConstraintTest.php | 2 +- ...FHIRElementDefinitionDiscriminatorTest.php | 2 +- .../FHIRElementDefinitionExampleTest.php | 2 +- .../FHIRElementDefinitionMappingTest.php | 2 +- .../FHIRElementDefinitionSlicingTest.php | 2 +- .../FHIRElementDefinitionTypeTest.php | 2 +- .../FHIRElementDefinitionTest.php | 2 +- .../FHIREncounterClassHistoryTest.php | 2 +- .../FHIREncounterDiagnosisTest.php | 2 +- .../FHIREncounterHospitalizationTest.php | 2 +- .../FHIREncounterLocationTest.php | 2 +- .../FHIREncounterParticipantTest.php | 2 +- .../FHIREncounterStatusHistoryTest.php | 2 +- .../FHIREpisodeOfCareDiagnosisTest.php | 2 +- .../FHIREpisodeOfCareStatusHistoryTest.php | 2 +- ...FHIREvidenceVariableCharacteristicTest.php | 2 +- .../FHIRExampleScenarioActorTest.php | 2 +- .../FHIRExampleScenarioAlternativeTest.php | 2 +- ...IRExampleScenarioContainedInstanceTest.php | 2 +- .../FHIRExampleScenarioInstanceTest.php | 2 +- .../FHIRExampleScenarioOperationTest.php | 2 +- .../FHIRExampleScenarioProcessTest.php | 2 +- .../FHIRExampleScenarioStepTest.php | 2 +- .../FHIRExampleScenarioVersionTest.php | 2 +- .../FHIRExplanationOfBenefitAccidentTest.php | 2 +- .../FHIRExplanationOfBenefitAddItemTest.php | 2 +- ...IRExplanationOfBenefitAdjudicationTest.php | 2 +- ...ExplanationOfBenefitBenefitBalanceTest.php | 2 +- .../FHIRExplanationOfBenefitCareTeamTest.php | 2 +- .../FHIRExplanationOfBenefitDetail1Test.php | 2 +- .../FHIRExplanationOfBenefitDetailTest.php | 2 +- .../FHIRExplanationOfBenefitDiagnosisTest.php | 2 +- .../FHIRExplanationOfBenefitFinancialTest.php | 2 +- .../FHIRExplanationOfBenefitInsuranceTest.php | 2 +- .../FHIRExplanationOfBenefitItemTest.php | 2 +- .../FHIRExplanationOfBenefitPayeeTest.php | 2 +- .../FHIRExplanationOfBenefitPaymentTest.php | 2 +- .../FHIRExplanationOfBenefitProcedureTest.php | 2 +- ...HIRExplanationOfBenefitProcessNoteTest.php | 2 +- .../FHIRExplanationOfBenefitRelatedTest.php | 2 +- ...FHIRExplanationOfBenefitSubDetail1Test.php | 2 +- .../FHIRExplanationOfBenefitSubDetailTest.php | 2 +- ...ExplanationOfBenefitSupportingInfoTest.php | 2 +- .../FHIRExplanationOfBenefitTotalTest.php | 2 +- .../FHIRFamilyMemberHistoryConditionTest.php | 2 +- .../FHIRGoal/FHIRGoalTargetTest.php | 2 +- .../FHIRGraphDefinitionCompartmentTest.php | 2 +- .../FHIRGraphDefinitionLinkTest.php | 2 +- .../FHIRGraphDefinitionTargetTest.php | 2 +- .../FHIRGroup/FHIRGroupCharacteristicTest.php | 2 +- .../FHIRGroup/FHIRGroupMemberTest.php | 2 +- ...FHIRHealthcareServiceAvailableTimeTest.php | 2 +- .../FHIRHealthcareServiceEligibilityTest.php | 2 +- .../FHIRHealthcareServiceNotAvailableTest.php | 2 +- .../FHIRImagingStudyInstanceTest.php | 2 +- .../FHIRImagingStudyPerformerTest.php | 2 +- .../FHIRImagingStudySeriesTest.php | 2 +- .../FHIRImmunizationEducationTest.php | 2 +- .../FHIRImmunizationPerformerTest.php | 2 +- .../FHIRImmunizationProtocolAppliedTest.php | 2 +- .../FHIRImmunizationReactionTest.php | 2 +- ...izationRecommendationDateCriterionTest.php | 2 +- ...zationRecommendationRecommendationTest.php | 2 +- .../FHIRImplementationGuideDefinitionTest.php | 2 +- .../FHIRImplementationGuideDependsOnTest.php | 2 +- .../FHIRImplementationGuideGlobalTest.php | 2 +- .../FHIRImplementationGuideGroupingTest.php | 2 +- .../FHIRImplementationGuideManifestTest.php | 2 +- .../FHIRImplementationGuidePage1Test.php | 2 +- .../FHIRImplementationGuidePageTest.php | 2 +- .../FHIRImplementationGuideParameterTest.php | 2 +- .../FHIRImplementationGuideResource1Test.php | 2 +- .../FHIRImplementationGuideResourceTest.php | 2 +- .../FHIRImplementationGuideTemplateTest.php | 2 +- .../FHIRInsurancePlanBenefit1Test.php | 2 +- .../FHIRInsurancePlanBenefitTest.php | 2 +- .../FHIRInsurancePlanContactTest.php | 2 +- .../FHIRInsurancePlanCostTest.php | 2 +- .../FHIRInsurancePlanCoverageTest.php | 2 +- .../FHIRInsurancePlanGeneralCostTest.php | 2 +- .../FHIRInsurancePlanLimitTest.php | 2 +- .../FHIRInsurancePlanPlanTest.php | 2 +- .../FHIRInsurancePlanSpecificCostTest.php | 2 +- .../FHIRInvoice/FHIRInvoiceLineItemTest.php | 2 +- .../FHIRInvoiceParticipantTest.php | 2 +- .../FHIRInvoicePriceComponentTest.php | 2 +- .../FHIRLinkage/FHIRLinkageItemTest.php | 2 +- .../FHIRList/FHIRListEntryTest.php | 2 +- .../FHIRLocationHoursOfOperationTest.php | 2 +- .../FHIRLocation/FHIRLocationPositionTest.php | 2 +- .../FHIRMarketingStatusTest.php | 2 +- .../FHIRMeasure/FHIRMeasureComponentTest.php | 2 +- .../FHIRMeasure/FHIRMeasureGroupTest.php | 2 +- .../FHIRMeasure/FHIRMeasurePopulationTest.php | 2 +- .../FHIRMeasure/FHIRMeasureStratifierTest.php | 2 +- .../FHIRMeasureSupplementalDataTest.php | 2 +- .../FHIRMeasureReportComponentTest.php | 2 +- .../FHIRMeasureReportGroupTest.php | 2 +- .../FHIRMeasureReportPopulation1Test.php | 2 +- .../FHIRMeasureReportPopulationTest.php | 2 +- .../FHIRMeasureReportStratifierTest.php | 2 +- .../FHIRMeasureReportStratumTest.php | 2 +- .../FHIRMedicationBatchTest.php | 2 +- .../FHIRMedicationIngredientTest.php | 2 +- ...FHIRMedicationAdministrationDosageTest.php | 2 +- ...RMedicationAdministrationPerformerTest.php | 2 +- .../FHIRMedicationDispensePerformerTest.php | 2 +- ...FHIRMedicationDispenseSubstitutionTest.php | 2 +- ...nKnowledgeAdministrationGuidelinesTest.php | 2 +- .../FHIRMedicationKnowledgeCostTest.php | 2 +- .../FHIRMedicationKnowledgeDosageTest.php | 2 +- ...icationKnowledgeDrugCharacteristicTest.php | 2 +- .../FHIRMedicationKnowledgeIngredientTest.php | 2 +- .../FHIRMedicationKnowledgeKineticsTest.php | 2 +- ...FHIRMedicationKnowledgeMaxDispenseTest.php | 2 +- ...ionKnowledgeMedicineClassificationTest.php | 2 +- ...dicationKnowledgeMonitoringProgramTest.php | 2 +- .../FHIRMedicationKnowledgeMonographTest.php | 2 +- .../FHIRMedicationKnowledgePackagingTest.php | 2 +- ...ionKnowledgePatientCharacteristicsTest.php | 2 +- .../FHIRMedicationKnowledgeRegulatoryTest.php | 2 +- ...nowledgeRelatedMedicationKnowledgeTest.php | 2 +- .../FHIRMedicationKnowledgeScheduleTest.php | 2 +- ...HIRMedicationKnowledgeSubstitutionTest.php | 2 +- ...IRMedicationRequestDispenseRequestTest.php | 2 +- .../FHIRMedicationRequestInitialFillTest.php | 2 +- .../FHIRMedicationRequestSubstitutionTest.php | 2 +- ...HIRMedicinalProductCountryLanguageTest.php | 2 +- ...ductManufacturingBusinessOperationTest.php | 2 +- .../FHIRMedicinalProductNamePartTest.php | 2 +- .../FHIRMedicinalProductNameTest.php | 2 +- ...MedicinalProductSpecialDesignationTest.php | 2 +- ...izationJurisdictionalAuthorizationTest.php | 2 +- ...cinalProductAuthorizationProcedureTest.php | 2 +- ...roductContraindicationOtherTherapyTest.php | 2 +- ...cinalProductIndicationOtherTherapyTest.php | 2 +- ...ProductIngredientReferenceStrengthTest.php | 2 +- ...roductIngredientSpecifiedSubstanceTest.php | 2 +- ...MedicinalProductIngredientStrengthTest.php | 2 +- ...edicinalProductIngredientSubstanceTest.php | 2 +- ...cinalProductInteractionInteractantTest.php | 2 +- ...inalProductPackagedBatchIdentifierTest.php | 2 +- ...edicinalProductPackagedPackageItemTest.php | 2 +- ...oductPharmaceuticalCharacteristicsTest.php | 2 +- ...harmaceuticalRouteOfAdministrationTest.php | 2 +- ...ProductPharmaceuticalTargetSpeciesTest.php | 2 +- ...ductPharmaceuticalWithdrawalPeriodTest.php | 2 +- ...IRMessageDefinitionAllowedResponseTest.php | 2 +- .../FHIRMessageDefinitionFocusTest.php | 2 +- .../FHIRMessageHeaderDestinationTest.php | 2 +- .../FHIRMessageHeaderResponseTest.php | 2 +- .../FHIRMessageHeaderSourceTest.php | 2 +- .../FHIRMolecularSequenceInnerTest.php | 2 +- .../FHIRMolecularSequenceOuterTest.php | 2 +- .../FHIRMolecularSequenceQualityTest.php | 2 +- .../FHIRMolecularSequenceReferenceSeqTest.php | 2 +- .../FHIRMolecularSequenceRepositoryTest.php | 2 +- .../FHIRMolecularSequenceRocTest.php | 2 +- ...RMolecularSequenceStructureVariantTest.php | 2 +- .../FHIRMolecularSequenceVariantTest.php | 2 +- .../FHIRNamingSystemUniqueIdTest.php | 2 +- .../FHIRNutritionOrderAdministrationTest.php | 2 +- .../FHIRNutritionOrderEnteralFormulaTest.php | 2 +- .../FHIRNutritionOrderNutrientTest.php | 2 +- .../FHIRNutritionOrderOralDietTest.php | 2 +- .../FHIRNutritionOrderSupplementTest.php | 2 +- .../FHIRNutritionOrderTextureTest.php | 2 +- .../FHIRObservationComponentTest.php | 2 +- .../FHIRObservationReferenceRangeTest.php | 2 +- ...rvationDefinitionQualifiedIntervalTest.php | 2 +- ...ationDefinitionQuantitativeDetailsTest.php | 2 +- .../FHIROperationDefinitionBindingTest.php | 2 +- .../FHIROperationDefinitionOverloadTest.php | 2 +- .../FHIROperationDefinitionParameterTest.php | 2 +- ...ROperationDefinitionReferencedFromTest.php | 2 +- .../FHIROperationOutcomeIssueTest.php | 2 +- .../FHIROrganizationContactTest.php | 2 +- .../FHIRParametersParameterTest.php | 2 +- .../FHIRPatientCommunicationTest.php | 2 +- .../FHIRPatient/FHIRPatientContactTest.php | 2 +- .../FHIRPatient/FHIRPatientLinkTest.php | 2 +- .../FHIRPaymentReconciliationDetailTest.php | 2 +- ...IRPaymentReconciliationProcessNoteTest.php | 2 +- .../FHIRPerson/FHIRPersonLinkTest.php | 2 +- .../FHIRPlanDefinitionActionTest.php | 2 +- .../FHIRPlanDefinitionConditionTest.php | 2 +- .../FHIRPlanDefinitionDynamicValueTest.php | 2 +- .../FHIRPlanDefinitionGoalTest.php | 2 +- .../FHIRPlanDefinitionParticipantTest.php | 2 +- .../FHIRPlanDefinitionRelatedActionTest.php | 2 +- .../FHIRPlanDefinitionTargetTest.php | 2 +- .../FHIRPopulationTest.php | 2 +- .../FHIRPractitionerQualificationTest.php | 2 +- .../FHIRPractitionerRoleAvailableTimeTest.php | 2 +- .../FHIRPractitionerRoleNotAvailableTest.php | 2 +- .../FHIRProcedureFocalDeviceTest.php | 2 +- .../FHIRProcedurePerformerTest.php | 2 +- .../FHIRProdCharacteristicTest.php | 2 +- .../FHIRProductShelfLifeTest.php | 2 +- .../FHIRProvenanceAgentTest.php | 2 +- .../FHIRProvenanceEntityTest.php | 2 +- .../FHIRQuestionnaireAnswerOptionTest.php | 2 +- .../FHIRQuestionnaireEnableWhenTest.php | 2 +- .../FHIRQuestionnaireInitialTest.php | 2 +- .../FHIRQuestionnaireItemTest.php | 2 +- .../FHIRQuestionnaireResponseAnswerTest.php | 2 +- .../FHIRQuestionnaireResponseItemTest.php | 2 +- .../FHIRRelatedPersonCommunicationTest.php | 2 +- .../FHIRRequestGroupActionTest.php | 2 +- .../FHIRRequestGroupConditionTest.php | 2 +- .../FHIRRequestGroupRelatedActionTest.php | 2 +- ...rchElementDefinitionCharacteristicTest.php | 2 +- .../FHIRResearchStudyArmTest.php | 2 +- .../FHIRResearchStudyObjectiveTest.php | 2 +- .../FHIRRiskAssessmentPredictionTest.php | 2 +- ...enceSynthesisCertaintySubcomponentTest.php | 2 +- ...FHIRRiskEvidenceSynthesisCertaintyTest.php | 2 +- ...EvidenceSynthesisPrecisionEstimateTest.php | 2 +- ...RRiskEvidenceSynthesisRiskEstimateTest.php | 2 +- ...HIRRiskEvidenceSynthesisSampleSizeTest.php | 2 +- .../FHIRSearchParameterComponentTest.php | 2 +- .../FHIRSpecimenCollectionTest.php | 2 +- .../FHIRSpecimenContainerTest.php | 2 +- .../FHIRSpecimenProcessingTest.php | 2 +- .../FHIRSpecimenDefinitionAdditiveTest.php | 2 +- .../FHIRSpecimenDefinitionContainerTest.php | 2 +- .../FHIRSpecimenDefinitionHandlingTest.php | 2 +- .../FHIRSpecimenDefinitionTypeTestedTest.php | 2 +- .../FHIRStructureDefinitionContextTest.php | 2 +- ...HIRStructureDefinitionDifferentialTest.php | 2 +- .../FHIRStructureDefinitionMappingTest.php | 2 +- .../FHIRStructureDefinitionSnapshotTest.php | 2 +- .../FHIRStructureMapDependentTest.php | 2 +- .../FHIRStructureMapGroupTest.php | 2 +- .../FHIRStructureMapInputTest.php | 2 +- .../FHIRStructureMapParameterTest.php | 2 +- .../FHIRStructureMapRuleTest.php | 2 +- .../FHIRStructureMapSourceTest.php | 2 +- .../FHIRStructureMapStructureTest.php | 2 +- .../FHIRStructureMapTargetTest.php | 2 +- .../FHIRSubscriptionChannelTest.php | 2 +- .../FHIRSubstanceIngredientTest.php | 2 +- .../FHIRSubstanceInstanceTest.php | 2 +- .../FHIRSubstanceAmountReferenceRangeTest.php | 2 +- .../FHIRSubstanceAmountTest.php | 2 +- .../FHIRSubstanceNucleicAcidLinkageTest.php | 2 +- .../FHIRSubstanceNucleicAcidSubunitTest.php | 2 +- .../FHIRSubstanceNucleicAcidSugarTest.php | 2 +- ...tancePolymerDegreeOfPolymerisationTest.php | 2 +- .../FHIRSubstancePolymerMonomerSetTest.php | 2 +- .../FHIRSubstancePolymerRepeatTest.php | 2 +- .../FHIRSubstancePolymerRepeatUnitTest.php | 2 +- ...IRSubstancePolymerStartingMaterialTest.php | 2 +- ...ncePolymerStructuralRepresentationTest.php | 2 +- .../FHIRSubstanceProteinSubunitTest.php | 2 +- ...ReferenceInformationClassificationTest.php | 2 +- ...nceReferenceInformationGeneElementTest.php | 2 +- ...RSubstanceReferenceInformationGeneTest.php | 2 +- ...ubstanceReferenceInformationTargetTest.php | 2 +- .../FHIRSubstanceSourceMaterialAuthorTest.php | 2 +- ...eSourceMaterialFractionDescriptionTest.php | 2 +- .../FHIRSubstanceSourceMaterialHybridTest.php | 2 +- ...tanceSourceMaterialOrganismGeneralTest.php | 2 +- ...HIRSubstanceSourceMaterialOrganismTest.php | 2 +- ...tanceSourceMaterialPartDescriptionTest.php | 2 +- .../FHIRSubstanceSpecificationCodeTest.php | 2 +- .../FHIRSubstanceSpecificationIsotopeTest.php | 2 +- .../FHIRSubstanceSpecificationMoietyTest.php | 2 +- ...stanceSpecificationMolecularWeightTest.php | 2 +- .../FHIRSubstanceSpecificationNameTest.php | 2 +- ...FHIRSubstanceSpecificationOfficialTest.php | 2 +- ...FHIRSubstanceSpecificationPropertyTest.php | 2 +- ...SubstanceSpecificationRelationshipTest.php | 2 +- ...bstanceSpecificationRepresentationTest.php | 2 +- ...HIRSubstanceSpecificationStructureTest.php | 2 +- .../FHIRSupplyDeliverySuppliedItemTest.php | 2 +- .../FHIRSupplyRequestParameterTest.php | 2 +- .../FHIRTask/FHIRTaskInputTest.php | 2 +- .../FHIRTask/FHIRTaskOutputTest.php | 2 +- .../FHIRTask/FHIRTaskRestrictionTest.php | 2 +- ...FHIRTerminologyCapabilitiesClosureTest.php | 2 +- ...RTerminologyCapabilitiesCodeSystemTest.php | 2 +- ...IRTerminologyCapabilitiesExpansionTest.php | 2 +- .../FHIRTerminologyCapabilitiesFilterTest.php | 2 +- ...minologyCapabilitiesImplementationTest.php | 2 +- ...IRTerminologyCapabilitiesParameterTest.php | 2 +- ...HIRTerminologyCapabilitiesSoftwareTest.php | 2 +- ...TerminologyCapabilitiesTranslationTest.php | 2 +- ...erminologyCapabilitiesValidateCodeTest.php | 2 +- ...FHIRTerminologyCapabilitiesVersionTest.php | 2 +- .../FHIRTestReportAction1Test.php | 2 +- .../FHIRTestReportAction2Test.php | 2 +- .../FHIRTestReportActionTest.php | 2 +- .../FHIRTestReportAssertTest.php | 2 +- .../FHIRTestReportOperationTest.php | 2 +- .../FHIRTestReportParticipantTest.php | 2 +- .../FHIRTestReportSetupTest.php | 2 +- .../FHIRTestReportTeardownTest.php | 2 +- .../FHIRTestReport/FHIRTestReportTestTest.php | 2 +- .../FHIRTestScriptAction1Test.php | 2 +- .../FHIRTestScriptAction2Test.php | 2 +- .../FHIRTestScriptActionTest.php | 2 +- .../FHIRTestScriptAssertTest.php | 2 +- .../FHIRTestScriptCapabilityTest.php | 2 +- .../FHIRTestScriptDestinationTest.php | 2 +- .../FHIRTestScriptFixtureTest.php | 2 +- .../FHIRTestScript/FHIRTestScriptLinkTest.php | 2 +- .../FHIRTestScriptMetadataTest.php | 2 +- .../FHIRTestScriptOperationTest.php | 2 +- .../FHIRTestScriptOriginTest.php | 2 +- .../FHIRTestScriptRequestHeaderTest.php | 2 +- .../FHIRTestScriptSetupTest.php | 2 +- .../FHIRTestScriptTeardownTest.php | 2 +- .../FHIRTestScript/FHIRTestScriptTestTest.php | 2 +- .../FHIRTestScriptVariableTest.php | 2 +- .../FHIRTiming/FHIRTimingRepeatTest.php | 2 +- .../FHIRBackboneElement/FHIRTimingTest.php | 2 +- .../FHIRValueSet/FHIRValueSetComposeTest.php | 2 +- .../FHIRValueSet/FHIRValueSetConceptTest.php | 2 +- .../FHIRValueSet/FHIRValueSetContainsTest.php | 2 +- .../FHIRValueSetDesignationTest.php | 2 +- .../FHIRValueSetExpansionTest.php | 2 +- .../FHIRValueSet/FHIRValueSetFilterTest.php | 2 +- .../FHIRValueSet/FHIRValueSetIncludeTest.php | 2 +- .../FHIRValueSetParameterTest.php | 2 +- .../FHIRVerificationResultAttestationTest.php | 2 +- ...HIRVerificationResultPrimarySourceTest.php | 2 +- .../FHIRVerificationResultValidatorTest.php | 2 +- ...isionPrescriptionLensSpecificationTest.php | 2 +- .../FHIRVisionPrescriptionPrismTest.php | 2 +- .../FHIRElement/FHIRBackboneElementTest.php | 2 +- .../FHIRElement/FHIRBase64BinaryTest.php | 2 +- .../FHIRElement/FHIRBindingStrengthTest.php | 2 +- ...BiologicallyDerivedProductCategoryTest.php | 2 +- ...IRBiologicallyDerivedProductStatusTest.php | 2 +- ...ogicallyDerivedProductStorageScaleTest.php | 2 +- .../FHIRElement/FHIRBooleanTest.php | 2 +- .../FHIRElement/FHIRBundleTypeTest.php | 2 +- .../FHIRElement/FHIRCanonicalTest.php | 2 +- .../FHIRCapabilityStatementKindTest.php | 2 +- .../FHIRCarePlanActivityKindTest.php | 2 +- .../FHIRCarePlanActivityStatusTest.php | 2 +- .../FHIRElement/FHIRCarePlanIntentTest.php | 2 +- .../FHIRElement/FHIRCareTeamStatusTest.php | 2 +- .../FHIRCatalogEntryRelationTypeTest.php | 2 +- .../FHIRElement/FHIRChargeItemStatusTest.php | 2 +- .../FHIRClaimProcessingCodesTest.php | 2 +- .../FHIRClinicalImpressionStatusTest.php | 2 +- .../FHIRElement/FHIRCodeSearchSupportTest.php | 2 +- .../FHIRCodeSystemContentModeTest.php | 2 +- .../FHIRCodeSystemHierarchyMeaningTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRCodeTest.php | 2 +- .../FHIRElement/FHIRCodeableConceptTest.php | 2 +- .../FHIRElement/FHIRCodingTest.php | 2 +- .../FHIRElement/FHIRCompartmentTypeTest.php | 2 +- .../FHIRCompositionAttestationModeTest.php | 2 +- .../FHIRElement/FHIRCompositionStatusTest.php | 2 +- .../FHIRConceptMapEquivalenceTest.php | 2 +- .../FHIRConceptMapGroupUnmappedModeTest.php | 2 +- .../FHIRConditionalDeleteStatusTest.php | 2 +- .../FHIRConditionalReadStatusTest.php | 2 +- .../FHIRConsentDataMeaningTest.php | 2 +- .../FHIRConsentProvisionTypeTest.php | 2 +- .../FHIRElement/FHIRConsentStateTest.php | 2 +- .../FHIRConstraintSeverityTest.php | 2 +- .../FHIRElement/FHIRContactDetailTest.php | 2 +- .../FHIRContactPointSystemTest.php | 2 +- .../FHIRElement/FHIRContactPointTest.php | 2 +- .../FHIRElement/FHIRContactPointUseTest.php | 2 +- ...ractResourcePublicationStatusCodesTest.php | 2 +- .../FHIRContractResourceStatusCodesTest.php | 2 +- .../FHIRElement/FHIRContributorTest.php | 2 +- .../FHIRElement/FHIRContributorTypeTest.php | 2 +- .../FHIRDataRequirementCodeFilterTest.php | 2 +- .../FHIRDataRequirementDateFilterTest.php | 2 +- .../FHIRDataRequirementSortTest.php | 2 +- .../FHIRElement/FHIRDataRequirementTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRDateTest.php | 2 +- .../FHIRElement/FHIRDateTimeTest.php | 2 +- .../FHIRElement/FHIRDaysOfWeekTest.php | 2 +- .../FHIRElement/FHIRDecimalTest.php | 2 +- .../FHIRDetectedIssueSeverityTest.php | 2 +- .../FHIRDeviceMetricCalibrationStateTest.php | 2 +- .../FHIRDeviceMetricCalibrationTypeTest.php | 2 +- .../FHIRDeviceMetricCategoryTest.php | 2 +- .../FHIRElement/FHIRDeviceMetricColorTest.php | 2 +- .../FHIRDeviceMetricOperationalStatusTest.php | 2 +- .../FHIRElement/FHIRDeviceNameTypeTest.php | 2 +- .../FHIRDeviceUseStatementStatusTest.php | 2 +- .../FHIRDiagnosticReportStatusTest.php | 2 +- .../FHIRElement/FHIRDiscriminatorTypeTest.php | 2 +- .../FHIRElement/FHIRDocumentModeTest.php | 2 +- .../FHIRDocumentReferenceStatusTest.php | 2 +- .../FHIRDocumentRelationshipTypeTest.php | 2 +- .../FHIREligibilityRequestPurposeTest.php | 2 +- .../FHIREligibilityResponsePurposeTest.php | 2 +- .../FHIREnableWhenBehaviorTest.php | 2 +- .../FHIREncounterLocationStatusTest.php | 2 +- .../FHIRElement/FHIREncounterStatusTest.php | 2 +- .../FHIRElement/FHIREndpointStatusTest.php | 2 +- .../FHIREpisodeOfCareStatusTest.php | 2 +- .../FHIREventCapabilityModeTest.php | 2 +- .../FHIRElement/FHIREventStatusTest.php | 2 +- .../FHIRElement/FHIREventTimingTest.php | 2 +- .../FHIREvidenceVariableTypeTest.php | 2 +- .../FHIRExampleScenarioActorTypeTest.php | 2 +- .../FHIRExplanationOfBenefitStatusTest.php | 2 +- .../FHIRElement/FHIRExposureStateTest.php | 2 +- .../FHIRExpressionLanguageTest.php | 2 +- .../FHIRElement/FHIRExpressionTest.php | 2 +- .../FHIRExtensionContextTypeTest.php | 2 +- .../FHIRElement/FHIRExtensionTest.php | 2 +- .../FHIRElement/FHIRFHIRDeviceStatusTest.php | 2 +- .../FHIRFHIRSubstanceStatusTest.php | 2 +- .../FHIRElement/FHIRFHIRVersionTest.php | 2 +- .../FHIRFamilyHistoryStatusTest.php | 2 +- .../FHIRElement/FHIRFilterOperatorTest.php | 2 +- .../FHIRFinancialResourceStatusCodesTest.php | 2 +- .../FHIRElement/FHIRFlagStatusTest.php | 2 +- .../FHIRGoalLifecycleStatusTest.php | 2 +- .../FHIRGraphCompartmentRuleTest.php | 2 +- .../FHIRGraphCompartmentUseTest.php | 2 +- .../FHIRElement/FHIRGroupMeasureTest.php | 2 +- .../FHIRElement/FHIRGroupTypeTest.php | 2 +- .../FHIRGuidanceResponseStatusTest.php | 2 +- .../FHIRGuidePageGenerationTest.php | 2 +- .../FHIRGuideParameterCodeTest.php | 2 +- .../FHIRElement/FHIRHTTPVerbTest.php | 2 +- .../FHIRElement/FHIRHumanNameTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRIdTest.php | 2 +- .../FHIRElement/FHIRIdentifierTest.php | 2 +- .../FHIRElement/FHIRIdentifierUseTest.php | 2 +- .../FHIRIdentityAssuranceLevelTest.php | 2 +- .../FHIRImagingStudyStatusTest.php | 2 +- ...RImmunizationEvaluationStatusCodesTest.php | 2 +- .../FHIRImmunizationStatusCodesTest.php | 2 +- .../FHIRElement/FHIRInstantTest.php | 2 +- .../FHIRElement/FHIRIntegerTest.php | 2 +- .../FHIRInvoicePriceComponentTypeTest.php | 2 +- .../FHIRElement/FHIRInvoiceStatusTest.php | 2 +- .../FHIRElement/FHIRIssueSeverityTest.php | 2 +- .../FHIRElement/FHIRIssueTypeTest.php | 2 +- .../FHIRElement/FHIRLinkTypeTest.php | 2 +- .../FHIRElement/FHIRLinkageTypeTest.php | 2 +- .../FHIRElement/FHIRListModeTest.php | 2 +- .../FHIRElement/FHIRListStatusTest.php | 2 +- .../FHIRElement/FHIRLocationModeTest.php | 2 +- .../FHIRElement/FHIRLocationStatusTest.php | 2 +- .../FHIRElement/FHIRMarkdownTest.php | 2 +- .../FHIRMeasureReportStatusTest.php | 2 +- .../FHIRElement/FHIRMeasureReportTypeTest.php | 2 +- .../FHIRMedicationRequestIntentTest.php | 2 +- .../FHIRMedicationStatusCodesTest.php | 2 +- .../FHIRMedicationrequestStatusTest.php | 2 +- .../FHIRMessageSignificanceCategoryTest.php | 2 +- .../FHIRMessageheaderResponseRequestTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRMetaTest.php | 2 +- .../FHIRElement/FHIRMoneyTest.php | 2 +- .../FHIRElement/FHIRNameUseTest.php | 2 +- .../FHIRNamingSystemIdentifierTypeTest.php | 2 +- .../FHIRElement/FHIRNamingSystemTypeTest.php | 2 +- .../FHIRElement/FHIRNarrativeStatusTest.php | 2 +- .../FHIRElement/FHIRNarrativeTest.php | 2 +- .../FHIRElement/FHIRNoteTypeTest.php | 2 +- .../FHIRObservationDataTypeTest.php | 2 +- .../FHIRObservationRangeCategoryTest.php | 2 +- .../FHIRElement/FHIRObservationStatusTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIROidTest.php | 2 +- .../FHIRElement/FHIROperationKindTest.php | 2 +- .../FHIROperationParameterUseTest.php | 2 +- .../FHIRElement/FHIROrientationTypeTest.php | 2 +- .../FHIRParameterDefinitionTest.php | 2 +- .../FHIRParticipantRequiredTest.php | 2 +- .../FHIRParticipationStatusTest.php | 2 +- .../FHIRElement/FHIRPeriodTest.php | 2 +- .../FHIRElement/FHIRPositiveIntTest.php | 2 +- .../FHIRPropertyRepresentationTest.php | 2 +- .../FHIRElement/FHIRPropertyTypeTest.php | 2 +- .../FHIRProvenanceEntityRoleTest.php | 2 +- .../FHIRElement/FHIRPublicationStatusTest.php | 2 +- .../FHIRElement/FHIRQualityTypeTest.php | 2 +- .../FHIRElement/FHIRQuantity/FHIRAgeTest.php | 2 +- .../FHIRQuantity/FHIRCountTest.php | 2 +- .../FHIRQuantity/FHIRDistanceTest.php | 2 +- .../FHIRQuantity/FHIRDurationTest.php | 2 +- .../FHIRQuantityComparatorTest.php | 2 +- .../FHIRElement/FHIRQuantityTest.php | 2 +- .../FHIRQuestionnaireItemOperatorTest.php | 2 +- .../FHIRQuestionnaireItemTypeTest.php | 2 +- .../FHIRQuestionnaireResponseStatusTest.php | 2 +- .../FHIRElement/FHIRRangeTest.php | 2 +- .../FHIRElement/FHIRRatioTest.php | 2 +- .../FHIRReferenceHandlingPolicyTest.php | 2 +- .../FHIRElement/FHIRReferenceTest.php | 2 +- .../FHIRReferenceVersionRulesTest.php | 2 +- .../FHIRElement/FHIRRelatedArtifactTest.php | 2 +- .../FHIRRelatedArtifactTypeTest.php | 2 +- .../FHIRElement/FHIRRemittanceOutcomeTest.php | 2 +- .../FHIRElement/FHIRRepositoryTypeTest.php | 2 +- .../FHIRElement/FHIRRequestIntentTest.php | 2 +- .../FHIRElement/FHIRRequestPriorityTest.php | 2 +- .../FHIRRequestResourceTypeTest.php | 2 +- .../FHIRElement/FHIRRequestStatusTest.php | 2 +- .../FHIRResearchElementTypeTest.php | 2 +- .../FHIRResearchStudyStatusTest.php | 2 +- .../FHIRResearchSubjectStatusTest.php | 2 +- .../FHIRElement/FHIRResourceTypeTest.php | 2 +- .../FHIRResourceVersionPolicyTest.php | 2 +- .../FHIRElement/FHIRResponseTypeTest.php | 2 +- .../FHIRRestfulCapabilityModeTest.php | 2 +- .../FHIRElement/FHIRSPDXLicenseTest.php | 2 +- .../FHIRSampledDataDataTypeTest.php | 2 +- .../FHIRElement/FHIRSampledDataTest.php | 2 +- .../FHIRElement/FHIRSearchComparatorTest.php | 2 +- .../FHIRElement/FHIRSearchEntryModeTest.php | 2 +- .../FHIRSearchModifierCodeTest.php | 2 +- .../FHIRElement/FHIRSearchParamTypeTest.php | 2 +- .../FHIRElement/FHIRSequenceTypeTest.php | 2 +- .../FHIRElement/FHIRSignatureTest.php | 2 +- .../FHIRElement/FHIRSlicingRulesTest.php | 2 +- .../FHIRElement/FHIRSlotStatusTest.php | 2 +- .../FHIRElement/FHIRSortDirectionTest.php | 2 +- .../FHIRSpecimenContainedPreferenceTest.php | 2 +- .../FHIRElement/FHIRSpecimenStatusTest.php | 2 +- .../FHIRElement/FHIRStatusTest.php | 2 +- .../FHIRElement/FHIRStrandTypeTest.php | 2 +- .../FHIRElement/FHIRStringTest.php | 2 +- .../FHIRStructureDefinitionKindTest.php | 2 +- .../FHIRStructureMapContextTypeTest.php | 2 +- .../FHIRStructureMapGroupTypeModeTest.php | 2 +- .../FHIRStructureMapInputModeTest.php | 2 +- .../FHIRStructureMapModelModeTest.php | 2 +- .../FHIRStructureMapSourceListModeTest.php | 2 +- .../FHIRStructureMapTargetListModeTest.php | 2 +- .../FHIRStructureMapTransformTest.php | 2 +- .../FHIRSubscriptionChannelTypeTest.php | 2 +- .../FHIRSubscriptionStatusTest.php | 2 +- .../FHIRSupplyDeliveryStatusTest.php | 2 +- .../FHIRSupplyRequestStatusTest.php | 2 +- .../FHIRSystemRestfulInteractionTest.php | 2 +- .../FHIRElement/FHIRTaskIntentTest.php | 2 +- .../FHIRElement/FHIRTaskStatusTest.php | 2 +- .../FHIRTestReportActionResultTest.php | 2 +- .../FHIRTestReportParticipantTypeTest.php | 2 +- .../FHIRElement/FHIRTestReportResultTest.php | 2 +- .../FHIRElement/FHIRTestReportStatusTest.php | 2 +- .../FHIRTestScriptRequestMethodCodeTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRTimeTest.php | 2 +- .../FHIRElement/FHIRTriggerDefinitionTest.php | 2 +- .../FHIRElement/FHIRTriggerTypeTest.php | 2 +- .../FHIRTypeDerivationRuleTest.php | 2 +- .../FHIRTypeRestfulInteractionTest.php | 2 +- .../FHIRElement/FHIRUDIEntryTypeTest.php | 2 +- .../FHIRElement/FHIRUnitsOfTimeTest.php | 2 +- .../FHIRElement/FHIRUnsignedIntTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUriTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUrlTest.php | 2 +- .../FHIRElement/FHIRUsageContextTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUseTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUuidTest.php | 2 +- ...FHIRVConfidentialityClassificationTest.php | 2 +- .../FHIRElement/FHIRVariableTypeTest.php | 2 +- .../FHIRElement/FHIRVisionBaseTest.php | 2 +- .../FHIRElement/FHIRVisionEyesTest.php | 2 +- .../FHIRElement/FHIRXPathUsageTypeTest.php | 2 +- .../R4/PHPFHIRTests/FHIRElementTest.php | 2 +- .../R4/PHPFHIRTests/FHIRIdPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRInstantPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRIntegerPrimitiveTest.php | 2 +- .../FHIRMarkdownPrimitiveTest.php | 2 +- .../R4/PHPFHIRTests/FHIROidPrimitiveTest.php | 2 +- .../FHIRPositiveIntPrimitiveTest.php | 2 +- .../FHIRResource/FHIRBinaryTest.php | 2 +- .../FHIRResource/FHIRBundleTest.php | 2 +- .../FHIRDomainResource/FHIRAccountTest.php | 58 +- .../FHIRActivityDefinitionTest.php | 58 +- .../FHIRAdverseEventTest.php | 58 +- .../FHIRAllergyIntoleranceTest.php | 58 +- .../FHIRAppointmentResponseTest.php | 58 +- .../FHIRAppointmentTest.php | 58 +- .../FHIRDomainResource/FHIRAuditEventTest.php | 58 +- .../FHIRDomainResource/FHIRBasicTest.php | 58 +- .../FHIRBiologicallyDerivedProductTest.php | 58 +- .../FHIRBodyStructureTest.php | 58 +- .../FHIRCapabilityStatementTest.php | 58 +- .../FHIRDomainResource/FHIRCarePlanTest.php | 58 +- .../FHIRDomainResource/FHIRCareTeamTest.php | 58 +- .../FHIRCatalogEntryTest.php | 58 +- .../FHIRChargeItemDefinitionTest.php | 58 +- .../FHIRDomainResource/FHIRChargeItemTest.php | 58 +- .../FHIRClaimResponseTest.php | 58 +- .../FHIRDomainResource/FHIRClaimTest.php | 58 +- .../FHIRClinicalImpressionTest.php | 58 +- .../FHIRDomainResource/FHIRCodeSystemTest.php | 58 +- .../FHIRCommunicationRequestTest.php | 58 +- .../FHIRCommunicationTest.php | 58 +- .../FHIRCompartmentDefinitionTest.php | 58 +- .../FHIRCompositionTest.php | 58 +- .../FHIRDomainResource/FHIRConceptMapTest.php | 58 +- .../FHIRDomainResource/FHIRConditionTest.php | 58 +- .../FHIRDomainResource/FHIRConsentTest.php | 58 +- .../FHIRDomainResource/FHIRContractTest.php | 58 +- .../FHIRCoverageEligibilityRequestTest.php | 58 +- .../FHIRCoverageEligibilityResponseTest.php | 58 +- .../FHIRDomainResource/FHIRCoverageTest.php | 58 +- .../FHIRDetectedIssueTest.php | 58 +- .../FHIRDeviceDefinitionTest.php | 58 +- .../FHIRDeviceMetricTest.php | 58 +- .../FHIRDeviceRequestTest.php | 58 +- .../FHIRDomainResource/FHIRDeviceTest.php | 58 +- .../FHIRDeviceUseStatementTest.php | 58 +- .../FHIRDiagnosticReportTest.php | 58 +- .../FHIRDocumentManifestTest.php | 58 +- .../FHIRDocumentReferenceTest.php | 58 +- .../FHIREffectEvidenceSynthesisTest.php | 58 +- .../FHIRDomainResource/FHIREncounterTest.php | 58 +- .../FHIRDomainResource/FHIREndpointTest.php | 58 +- .../FHIREnrollmentRequestTest.php | 58 +- .../FHIREnrollmentResponseTest.php | 58 +- .../FHIREpisodeOfCareTest.php | 58 +- .../FHIREventDefinitionTest.php | 58 +- .../FHIRDomainResource/FHIREvidenceTest.php | 58 +- .../FHIREvidenceVariableTest.php | 58 +- .../FHIRExampleScenarioTest.php | 58 +- .../FHIRExplanationOfBenefitTest.php | 58 +- .../FHIRFamilyMemberHistoryTest.php | 58 +- .../FHIRDomainResource/FHIRFlagTest.php | 58 +- .../FHIRDomainResource/FHIRGoalTest.php | 58 +- .../FHIRGraphDefinitionTest.php | 58 +- .../FHIRDomainResource/FHIRGroupTest.php | 58 +- .../FHIRGuidanceResponseTest.php | 58 +- .../FHIRHealthcareServiceTest.php | 58 +- .../FHIRImagingStudyTest.php | 58 +- .../FHIRImmunizationEvaluationTest.php | 58 +- .../FHIRImmunizationRecommendationTest.php | 58 +- .../FHIRImmunizationTest.php | 58 +- .../FHIRImplementationGuideTest.php | 58 +- .../FHIRInsurancePlanTest.php | 58 +- .../FHIRDomainResource/FHIRInvoiceTest.php | 58 +- .../FHIRDomainResource/FHIRLibraryTest.php | 58 +- .../FHIRDomainResource/FHIRLinkageTest.php | 58 +- .../FHIRDomainResource/FHIRListTest.php | 58 +- .../FHIRDomainResource/FHIRLocationTest.php | 58 +- .../FHIRMeasureReportTest.php | 58 +- .../FHIRDomainResource/FHIRMeasureTest.php | 58 +- .../FHIRDomainResource/FHIRMediaTest.php | 58 +- .../FHIRMedicationAdministrationTest.php | 58 +- .../FHIRMedicationDispenseTest.php | 58 +- .../FHIRMedicationKnowledgeTest.php | 58 +- .../FHIRMedicationRequestTest.php | 58 +- .../FHIRMedicationStatementTest.php | 58 +- .../FHIRDomainResource/FHIRMedicationTest.php | 58 +- .../FHIRMedicinalProductAuthorizationTest.php | 58 +- ...IRMedicinalProductContraindicationTest.php | 58 +- .../FHIRMedicinalProductIndicationTest.php | 58 +- .../FHIRMedicinalProductIngredientTest.php | 58 +- .../FHIRMedicinalProductInteractionTest.php | 58 +- .../FHIRMedicinalProductManufacturedTest.php | 58 +- .../FHIRMedicinalProductPackagedTest.php | 58 +- ...FHIRMedicinalProductPharmaceuticalTest.php | 58 +- .../FHIRMedicinalProductTest.php | 58 +- ...RMedicinalProductUndesirableEffectTest.php | 58 +- .../FHIRMessageDefinitionTest.php | 58 +- .../FHIRMessageHeaderTest.php | 58 +- .../FHIRMolecularSequenceTest.php | 58 +- .../FHIRNamingSystemTest.php | 58 +- .../FHIRNutritionOrderTest.php | 58 +- .../FHIRObservationDefinitionTest.php | 58 +- .../FHIRObservationTest.php | 58 +- .../FHIROperationDefinitionTest.php | 58 +- .../FHIROperationOutcomeTest.php | 58 +- .../FHIROrganizationAffiliationTest.php | 58 +- .../FHIROrganizationTest.php | 58 +- .../FHIRDomainResource/FHIRPatientTest.php | 58 +- .../FHIRPaymentNoticeTest.php | 58 +- .../FHIRPaymentReconciliationTest.php | 58 +- .../FHIRDomainResource/FHIRPersonTest.php | 58 +- .../FHIRPlanDefinitionTest.php | 58 +- .../FHIRPractitionerRoleTest.php | 58 +- .../FHIRPractitionerTest.php | 58 +- .../FHIRDomainResource/FHIRProcedureTest.php | 58 +- .../FHIRDomainResource/FHIRProvenanceTest.php | 58 +- .../FHIRQuestionnaireResponseTest.php | 58 +- .../FHIRQuestionnaireTest.php | 58 +- .../FHIRRelatedPersonTest.php | 58 +- .../FHIRRequestGroupTest.php | 58 +- .../FHIRResearchDefinitionTest.php | 58 +- .../FHIRResearchElementDefinitionTest.php | 58 +- .../FHIRResearchStudyTest.php | 58 +- .../FHIRResearchSubjectTest.php | 58 +- .../FHIRRiskAssessmentTest.php | 58 +- .../FHIRRiskEvidenceSynthesisTest.php | 58 +- .../FHIRDomainResource/FHIRScheduleTest.php | 58 +- .../FHIRSearchParameterTest.php | 58 +- .../FHIRServiceRequestTest.php | 58 +- .../FHIRDomainResource/FHIRSlotTest.php | 58 +- .../FHIRSpecimenDefinitionTest.php | 58 +- .../FHIRDomainResource/FHIRSpecimenTest.php | 58 +- .../FHIRStructureDefinitionTest.php | 58 +- .../FHIRStructureMapTest.php | 58 +- .../FHIRSubscriptionTest.php | 58 +- .../FHIRSubstanceNucleicAcidTest.php | 58 +- .../FHIRSubstancePolymerTest.php | 58 +- .../FHIRSubstanceProteinTest.php | 58 +- .../FHIRSubstanceReferenceInformationTest.php | 58 +- .../FHIRSubstanceSourceMaterialTest.php | 58 +- .../FHIRSubstanceSpecificationTest.php | 58 +- .../FHIRDomainResource/FHIRSubstanceTest.php | 58 +- .../FHIRSupplyDeliveryTest.php | 58 +- .../FHIRSupplyRequestTest.php | 58 +- .../FHIRDomainResource/FHIRTaskTest.php | 58 +- .../FHIRTerminologyCapabilitiesTest.php | 58 +- .../FHIRDomainResource/FHIRTestReportTest.php | 58 +- .../FHIRDomainResource/FHIRTestScriptTest.php | 58 +- .../FHIRDomainResource/FHIRValueSetTest.php | 58 +- .../FHIRVerificationResultTest.php | 58 +- .../FHIRVisionPrescriptionTest.php | 58 +- .../FHIRResource/FHIRDomainResourceTest.php | 2 +- .../FHIRResource/FHIRParametersTest.php | 2 +- .../FHIRResourceContainerTest.php | 2 +- .../R4/PHPFHIRTests/FHIRResourceTest.php | 2 +- .../FHIRSampledDataDataTypePrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRStringPrimitiveTest.php | 2 +- .../R4/PHPFHIRTests/FHIRTimePrimitiveTest.php | 2 +- .../FHIRUnsignedIntPrimitiveTest.php | 2 +- .../R4/PHPFHIRTests/FHIRUriPrimitiveTest.php | 2 +- .../R4/PHPFHIRTests/FHIRUrlPrimitiveTest.php | 2 +- .../R4/PHPFHIRTests/FHIRUuidPrimitiveTest.php | 2 +- .../R4/PHPFHIRTests/PHPFHIRConstantsTest.php | 2 +- .../R4/PHPFHIRTests/PHPFHIRTypeMapTest.php | 2 +- .../R4/PHPFHIRTypeInterface.php | 10 +- .../PHPFHIRGenerated/R4/PHPFHIRTypeMap.php | 2 +- .../R4/PHPFHIRValidationAssertionsTrait.php | 219 + .../STU3/FHIRBase64BinaryPrimitive.php | 34 +- .../STU3/FHIRBooleanPrimitive.php | 34 +- .../STU3/FHIRCodePrimitive.php | 34 +- .../FHIRAccountStatusList.php | 35 +- .../FHIRActionCardinalityBehaviorList.php | 35 +- .../FHIRActionConditionKindList.php | 35 +- .../FHIRActionGroupingBehaviorList.php | 35 +- .../FHIRCodePrimitive/FHIRActionListList.php | 35 +- .../FHIRActionParticipantTypeList.php | 35 +- .../FHIRActionPrecheckBehaviorList.php | 35 +- .../FHIRActionRelationshipTypeList.php | 35 +- .../FHIRActionRequiredBehaviorList.php | 35 +- .../FHIRActionSelectionBehaviorList.php | 35 +- .../FHIRCodePrimitive/FHIRAddressTypeList.php | 35 +- .../FHIRCodePrimitive/FHIRAddressUseList.php | 35 +- .../FHIRAdministrativeGenderList.php | 35 +- .../FHIRAdverseEventCategoryList.php | 35 +- .../FHIRAdverseEventCausalityList.php | 35 +- .../FHIRAggregationModeList.php | 35 +- .../FHIRAllergyIntoleranceCategoryList.php | 35 +- ...IRAllergyIntoleranceClinicalStatusList.php | 35 +- .../FHIRAllergyIntoleranceCriticalityList.php | 35 +- .../FHIRAllergyIntoleranceSeverityList.php | 35 +- .../FHIRAllergyIntoleranceTypeList.php | 35 +- ...lergyIntoleranceVerificationStatusList.php | 35 +- .../FHIRAppointmentStatusList.php | 35 +- .../FHIRAssertionDirectionTypeList.php | 35 +- .../FHIRAssertionOperatorTypeList.php | 35 +- .../FHIRAssertionResponseTypesList.php | 35 +- .../FHIRAuditEventActionList.php | 35 +- .../FHIRAuditEventAgentNetworkTypeList.php | 35 +- .../FHIRAuditEventOutcomeList.php | 35 +- .../FHIRBindingStrengthList.php | 35 +- .../FHIRCodePrimitive/FHIRBundleTypeList.php | 35 +- .../FHIRCapabilityStatementKindList.php | 35 +- .../FHIRCarePlanActivityStatusList.php | 35 +- .../FHIRCarePlanIntentList.php | 35 +- .../FHIRCarePlanStatusList.php | 35 +- .../FHIRCareTeamStatusList.php | 35 +- .../FHIRChargeItemStatusList.php | 35 +- .../FHIRClinicalImpressionStatusList.php | 35 +- .../FHIRCodeSystemContentModeList.php | 35 +- .../FHIRCodeSystemHierarchyMeaningList.php | 35 +- .../FHIRCompartmentTypeList.php | 35 +- .../FHIRCompositionAttestationModeList.php | 35 +- .../FHIRCompositionStatusList.php | 35 +- .../FHIRConceptMapEquivalenceList.php | 35 +- .../FHIRConceptMapGroupUnmappedModeList.php | 35 +- .../FHIRConditionClinicalStatusCodesList.php | 35 +- .../FHIRConditionVerificationStatusList.php | 35 +- .../FHIRConditionalDeleteStatusList.php | 35 +- .../FHIRConditionalReadStatusList.php | 35 +- .../FHIRConfidentialityClassificationList.php | 35 +- .../FHIRConsentDataMeaningList.php | 35 +- .../FHIRConsentExceptTypeList.php | 35 +- .../FHIRConsentStateList.php | 35 +- .../FHIRConstraintSeverityList.php | 35 +- .../FHIRContactPointSystemList.php | 35 +- .../FHIRContactPointUseList.php | 35 +- .../FHIRCodePrimitive/FHIRContentTypeList.php | 35 +- .../FHIRContractResourceStatusCodesList.php | 35 +- .../FHIRContributorTypeList.php | 35 +- .../FHIRDataElementStringencyList.php | 35 +- .../FHIRCodePrimitive/FHIRDaysOfWeekList.php | 35 +- .../FHIRDetectedIssueSeverityList.php | 35 +- .../FHIRDeviceMetricCalibrationStateList.php | 35 +- .../FHIRDeviceMetricCalibrationTypeList.php | 35 +- .../FHIRDeviceMetricCategoryList.php | 35 +- .../FHIRDeviceMetricColorList.php | 35 +- .../FHIRDeviceMetricOperationalStatusList.php | 35 +- .../FHIRDeviceUseStatementStatusList.php | 35 +- .../FHIRDiagnosticReportStatusList.php | 35 +- .../FHIRDigitalMediaTypeList.php | 35 +- .../FHIRDiscriminatorTypeList.php | 35 +- .../FHIRDocumentModeList.php | 35 +- .../FHIRDocumentReferenceStatusList.php | 35 +- .../FHIRDocumentRelationshipTypeList.php | 35 +- .../FHIREncounterLocationStatusList.php | 35 +- .../FHIREncounterStatusList.php | 35 +- .../FHIREndpointStatusList.php | 35 +- .../FHIREpisodeOfCareStatusList.php | 35 +- .../FHIREventCapabilityModeList.php | 35 +- .../FHIRCodePrimitive/FHIREventStatusList.php | 35 +- .../FHIRCodePrimitive/FHIREventTimingList.php | 35 +- .../FHIRExplanationOfBenefitStatusList.php | 35 +- .../FHIRExtensionContextList.php | 35 +- .../FHIRFHIRAllTypesList.php | 35 +- .../FHIRFHIRDefinedTypeList.php | 35 +- .../FHIRFHIRDeviceStatusList.php | 35 +- .../FHIRFHIRSubstanceStatusList.php | 35 +- .../FHIRFamilyHistoryStatusList.php | 35 +- .../FHIRFilterOperatorList.php | 35 +- .../FHIRFinancialResourceStatusCodesList.php | 35 +- .../FHIRCodePrimitive/FHIRFlagStatusList.php | 35 +- .../FHIRCodePrimitive/FHIRGoalStatusList.php | 35 +- .../FHIRGraphCompartmentRuleList.php | 35 +- .../FHIRCodePrimitive/FHIRGroupTypeList.php | 35 +- .../FHIRGuidanceResponseStatusList.php | 35 +- .../FHIRGuideDependencyTypeList.php | 35 +- .../FHIRGuidePageKindList.php | 35 +- .../FHIRCodePrimitive/FHIRHTTPVerbList.php | 35 +- .../FHIRIdentifierUseList.php | 35 +- .../FHIRIdentityAssuranceLevelList.php | 35 +- .../FHIRImmunizationStatusCodesList.php | 35 +- .../FHIRInstanceAvailabilityList.php | 35 +- .../FHIRIssueSeverityList.php | 35 +- .../FHIRCodePrimitive/FHIRIssueTypeList.php | 35 +- .../FHIRCodePrimitive/FHIRLinkTypeList.php | 35 +- .../FHIRCodePrimitive/FHIRLinkageTypeList.php | 35 +- .../FHIRCodePrimitive/FHIRListModeList.php | 35 +- .../FHIRCodePrimitive/FHIRListStatusList.php | 35 +- .../FHIRLocationModeList.php | 35 +- .../FHIRLocationStatusList.php | 35 +- .../FHIRMeasmntPrincipleList.php | 35 +- .../FHIRMeasureReportStatusList.php | 35 +- .../FHIRMeasureReportTypeList.php | 35 +- ...FHIRMedicationAdministrationStatusList.php | 35 +- .../FHIRMedicationDispenseStatusList.php | 35 +- .../FHIRMedicationRequestIntentList.php | 35 +- .../FHIRMedicationRequestPriorityList.php | 35 +- .../FHIRMedicationRequestStatusList.php | 35 +- .../FHIRMedicationStatementStatusList.php | 35 +- .../FHIRMedicationStatementTakenList.php | 35 +- .../FHIRMedicationStatusList.php | 35 +- .../FHIRMessageSignificanceCategoryList.php | 35 +- .../FHIRCodePrimitive/FHIRNameUseList.php | 35 +- .../FHIRNamingSystemIdentifierTypeList.php | 35 +- .../FHIRNamingSystemTypeList.php | 35 +- .../FHIRNarrativeStatusList.php | 35 +- .../FHIRCodePrimitive/FHIRNoteTypeList.php | 35 +- .../FHIRNutritionOrderStatusList.php | 35 +- .../FHIRObservationRelationshipTypeList.php | 35 +- .../FHIRObservationStatusList.php | 35 +- .../FHIROperationKindList.php | 35 +- .../FHIROperationParameterUseList.php | 35 +- .../FHIRParticipantRequiredList.php | 35 +- .../FHIRParticipationStatusList.php | 35 +- .../FHIRPropertyRepresentationList.php | 35 +- .../FHIRPropertyTypeList.php | 35 +- .../FHIRProvenanceEntityRoleList.php | 35 +- .../FHIRPublicationStatusList.php | 35 +- .../FHIRCodePrimitive/FHIRQualityTypeList.php | 35 +- .../FHIRQuantityComparatorList.php | 35 +- .../FHIRQuestionnaireItemTypeList.php | 35 +- .../FHIRQuestionnaireResponseStatusList.php | 35 +- .../FHIRReferenceHandlingPolicyList.php | 35 +- .../FHIRReferenceVersionRulesList.php | 35 +- .../FHIRRelatedArtifactTypeList.php | 35 +- .../FHIRRemittanceOutcomeList.php | 35 +- .../FHIRRepositoryTypeList.php | 35 +- .../FHIRRequestIntentList.php | 35 +- .../FHIRRequestPriorityList.php | 35 +- .../FHIRRequestStatusList.php | 35 +- .../FHIRResearchStudyStatusList.php | 35 +- .../FHIRResearchSubjectStatusList.php | 35 +- .../FHIRResourceTypeList.php | 35 +- .../FHIRResourceVersionPolicyList.php | 35 +- .../FHIRResponseTypeList.php | 35 +- .../FHIRRestfulCapabilityModeList.php | 35 +- .../FHIRSearchComparatorList.php | 35 +- .../FHIRSearchEntryModeList.php | 35 +- .../FHIRSearchModifierCodeList.php | 35 +- .../FHIRSearchParamTypeList.php | 35 +- .../FHIRSlicingRulesList.php | 35 +- .../FHIRCodePrimitive/FHIRSlotStatusList.php | 35 +- .../FHIRSpecimenStatusList.php | 35 +- .../FHIRStructureDefinitionKindList.php | 35 +- .../FHIRStructureMapContextTypeList.php | 35 +- .../FHIRStructureMapGroupTypeModeList.php | 35 +- .../FHIRStructureMapInputModeList.php | 35 +- .../FHIRStructureMapModelModeList.php | 35 +- .../FHIRStructureMapSourceListModeList.php | 35 +- .../FHIRStructureMapTargetListModeList.php | 35 +- .../FHIRStructureMapTransformList.php | 35 +- .../FHIRSubscriptionChannelTypeList.php | 35 +- .../FHIRSubscriptionStatusList.php | 35 +- .../FHIRSupplyDeliveryStatusList.php | 35 +- .../FHIRSupplyRequestStatusList.php | 35 +- .../FHIRSystemRestfulInteractionList.php | 35 +- .../FHIRSystemVersionProcessingModeList.php | 35 +- .../FHIRCodePrimitive/FHIRTaskStatusList.php | 35 +- .../FHIRTestReportActionResultList.php | 35 +- .../FHIRTestReportParticipantTypeList.php | 35 +- .../FHIRTestReportResultList.php | 35 +- .../FHIRTestReportStatusList.php | 35 +- .../FHIRTestScriptRequestMethodCodeList.php | 35 +- .../FHIRCodePrimitive/FHIRTriggerTypeList.php | 35 +- .../FHIRTypeDerivationRuleList.php | 35 +- .../FHIRTypeRestfulInteractionList.php | 35 +- .../FHIRUDIEntryTypeList.php | 35 +- .../FHIRCodePrimitive/FHIRUnitsOfTimeList.php | 35 +- .../FHIRUnknownContentCodeList.php | 35 +- .../STU3/FHIRCodePrimitive/FHIRUseList.php | 35 +- .../FHIRCodePrimitive/FHIRVisionBaseList.php | 35 +- .../FHIRCodePrimitive/FHIRVisionEyesList.php | 35 +- .../FHIRXPathUsageTypeList.php | 35 +- .../STU3/FHIRDatePrimitive.php | 36 +- .../STU3/FHIRDateTimePrimitive.php | 36 +- .../STU3/FHIRDecimalPrimitive.php | 34 +- .../PHPFHIRGenerated/STU3/FHIRElement.php | 34 +- .../STU3/FHIRElement/FHIRAccountStatus.php | 64 +- .../FHIRActionCardinalityBehavior.php | 64 +- .../FHIRElement/FHIRActionConditionKind.php | 64 +- .../FHIRActionGroupingBehavior.php | 64 +- .../STU3/FHIRElement/FHIRActionList.php | 64 +- .../FHIRElement/FHIRActionParticipantType.php | 64 +- .../FHIRActionPrecheckBehavior.php | 64 +- .../FHIRActionRelationshipType.php | 64 +- .../FHIRActionRequiredBehavior.php | 64 +- .../FHIRActionSelectionBehavior.php | 64 +- .../STU3/FHIRElement/FHIRAddress.php | 219 +- .../STU3/FHIRElement/FHIRAddressType.php | 64 +- .../STU3/FHIRElement/FHIRAddressUse.php | 64 +- .../FHIRElement/FHIRAdministrativeGender.php | 64 +- .../FHIRElement/FHIRAdverseEventCategory.php | 64 +- .../FHIRElement/FHIRAdverseEventCausality.php | 64 +- .../STU3/FHIRElement/FHIRAggregationMode.php | 64 +- .../FHIRAllergyIntoleranceCategory.php | 64 +- .../FHIRAllergyIntoleranceClinicalStatus.php | 64 +- .../FHIRAllergyIntoleranceCriticality.php | 64 +- .../FHIRAllergyIntoleranceSeverity.php | 64 +- .../FHIRAllergyIntoleranceType.php | 64 +- ...IRAllergyIntoleranceVerificationStatus.php | 64 +- .../STU3/FHIRElement/FHIRAnnotation.php | 115 +- .../FHIRElement/FHIRAppointmentStatus.php | 64 +- .../FHIRAssertionDirectionType.php | 64 +- .../FHIRElement/FHIRAssertionOperatorType.php | 64 +- .../FHIRAssertionResponseTypes.php | 64 +- .../STU3/FHIRElement/FHIRAttachment.php | 183 +- .../STU3/FHIRElement/FHIRAuditEventAction.php | 64 +- .../FHIRAuditEventAgentNetworkType.php | 64 +- .../FHIRElement/FHIRAuditEventOutcome.php | 64 +- .../STU3/FHIRElement/FHIRBackboneElement.php | 66 +- .../FHIRAccount/FHIRAccountCoverage.php | 93 +- .../FHIRAccount/FHIRAccountGuarantor.php | 110 +- .../FHIRActivityDefinitionDynamicValue.php | 127 +- .../FHIRActivityDefinitionParticipant.php | 93 +- .../FHIRAdverseEventSuspectEntity.php | 178 +- .../FHIRAllergyIntoleranceReaction.php | 182 +- .../FHIRAppointmentParticipant.php | 129 +- .../FHIRAuditEvent/FHIRAuditEventAgent.php | 252 +- .../FHIRAuditEvent/FHIRAuditEventDetail.php | 93 +- .../FHIRAuditEvent/FHIRAuditEventEntity.php | 233 +- .../FHIRAuditEvent/FHIRAuditEventNetwork.php | 93 +- .../FHIRAuditEvent/FHIRAuditEventSource.php | 112 +- .../FHIRBundle/FHIRBundleEntry.php | 163 +- .../FHIRBundle/FHIRBundleLink.php | 93 +- .../FHIRBundle/FHIRBundleRequest.php | 161 +- .../FHIRBundle/FHIRBundleResponse.php | 144 +- .../FHIRBundle/FHIRBundleSearch.php | 93 +- .../FHIRCapabilityStatementCertificate.php | 93 +- .../FHIRCapabilityStatementDocument.php | 110 +- .../FHIRCapabilityStatementEndpoint.php | 93 +- .../FHIRCapabilityStatementEvent.php | 178 +- .../FHIRCapabilityStatementImplementation.php | 93 +- .../FHIRCapabilityStatementInteraction.php | 93 +- .../FHIRCapabilityStatementInteraction1.php | 93 +- .../FHIRCapabilityStatementMessaging.php | 150 +- .../FHIRCapabilityStatementOperation.php | 93 +- .../FHIRCapabilityStatementResource.php | 324 +- .../FHIRCapabilityStatementRest.php | 205 +- .../FHIRCapabilityStatementSearchParam.php | 127 +- .../FHIRCapabilityStatementSecurity.php | 131 +- .../FHIRCapabilityStatementSoftware.php | 110 +- ...HIRCapabilityStatementSupportedMessage.php | 93 +- .../FHIRCarePlan/FHIRCarePlanActivity.php | 150 +- .../FHIRCarePlan/FHIRCarePlanDetail.php | 390 +- .../FHIRCareTeam/FHIRCareTeamParticipant.php | 127 +- .../FHIRChargeItemParticipant.php | 93 +- .../FHIRClaim/FHIRClaimAccident.php | 127 +- .../FHIRClaim/FHIRClaimCareTeam.php | 144 +- .../FHIRClaim/FHIRClaimDetail.php | 271 +- .../FHIRClaim/FHIRClaimDiagnosis.php | 146 +- .../FHIRClaim/FHIRClaimInformation.php | 229 +- .../FHIRClaim/FHIRClaimInsurance.php | 163 +- .../FHIRClaim/FHIRClaimItem.php | 487 +- .../FHIRClaim/FHIRClaimPayee.php | 110 +- .../FHIRClaim/FHIRClaimProcedure.php | 127 +- .../FHIRClaim/FHIRClaimRelated.php | 110 +- .../FHIRClaim/FHIRClaimSubDetail.php | 252 +- .../FHIRClaimResponseAddItem.php | 222 +- .../FHIRClaimResponseAdjudication.php | 127 +- .../FHIRClaimResponseDetail.php | 133 +- .../FHIRClaimResponseDetail1.php | 184 +- .../FHIRClaimResponseError.php | 127 +- .../FHIRClaimResponseInsurance.php | 163 +- .../FHIRClaimResponseItem.php | 133 +- .../FHIRClaimResponsePayment.php | 161 +- .../FHIRClaimResponseProcessNote.php | 127 +- .../FHIRClaimResponseSubDetail.php | 114 +- .../FHIRClinicalImpressionFinding.php | 110 +- .../FHIRClinicalImpressionInvestigation.php | 95 +- .../FHIRCodeSystem/FHIRCodeSystemConcept.php | 167 +- .../FHIRCodeSystemDesignation.php | 110 +- .../FHIRCodeSystem/FHIRCodeSystemFilter.php | 129 +- .../FHIRCodeSystem/FHIRCodeSystemProperty.php | 127 +- .../FHIRCodeSystemProperty1.php | 178 +- .../FHIRCommunicationPayload.php | 110 +- .../FHIRCommunicationRequestPayload.php | 110 +- .../FHIRCommunicationRequestRequester.php | 93 +- .../FHIRCompartmentDefinitionResource.php | 112 +- .../FHIRCompositionAttester.php | 112 +- .../FHIRComposition/FHIRCompositionEvent.php | 114 +- .../FHIRCompositionRelatesTo.php | 110 +- .../FHIRCompositionSection.php | 199 +- .../FHIRConceptMapDependsOn.php | 127 +- .../FHIRConceptMap/FHIRConceptMapElement.php | 112 +- .../FHIRConceptMap/FHIRConceptMapGroup.php | 163 +- .../FHIRConceptMap/FHIRConceptMapTarget.php | 165 +- .../FHIRConceptMap/FHIRConceptMapUnmapped.php | 127 +- .../FHIRCondition/FHIRConditionEvidence.php | 97 +- .../FHIRCondition/FHIRConditionStage.php | 95 +- .../FHIRConsent/FHIRConsentActor.php | 93 +- .../FHIRConsent/FHIRConsentActor1.php | 93 +- .../FHIRConsent/FHIRConsentData.php | 93 +- .../FHIRConsent/FHIRConsentData1.php | 93 +- .../FHIRConsent/FHIRConsentExcept.php | 243 +- .../FHIRConsent/FHIRConsentPolicy.php | 93 +- .../FHIRContract/FHIRContractAgent.php | 95 +- .../FHIRContract/FHIRContractAgent1.php | 95 +- .../FHIRContract/FHIRContractFriendly.php | 93 +- .../FHIRContract/FHIRContractLegal.php | 93 +- .../FHIRContract/FHIRContractRule.php | 93 +- .../FHIRContract/FHIRContractSigner.php | 112 +- .../FHIRContract/FHIRContractTerm.php | 294 +- .../FHIRContract/FHIRContractValuedItem.php | 212 +- .../FHIRContract/FHIRContractValuedItem1.php | 212 +- .../FHIRCoverage/FHIRCoverageGrouping.php | 263 +- .../FHIRDataElementMapping.php | 127 +- .../FHIRDetectedIssueMitigation.php | 110 +- .../FHIRDevice/FHIRDeviceUdi.php | 178 +- ...DeviceComponentProductionSpecification.php | 110 +- .../FHIRDeviceMetricCalibration.php | 110 +- .../FHIRDeviceRequestRequester.php | 93 +- .../FHIRDiagnosticReportImage.php | 93 +- .../FHIRDiagnosticReportPerformer.php | 93 +- .../FHIRDocumentManifestContent.php | 93 +- .../FHIRDocumentManifestRelated.php | 93 +- .../FHIRDocumentReferenceContent.php | 93 +- .../FHIRDocumentReferenceContext.php | 182 +- .../FHIRDocumentReferenceRelated.php | 93 +- .../FHIRDocumentReferenceRelatesTo.php | 93 +- .../FHIREligibilityResponseBenefitBalance.php | 214 +- .../FHIREligibilityResponseError.php | 76 +- .../FHIREligibilityResponseFinancial.php | 161 +- .../FHIREligibilityResponseInsurance.php | 112 +- .../FHIREncounterClassHistory.php | 93 +- .../FHIREncounter/FHIREncounterDiagnosis.php | 110 +- .../FHIREncounterHospitalization.php | 218 +- .../FHIREncounter/FHIREncounterLocation.php | 110 +- .../FHIREncounterParticipant.php | 112 +- .../FHIREncounterStatusHistory.php | 93 +- .../FHIREpisodeOfCareDiagnosis.php | 110 +- .../FHIREpisodeOfCareStatusHistory.php | 93 +- .../FHIRExpansionProfileDesignation.php | 93 +- .../FHIRExpansionProfileDesignation1.php | 93 +- .../FHIRExpansionProfileDesignation2.php | 93 +- .../FHIRExpansionProfileExclude.php | 78 +- .../FHIRExpansionProfileExcludedSystem.php | 93 +- .../FHIRExpansionProfileFixedVersion.php | 110 +- .../FHIRExpansionProfileInclude.php | 78 +- .../FHIRExplanationOfBenefitAccident.php | 127 +- .../FHIRExplanationOfBenefitAddItem.php | 222 +- .../FHIRExplanationOfBenefitAdjudication.php | 127 +- ...FHIRExplanationOfBenefitBenefitBalance.php | 214 +- .../FHIRExplanationOfBenefitCareTeam.php | 144 +- .../FHIRExplanationOfBenefitDetail.php | 326 +- .../FHIRExplanationOfBenefitDetail1.php | 184 +- .../FHIRExplanationOfBenefitDiagnosis.php | 146 +- .../FHIRExplanationOfBenefitFinancial.php | 161 +- .../FHIRExplanationOfBenefitInformation.php | 229 +- .../FHIRExplanationOfBenefitInsurance.php | 95 +- .../FHIRExplanationOfBenefitItem.php | 525 ++- .../FHIRExplanationOfBenefitPayee.php | 110 +- .../FHIRExplanationOfBenefitPayment.php | 161 +- .../FHIRExplanationOfBenefitProcedure.php | 127 +- .../FHIRExplanationOfBenefitProcessNote.php | 127 +- .../FHIRExplanationOfBenefitRelated.php | 110 +- .../FHIRExplanationOfBenefitSubDetail.php | 307 +- .../FHIRFamilyMemberHistoryCondition.php | 180 +- .../FHIRGoal/FHIRGoalTarget.php | 161 +- .../FHIRGraphDefinitionCompartment.php | 127 +- .../FHIRGraphDefinitionLink.php | 163 +- .../FHIRGraphDefinitionTarget.php | 131 +- .../FHIRGroup/FHIRGroupCharacteristic.php | 178 +- .../FHIRGroup/FHIRGroupMember.php | 110 +- .../FHIRHealthcareServiceAvailableTime.php | 129 +- .../FHIRHealthcareServiceNotAvailable.php | 93 +- .../FHIRImagingManifestInstance.php | 93 +- .../FHIRImagingManifestSeries.php | 114 +- .../FHIRImagingManifestStudy.php | 131 +- .../FHIRImagingStudyInstance.php | 127 +- .../FHIRImagingStudySeries.php | 269 +- .../FHIRImmunizationExplanation.php | 97 +- .../FHIRImmunizationPractitioner.php | 93 +- .../FHIRImmunizationReaction.php | 110 +- .../FHIRImmunizationVaccinationProtocol.php | 197 +- ...mmunizationRecommendationDateCriterion.php | 93 +- ...FHIRImmunizationRecommendationProtocol.php | 127 +- ...munizationRecommendationRecommendation.php | 218 +- .../FHIRImplementationGuideDependency.php | 93 +- .../FHIRImplementationGuideGlobal.php | 93 +- .../FHIRImplementationGuidePackage.php | 112 +- .../FHIRImplementationGuidePage.php | 184 +- .../FHIRImplementationGuideResource.php | 178 +- .../FHIRLinkage/FHIRLinkageItem.php | 93 +- .../FHIRList/FHIRListEntry.php | 127 +- .../FHIRLocation/FHIRLocationPosition.php | 110 +- .../FHIRMeasure/FHIRMeasureGroup.php | 148 +- .../FHIRMeasure/FHIRMeasurePopulation.php | 144 +- .../FHIRMeasure/FHIRMeasureStratifier.php | 110 +- .../FHIRMeasureSupplementalData.php | 129 +- .../FHIRMeasureReportGroup.php | 131 +- .../FHIRMeasureReportPopulation.php | 127 +- .../FHIRMeasureReportPopulation1.php | 127 +- .../FHIRMeasureReportStratifier.php | 95 +- .../FHIRMeasureReportStratum.php | 112 +- .../FHIRMedication/FHIRMedicationBatch.php | 93 +- .../FHIRMedication/FHIRMedicationContent.php | 110 +- .../FHIRMedicationIngredient.php | 127 +- .../FHIRMedication/FHIRMedicationPackage.php | 114 +- .../FHIRMedicationAdministrationDosage.php | 178 +- .../FHIRMedicationAdministrationPerformer.php | 93 +- .../FHIRMedicationDispensePerformer.php | 93 +- .../FHIRMedicationDispenseSubstitution.php | 131 +- .../FHIRMedicationRequestDispenseRequest.php | 144 +- .../FHIRMedicationRequestRequester.php | 93 +- .../FHIRMedicationRequestSubstitution.php | 93 +- .../FHIRMessageDefinitionAllowedResponse.php | 93 +- .../FHIRMessageDefinitionFocus.php | 127 +- .../FHIRMessageHeaderDestination.php | 110 +- .../FHIRMessageHeaderResponse.php | 110 +- .../FHIRMessageHeaderSource.php | 144 +- .../FHIRNamingSystemUniqueId.php | 144 +- .../FHIRNutritionOrderAdministration.php | 127 +- .../FHIRNutritionOrderEnteralFormula.php | 214 +- .../FHIRNutritionOrderNutrient.php | 93 +- .../FHIRNutritionOrderOralDiet.php | 171 +- .../FHIRNutritionOrderSupplement.php | 146 +- .../FHIRNutritionOrderTexture.php | 93 +- .../FHIRObservationComponent.php | 299 +- .../FHIRObservationReferenceRange.php | 163 +- .../FHIRObservationRelated.php | 93 +- .../FHIROperationDefinitionBinding.php | 110 +- .../FHIROperationDefinitionOverload.php | 95 +- .../FHIROperationDefinitionParameter.php | 231 +- .../FHIROperationOutcomeIssue.php | 165 +- .../FHIROrganizationContact.php | 129 +- .../FHIRParametersParameter.php | 758 +++- .../FHIRPatient/FHIRPatientAnimal.php | 110 +- .../FHIRPatient/FHIRPatientCommunication.php | 93 +- .../FHIRPatient/FHIRPatientContact.php | 182 +- .../FHIRPatient/FHIRPatientLink.php | 93 +- .../FHIRPaymentReconciliationDetail.php | 178 +- .../FHIRPaymentReconciliationProcessNote.php | 93 +- .../FHIRPerson/FHIRPersonLink.php | 93 +- .../FHIRPlanDefinitionAction.php | 576 ++- .../FHIRPlanDefinitionCondition.php | 127 +- .../FHIRPlanDefinitionDynamicValue.php | 127 +- .../FHIRPlanDefinitionGoal.php | 184 +- .../FHIRPlanDefinitionParticipant.php | 93 +- .../FHIRPlanDefinitionRelatedAction.php | 127 +- .../FHIRPlanDefinitionTarget.php | 144 +- .../FHIRPractitionerQualification.php | 129 +- .../FHIRPractitionerRoleAvailableTime.php | 129 +- .../FHIRPractitionerRoleNotAvailable.php | 93 +- .../FHIRProcedureFocalDevice.php | 93 +- .../FHIRProcedure/FHIRProcedurePerformer.php | 110 +- .../FHIRProcedureRequestRequester.php | 93 +- .../FHIRProcessRequestItem.php | 76 +- .../FHIRProcessResponseProcessNote.php | 93 +- .../FHIRProvenance/FHIRProvenanceAgent.php | 163 +- .../FHIRProvenance/FHIRProvenanceEntity.php | 146 +- .../FHIRQuestionnaireEnableWhen.php | 297 +- .../FHIRQuestionnaireItem.php | 509 ++- .../FHIRQuestionnaireOption.php | 144 +- .../FHIRQuestionnaireResponseAnswer.php | 282 +- .../FHIRQuestionnaireResponseItem.php | 165 +- .../FHIRReferralRequestRequester.php | 93 +- .../FHIRRequestGroupAction.php | 445 +- .../FHIRRequestGroupCondition.php | 127 +- .../FHIRRequestGroupRelatedAction.php | 127 +- .../FHIRResearchStudyArm.php | 110 +- .../FHIRRiskAssessmentPrediction.php | 195 +- .../FHIRSearchParameterComponent.php | 93 +- .../FHIRSequence/FHIRSequenceQuality.php | 297 +- .../FHIRSequence/FHIRSequenceReferenceSeq.php | 195 +- .../FHIRSequence/FHIRSequenceRepository.php | 161 +- .../FHIRSequence/FHIRSequenceVariant.php | 161 +- .../FHIRSpecimen/FHIRSpecimenCollection.php | 161 +- .../FHIRSpecimen/FHIRSpecimenContainer.php | 180 +- .../FHIRSpecimen/FHIRSpecimenProcessing.php | 146 +- .../FHIRStructureDefinitionDifferential.php | 78 +- .../FHIRStructureDefinitionMapping.php | 127 +- .../FHIRStructureDefinitionSnapshot.php | 78 +- .../FHIRStructureMapDependent.php | 95 +- .../FHIRStructureMapGroup.php | 165 +- .../FHIRStructureMapInput.php | 127 +- .../FHIRStructureMapParameter.php | 144 +- .../FHIRStructureMap/FHIRStructureMapRule.php | 169 +- .../FHIRStructureMapSource.php | 858 +++- .../FHIRStructureMapStructure.php | 127 +- .../FHIRStructureMapTarget.php | 199 +- .../FHIRSubscriptionChannel.php | 129 +- .../FHIRSubstance/FHIRSubstanceIngredient.php | 110 +- .../FHIRSubstance/FHIRSubstanceInstance.php | 110 +- .../FHIRSupplyDeliverySuppliedItem.php | 110 +- .../FHIRSupplyRequestOrderedItem.php | 110 +- .../FHIRSupplyRequestRequester.php | 93 +- .../FHIRTask/FHIRTaskInput.php | 722 ++- .../FHIRTask/FHIRTaskOutput.php | 722 ++- .../FHIRTask/FHIRTaskRequester.php | 93 +- .../FHIRTask/FHIRTaskRestriction.php | 112 +- .../FHIRTestReport/FHIRTestReportAction.php | 93 +- .../FHIRTestReport/FHIRTestReportAction1.php | 93 +- .../FHIRTestReport/FHIRTestReportAction2.php | 76 +- .../FHIRTestReport/FHIRTestReportAssert.php | 110 +- .../FHIRTestReportOperation.php | 110 +- .../FHIRTestReportParticipant.php | 110 +- .../FHIRTestReport/FHIRTestReportSetup.php | 78 +- .../FHIRTestReport/FHIRTestReportTeardown.php | 78 +- .../FHIRTestReport/FHIRTestReportTest.php | 112 +- .../FHIRTestScript/FHIRTestScriptAction.php | 93 +- .../FHIRTestScript/FHIRTestScriptAction1.php | 93 +- .../FHIRTestScript/FHIRTestScriptAction2.php | 76 +- .../FHIRTestScript/FHIRTestScriptAssert.php | 467 +- .../FHIRTestScriptCapability.php | 182 +- .../FHIRTestScriptDestination.php | 93 +- .../FHIRTestScript/FHIRTestScriptFixture.php | 110 +- .../FHIRTestScript/FHIRTestScriptLink.php | 93 +- .../FHIRTestScript/FHIRTestScriptMetadata.php | 97 +- .../FHIRTestScriptOperation.php | 333 +- .../FHIRTestScript/FHIRTestScriptOrigin.php | 93 +- .../FHIRTestScript/FHIRTestScriptParam.php | 93 +- .../FHIRTestScript/FHIRTestScriptParam1.php | 93 +- .../FHIRTestScript/FHIRTestScriptParam2.php | 93 +- .../FHIRTestScript/FHIRTestScriptParam3.php | 93 +- .../FHIRTestScriptRequestHeader.php | 93 +- .../FHIRTestScript/FHIRTestScriptRule.php | 95 +- .../FHIRTestScript/FHIRTestScriptRule1.php | 95 +- .../FHIRTestScript/FHIRTestScriptRule2.php | 95 +- .../FHIRTestScript/FHIRTestScriptRule3.php | 95 +- .../FHIRTestScript/FHIRTestScriptRuleset.php | 95 +- .../FHIRTestScript/FHIRTestScriptRuleset1.php | 95 +- .../FHIRTestScript/FHIRTestScriptSetup.php | 78 +- .../FHIRTestScript/FHIRTestScriptTeardown.php | 78 +- .../FHIRTestScript/FHIRTestScriptTest.php | 112 +- .../FHIRTestScript/FHIRTestScriptVariable.php | 195 +- .../FHIRValueSet/FHIRValueSetCompose.php | 131 +- .../FHIRValueSet/FHIRValueSetConcept.php | 112 +- .../FHIRValueSet/FHIRValueSetContains.php | 199 +- .../FHIRValueSet/FHIRValueSetDesignation.php | 110 +- .../FHIRValueSet/FHIRValueSetExpansion.php | 165 +- .../FHIRValueSet/FHIRValueSetFilter.php | 110 +- .../FHIRValueSet/FHIRValueSetInclude.php | 150 +- .../FHIRValueSet/FHIRValueSetParameter.php | 178 +- .../FHIRVisionPrescriptionDispense.php | 316 +- .../STU3/FHIRElement/FHIRBase64Binary.php | 64 +- .../STU3/FHIRElement/FHIRBindingStrength.php | 64 +- .../STU3/FHIRElement/FHIRBoolean.php | 64 +- .../STU3/FHIRElement/FHIRBundleType.php | 64 +- .../FHIRCapabilityStatementKind.php | 64 +- .../FHIRCarePlanActivityStatus.php | 64 +- .../STU3/FHIRElement/FHIRCarePlanIntent.php | 64 +- .../STU3/FHIRElement/FHIRCarePlanStatus.php | 64 +- .../STU3/FHIRElement/FHIRCareTeamStatus.php | 64 +- .../STU3/FHIRElement/FHIRChargeItemStatus.php | 64 +- .../FHIRClinicalImpressionStatus.php | 64 +- .../STU3/FHIRElement/FHIRCode.php | 64 +- .../FHIRElement/FHIRCodeSystemContentMode.php | 64 +- .../FHIRCodeSystemHierarchyMeaning.php | 64 +- .../STU3/FHIRElement/FHIRCodeableConcept.php | 83 +- .../STU3/FHIRElement/FHIRCoding.php | 132 +- .../STU3/FHIRElement/FHIRCompartmentType.php | 64 +- .../FHIRCompositionAttestationMode.php | 64 +- .../FHIRElement/FHIRCompositionStatus.php | 64 +- .../FHIRElement/FHIRConceptMapEquivalence.php | 64 +- .../FHIRConceptMapGroupUnmappedMode.php | 64 +- .../FHIRConditionClinicalStatusCodes.php | 64 +- .../FHIRConditionVerificationStatus.php | 64 +- .../FHIRConditionalDeleteStatus.php | 64 +- .../FHIRElement/FHIRConditionalReadStatus.php | 64 +- .../FHIRConfidentialityClassification.php | 64 +- .../FHIRElement/FHIRConsentDataMeaning.php | 64 +- .../FHIRElement/FHIRConsentExceptType.php | 64 +- .../STU3/FHIRElement/FHIRConsentState.php | 64 +- .../FHIRElement/FHIRConstraintSeverity.php | 64 +- .../STU3/FHIRElement/FHIRContactDetail.php | 83 +- .../STU3/FHIRElement/FHIRContactPoint.php | 132 +- .../FHIRElement/FHIRContactPointSystem.php | 64 +- .../STU3/FHIRElement/FHIRContactPointUse.php | 64 +- .../STU3/FHIRElement/FHIRContentType.php | 64 +- .../FHIRContractResourceStatusCodes.php | 64 +- .../STU3/FHIRElement/FHIRContributor.php | 100 +- .../STU3/FHIRElement/FHIRContributorType.php | 64 +- .../FHIRElement/FHIRDataElementStringency.php | 64 +- .../STU3/FHIRElement/FHIRDataRequirement.php | 140 +- .../FHIRDataRequirementCodeFilter.php | 155 +- .../FHIRDataRequirementDateFilter.php | 115 +- .../STU3/FHIRElement/FHIRDate.php | 64 +- .../STU3/FHIRElement/FHIRDateTime.php | 64 +- .../STU3/FHIRElement/FHIRDaysOfWeek.php | 64 +- .../STU3/FHIRElement/FHIRDecimal.php | 64 +- .../FHIRElement/FHIRDetectedIssueSeverity.php | 64 +- .../FHIRDeviceMetricCalibrationState.php | 64 +- .../FHIRDeviceMetricCalibrationType.php | 64 +- .../FHIRElement/FHIRDeviceMetricCategory.php | 64 +- .../FHIRElement/FHIRDeviceMetricColor.php | 64 +- .../FHIRDeviceMetricOperationalStatus.php | 64 +- .../FHIRDeviceUseStatementStatus.php | 64 +- .../FHIRDiagnosticReportStatus.php | 64 +- .../STU3/FHIRElement/FHIRDigitalMediaType.php | 64 +- .../FHIRElement/FHIRDiscriminatorType.php | 64 +- .../STU3/FHIRElement/FHIRDocumentMode.php | 64 +- .../FHIRDocumentReferenceStatus.php | 64 +- .../FHIRDocumentRelationshipType.php | 64 +- .../STU3/FHIRElement/FHIRDosage.php | 355 +- .../FHIRElement/FHIRElementDefinition.php | 2766 +++++++++++- .../FHIRElementDefinitionBase.php | 98 +- .../FHIRElementDefinitionBinding.php | 115 +- .../FHIRElementDefinitionConstraint.php | 166 +- .../FHIRElementDefinitionDiscriminator.php | 81 +- .../FHIRElementDefinitionExample.php | 710 ++- .../FHIRElementDefinitionMapping.php | 115 +- .../FHIRElementDefinitionSlicing.php | 117 +- .../FHIRElementDefinitionType.php | 134 +- .../FHIREncounterLocationStatus.php | 64 +- .../STU3/FHIRElement/FHIREncounterStatus.php | 64 +- .../STU3/FHIRElement/FHIREndpointStatus.php | 64 +- .../FHIRElement/FHIREpisodeOfCareStatus.php | 64 +- .../FHIRElement/FHIREventCapabilityMode.php | 64 +- .../STU3/FHIRElement/FHIREventStatus.php | 64 +- .../STU3/FHIRElement/FHIREventTiming.php | 64 +- .../FHIRExplanationOfBenefitStatus.php | 64 +- .../STU3/FHIRElement/FHIRExtension.php | 710 ++- .../STU3/FHIRElement/FHIRExtensionContext.php | 64 +- .../STU3/FHIRElement/FHIRFHIRAllTypes.php | 64 +- .../STU3/FHIRElement/FHIRFHIRDefinedType.php | 64 +- .../STU3/FHIRElement/FHIRFHIRDeviceStatus.php | 64 +- .../FHIRElement/FHIRFHIRSubstanceStatus.php | 64 +- .../FHIRElement/FHIRFamilyHistoryStatus.php | 64 +- .../STU3/FHIRElement/FHIRFilterOperator.php | 64 +- .../FHIRFinancialResourceStatusCodes.php | 64 +- .../STU3/FHIRElement/FHIRFlagStatus.php | 64 +- .../STU3/FHIRElement/FHIRGoalStatus.php | 64 +- .../FHIRElement/FHIRGraphCompartmentRule.php | 64 +- .../STU3/FHIRElement/FHIRGroupType.php | 64 +- .../FHIRGuidanceResponseStatus.php | 64 +- .../FHIRElement/FHIRGuideDependencyType.php | 64 +- .../STU3/FHIRElement/FHIRGuidePageKind.php | 64 +- .../STU3/FHIRElement/FHIRHTTPVerb.php | 64 +- .../STU3/FHIRElement/FHIRHumanName.php | 172 +- .../STU3/FHIRElement/FHIRId.php | 64 +- .../STU3/FHIRElement/FHIRIdentifier.php | 149 +- .../STU3/FHIRElement/FHIRIdentifierUse.php | 64 +- .../FHIRIdentityAssuranceLevel.php | 64 +- .../FHIRImmunizationStatusCodes.php | 64 +- .../FHIRElement/FHIRInstanceAvailability.php | 64 +- .../STU3/FHIRElement/FHIRInstant.php | 64 +- .../STU3/FHIRElement/FHIRInteger.php | 64 +- .../STU3/FHIRElement/FHIRIssueSeverity.php | 64 +- .../STU3/FHIRElement/FHIRIssueType.php | 64 +- .../STU3/FHIRElement/FHIRLinkType.php | 64 +- .../STU3/FHIRElement/FHIRLinkageType.php | 64 +- .../STU3/FHIRElement/FHIRListMode.php | 64 +- .../STU3/FHIRElement/FHIRListStatus.php | 64 +- .../STU3/FHIRElement/FHIRLocationMode.php | 64 +- .../STU3/FHIRElement/FHIRLocationStatus.php | 64 +- .../STU3/FHIRElement/FHIRMarkdown.php | 64 +- .../STU3/FHIRElement/FHIRMeasmntPrinciple.php | 64 +- .../FHIRElement/FHIRMeasureReportStatus.php | 64 +- .../FHIRElement/FHIRMeasureReportType.php | 64 +- .../FHIRMedicationAdministrationStatus.php | 64 +- .../FHIRMedicationDispenseStatus.php | 64 +- .../FHIRMedicationRequestIntent.php | 64 +- .../FHIRMedicationRequestPriority.php | 64 +- .../FHIRMedicationRequestStatus.php | 64 +- .../FHIRMedicationStatementStatus.php | 64 +- .../FHIRMedicationStatementTaken.php | 64 +- .../STU3/FHIRElement/FHIRMedicationStatus.php | 64 +- .../FHIRMessageSignificanceCategory.php | 64 +- .../STU3/FHIRElement/FHIRMeta.php | 138 +- .../STU3/FHIRElement/FHIRNameUse.php | 64 +- .../FHIRNamingSystemIdentifierType.php | 64 +- .../STU3/FHIRElement/FHIRNamingSystemType.php | 64 +- .../STU3/FHIRElement/FHIRNarrative.php | 81 +- .../STU3/FHIRElement/FHIRNarrativeStatus.php | 64 +- .../STU3/FHIRElement/FHIRNoteType.php | 64 +- .../FHIRElement/FHIRNutritionOrderStatus.php | 64 +- .../FHIRObservationRelationshipType.php | 64 +- .../FHIRElement/FHIRObservationStatus.php | 64 +- .../STU3/FHIRElement/FHIROid.php | 64 +- .../STU3/FHIRElement/FHIROperationKind.php | 64 +- .../FHIRElement/FHIROperationParameterUse.php | 64 +- .../FHIRElement/FHIRParameterDefinition.php | 166 +- .../FHIRElement/FHIRParticipantRequired.php | 64 +- .../FHIRElement/FHIRParticipationStatus.php | 64 +- .../STU3/FHIRElement/FHIRPeriod.php | 81 +- .../STU3/FHIRElement/FHIRPositiveInt.php | 64 +- .../FHIRPropertyRepresentation.php | 64 +- .../STU3/FHIRElement/FHIRPropertyType.php | 64 +- .../FHIRElement/FHIRProvenanceEntityRole.php | 64 +- .../FHIRElement/FHIRPublicationStatus.php | 64 +- .../STU3/FHIRElement/FHIRQualityType.php | 64 +- .../STU3/FHIRElement/FHIRQuantity.php | 132 +- .../STU3/FHIRElement/FHIRQuantity/FHIRAge.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRCount.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRDistance.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRDuration.php | 107 +- .../FHIRElement/FHIRQuantity/FHIRMoney.php | 107 +- .../FHIRElement/FHIRQuantityComparator.php | 64 +- .../FHIRElement/FHIRQuestionnaireItemType.php | 64 +- .../FHIRQuestionnaireResponseStatus.php | 64 +- .../STU3/FHIRElement/FHIRRange.php | 81 +- .../STU3/FHIRElement/FHIRRatio.php | 81 +- .../STU3/FHIRElement/FHIRReference.php | 98 +- .../FHIRReferenceHandlingPolicy.php | 64 +- .../FHIRElement/FHIRReferenceVersionRules.php | 64 +- .../STU3/FHIRElement/FHIRRelatedArtifact.php | 149 +- .../FHIRElement/FHIRRelatedArtifactType.php | 64 +- .../FHIRElement/FHIRRemittanceOutcome.php | 64 +- .../STU3/FHIRElement/FHIRRepositoryType.php | 64 +- .../STU3/FHIRElement/FHIRRequestIntent.php | 64 +- .../STU3/FHIRElement/FHIRRequestPriority.php | 64 +- .../STU3/FHIRElement/FHIRRequestStatus.php | 64 +- .../FHIRElement/FHIRResearchStudyStatus.php | 64 +- .../FHIRElement/FHIRResearchSubjectStatus.php | 64 +- .../STU3/FHIRElement/FHIRResourceType.php | 64 +- .../FHIRElement/FHIRResourceVersionPolicy.php | 64 +- .../STU3/FHIRElement/FHIRResponseType.php | 64 +- .../FHIRElement/FHIRRestfulCapabilityMode.php | 64 +- .../STU3/FHIRElement/FHIRSampledData.php | 166 +- .../FHIRElement/FHIRSampledDataDataType.php | 64 +- .../STU3/FHIRElement/FHIRSearchComparator.php | 64 +- .../STU3/FHIRElement/FHIRSearchEntryMode.php | 64 +- .../FHIRElement/FHIRSearchModifierCode.php | 64 +- .../STU3/FHIRElement/FHIRSearchParamType.php | 64 +- .../STU3/FHIRElement/FHIRSignature.php | 185 +- .../STU3/FHIRElement/FHIRSlicingRules.php | 64 +- .../STU3/FHIRElement/FHIRSlotStatus.php | 64 +- .../STU3/FHIRElement/FHIRSpecimenStatus.php | 64 +- .../STU3/FHIRElement/FHIRString.php | 64 +- .../FHIRStructureDefinitionKind.php | 64 +- .../FHIRStructureMapContextType.php | 64 +- .../FHIRStructureMapGroupTypeMode.php | 64 +- .../FHIRElement/FHIRStructureMapInputMode.php | 64 +- .../FHIRElement/FHIRStructureMapModelMode.php | 64 +- .../FHIRStructureMapSourceListMode.php | 64 +- .../FHIRStructureMapTargetListMode.php | 64 +- .../FHIRElement/FHIRStructureMapTransform.php | 64 +- .../FHIRSubscriptionChannelType.php | 64 +- .../FHIRElement/FHIRSubscriptionStatus.php | 64 +- .../FHIRElement/FHIRSupplyDeliveryStatus.php | 64 +- .../FHIRElement/FHIRSupplyRequestStatus.php | 64 +- .../FHIRSystemRestfulInteraction.php | 64 +- .../FHIRSystemVersionProcessingMode.php | 64 +- .../STU3/FHIRElement/FHIRTaskStatus.php | 64 +- .../FHIRTestReportActionResult.php | 64 +- .../FHIRTestReportParticipantType.php | 64 +- .../STU3/FHIRElement/FHIRTestReportResult.php | 64 +- .../STU3/FHIRElement/FHIRTestReportStatus.php | 64 +- .../FHIRTestScriptRequestMethodCode.php | 64 +- .../STU3/FHIRElement/FHIRTime.php | 64 +- .../STU3/FHIRElement/FHIRTiming.php | 100 +- .../FHIRTiming/FHIRTimingRepeat.php | 342 +- .../FHIRElement/FHIRTriggerDefinition.php | 166 +- .../STU3/FHIRElement/FHIRTriggerType.php | 64 +- .../FHIRElement/FHIRTypeDerivationRule.php | 64 +- .../FHIRTypeRestfulInteraction.php | 64 +- .../STU3/FHIRElement/FHIRUDIEntryType.php | 64 +- .../STU3/FHIRElement/FHIRUnitsOfTime.php | 64 +- .../FHIRElement/FHIRUnknownContentCode.php | 64 +- .../STU3/FHIRElement/FHIRUnsignedInt.php | 64 +- .../STU3/FHIRElement/FHIRUri.php | 64 +- .../STU3/FHIRElement/FHIRUsageContext.php | 115 +- .../STU3/FHIRElement/FHIRUse.php | 64 +- .../STU3/FHIRElement/FHIRUuid.php | 64 +- .../STU3/FHIRElement/FHIRVisionBase.php | 64 +- .../STU3/FHIRElement/FHIRVisionEyes.php | 64 +- .../STU3/FHIRElement/FHIRXPathUsageType.php | 64 +- .../PHPFHIRGenerated/STU3/FHIRIdPrimitive.php | 34 +- .../STU3/FHIRInstantPrimitive.php | 36 +- .../STU3/FHIRIntegerPrimitive.php | 34 +- .../STU3/FHIRMarkdownPrimitive.php | 34 +- .../STU3/FHIROidPrimitive.php | 34 +- .../STU3/FHIRPositiveIntPrimitive.php | 34 +- .../PHPFHIRGenerated/STU3/FHIRResource.php | 42 +- .../STU3/FHIRResource/FHIRBinary.php | 122 +- .../STU3/FHIRResource/FHIRBundle.php | 177 +- .../STU3/FHIRResource/FHIRDomainResource.php | 145 +- .../FHIRDomainResource/FHIRAccount.php | 329 +- .../FHIRActivityDefinition.php | 789 +++- .../FHIRDomainResource/FHIRAdverseEvent.php | 401 +- .../FHIRAllergyIntolerance.php | 450 +- .../FHIRDomainResource/FHIRAppointment.php | 479 +- .../FHIRAppointmentResponse.php | 259 +- .../FHIRDomainResource/FHIRAuditEvent.php | 297 +- .../FHIRDomainResource/FHIRBasic.php | 206 +- .../FHIRDomainResource/FHIRBodySite.php | 244 +- .../FHIRCapabilityStatement.php | 600 ++- .../FHIRDomainResource/FHIRCarePlan.php | 485 +- .../FHIRDomainResource/FHIRCareTeam.php | 337 +- .../FHIRDomainResource/FHIRChargeItem.php | 562 ++- .../FHIRDomainResource/FHIRClaim.php | 647 ++- .../FHIRDomainResource/FHIRClaimResponse.php | 524 ++- .../FHIRClinicalImpression.php | 477 +- .../FHIRDomainResource/FHIRCodeSystem.php | 556 ++- .../FHIRDomainResource/FHIRCommunication.php | 483 +- .../FHIRCommunicationRequest.php | 498 ++- .../FHIRCompartmentDefinition.php | 382 +- .../FHIRDomainResource/FHIRComposition.php | 384 +- .../FHIRDomainResource/FHIRConceptMap.php | 467 +- .../FHIRDomainResource/FHIRCondition.php | 554 ++- .../FHIRDomainResource/FHIRConsent.php | 479 +- .../FHIRDomainResource/FHIRContract.php | 557 ++- .../FHIRDomainResource/FHIRCoverage.php | 397 +- .../FHIRDomainResource/FHIRDataElement.php | 403 +- .../FHIRDomainResource/FHIRDetectedIssue.php | 310 +- .../FHIRDomainResource/FHIRDevice.php | 416 +- .../FHIRDeviceComponent.php | 293 +- .../FHIRDomainResource/FHIRDeviceMetric.php | 291 +- .../FHIRDomainResource/FHIRDeviceRequest.php | 545 ++- .../FHIRDeviceUseStatement.php | 346 +- .../FHIRDiagnosticReport.php | 443 +- .../FHIRDocumentManifest.php | 333 +- .../FHIRDocumentReference.php | 418 +- .../FHIREligibilityRequest.php | 393 +- .../FHIREligibilityResponse.php | 346 +- .../FHIRDomainResource/FHIREncounter.php | 498 ++- .../FHIRDomainResource/FHIREndpoint.php | 316 +- .../FHIREnrollmentRequest.php | 257 +- .../FHIREnrollmentResponse.php | 274 +- .../FHIRDomainResource/FHIREpisodeOfCare.php | 337 +- .../FHIRExpansionProfile.php | 518 ++- .../FHIRExplanationOfBenefit.php | 804 +++- .../FHIRFamilyMemberHistory.php | 573 ++- .../FHIRDomainResource/FHIRFlag.php | 257 +- .../FHIRDomainResource/FHIRGoal.php | 403 +- .../FHIRGraphDefinition.php | 382 +- .../FHIRDomainResource/FHIRGroup.php | 278 +- .../FHIRGuidanceResponse.php | 380 +- .../FHIRHealthcareService.php | 553 ++- .../FHIRImagingManifest.php | 223 +- .../FHIRDomainResource/FHIRImagingStudy.php | 458 +- .../FHIRDomainResource/FHIRImmunization.php | 486 +- .../FHIRImmunizationRecommendation.php | 174 +- .../FHIRImplementationGuide.php | 439 +- .../FHIRDomainResource/FHIRLibrary.php | 581 ++- .../FHIRDomainResource/FHIRLinkage.php | 172 +- .../FHIRDomainResource/FHIRList.php | 346 +- .../FHIRDomainResource/FHIRLocation.php | 382 +- .../FHIRDomainResource/FHIRMeasure.php | 772 +++- .../FHIRDomainResource/FHIRMeasureReport.php | 291 +- .../FHIRDomainResource/FHIRMedia.php | 450 +- .../FHIRDomainResource/FHIRMedication.php | 276 +- .../FHIRMedicationAdministration.php | 515 ++- .../FHIRMedicationDispense.php | 581 ++- .../FHIRMedicationRequest.php | 564 ++- .../FHIRMedicationStatement.php | 477 +- .../FHIRMessageDefinition.php | 524 ++- .../FHIRDomainResource/FHIRMessageHeader.php | 327 +- .../FHIRDomainResource/FHIRNamingSystem.php | 365 +- .../FHIRDomainResource/FHIRNutritionOrder.php | 333 +- .../FHIRDomainResource/FHIRObservation.php | 677 ++- .../FHIROperationDefinition.php | 522 ++- .../FHIROperationOutcome.php | 138 +- .../FHIRDomainResource/FHIROrganization.php | 303 +- .../FHIRDomainResource/FHIRPatient.php | 460 +- .../FHIRDomainResource/FHIRPaymentNotice.php | 291 +- .../FHIRPaymentReconciliation.php | 363 +- .../FHIRDomainResource/FHIRPerson.php | 299 +- .../FHIRDomainResource/FHIRPlanDefinition.php | 581 ++- .../FHIRDomainResource/FHIRPractitioner.php | 303 +- .../FHIRPractitionerRole.php | 375 +- .../FHIRDomainResource/FHIRProcedure.php | 610 ++- .../FHIRProcedureRequest.php | 636 ++- .../FHIRDomainResource/FHIRProcessRequest.php | 382 +- .../FHIRProcessResponse.php | 348 +- .../FHIRDomainResource/FHIRProvenance.php | 301 +- .../FHIRDomainResource/FHIRQuestionnaire.php | 490 +- .../FHIRQuestionnaireResponse.php | 312 +- .../FHIRReferralRequest.php | 549 ++- .../FHIRDomainResource/FHIRRelatedPerson.php | 316 +- .../FHIRDomainResource/FHIRRequestGroup.php | 403 +- .../FHIRDomainResource/FHIRResearchStudy.php | 485 +- .../FHIRResearchSubject.php | 255 +- .../FHIRDomainResource/FHIRRiskAssessment.php | 429 +- .../FHIRDomainResource/FHIRSchedule.php | 263 +- .../FHIRSearchParameter.php | 545 ++- .../FHIRDomainResource/FHIRSequence.php | 384 +- .../FHIRServiceDefinition.php | 562 ++- .../FHIRDomainResource/FHIRSlot.php | 312 +- .../FHIRDomainResource/FHIRSpecimen.php | 335 +- .../FHIRStructureDefinition.php | 611 ++- .../FHIRDomainResource/FHIRStructureMap.php | 439 +- .../FHIRDomainResource/FHIRSubscription.php | 259 +- .../FHIRDomainResource/FHIRSubstance.php | 246 +- .../FHIRDomainResource/FHIRSupplyDelivery.php | 346 +- .../FHIRDomainResource/FHIRSupplyRequest.php | 376 +- .../FHIRDomainResource/FHIRTask.php | 611 ++- .../FHIRDomainResource/FHIRTestReport.php | 327 +- .../FHIRDomainResource/FHIRTestScript.php | 583 ++- .../FHIRDomainResource/FHIRValueSet.php | 450 +- .../FHIRVisionPrescription.php | 276 +- .../STU3/FHIRResource/FHIRParameters.php | 90 +- .../STU3/FHIRResourceContainer.php | 607 ++- .../STU3/FHIRSampledDataDataTypePrimitive.php | 34 +- .../STU3/FHIRStringPrimitive.php | 34 +- .../STU3/FHIRTimePrimitive.php | 36 +- .../STU3/FHIRUnsignedIntPrimitive.php | 34 +- .../STU3/FHIRUriPrimitive.php | 34 +- .../STU3/FHIRUuidPrimitive.php | 34 +- .../STU3/PHPFHIRAutoloader.php | 5 +- .../STU3/PHPFHIRCommentContainerInterface.php | 2 +- .../STU3/PHPFHIRCommentContainerTrait.php | 2 +- .../STU3/PHPFHIRConstants.php | 6 +- .../STU3/PHPFHIRContainedTypeInterface.php | 2 +- .../STU3/PHPFHIRResponseParser.php | 2 +- .../STU3/PHPFHIRResponseParserConfig.php | 2 +- .../FHIRBase64BinaryPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRBooleanPrimitiveTest.php | 2 +- .../FHIRAccountStatusListTest.php | 2 +- .../FHIRActionCardinalityBehaviorListTest.php | 2 +- .../FHIRActionConditionKindListTest.php | 2 +- .../FHIRActionGroupingBehaviorListTest.php | 2 +- .../FHIRActionListListTest.php | 2 +- .../FHIRActionParticipantTypeListTest.php | 2 +- .../FHIRActionPrecheckBehaviorListTest.php | 2 +- .../FHIRActionRelationshipTypeListTest.php | 2 +- .../FHIRActionRequiredBehaviorListTest.php | 2 +- .../FHIRActionSelectionBehaviorListTest.php | 2 +- .../FHIRAddressTypeListTest.php | 2 +- .../FHIRAddressUseListTest.php | 2 +- .../FHIRAdministrativeGenderListTest.php | 2 +- .../FHIRAdverseEventCategoryListTest.php | 2 +- .../FHIRAdverseEventCausalityListTest.php | 2 +- .../FHIRAggregationModeListTest.php | 2 +- ...FHIRAllergyIntoleranceCategoryListTest.php | 2 +- ...lergyIntoleranceClinicalStatusListTest.php | 2 +- ...RAllergyIntoleranceCriticalityListTest.php | 2 +- ...FHIRAllergyIntoleranceSeverityListTest.php | 2 +- .../FHIRAllergyIntoleranceTypeListTest.php | 2 +- ...yIntoleranceVerificationStatusListTest.php | 2 +- .../FHIRAppointmentStatusListTest.php | 2 +- .../FHIRAssertionDirectionTypeListTest.php | 2 +- .../FHIRAssertionOperatorTypeListTest.php | 2 +- .../FHIRAssertionResponseTypesListTest.php | 2 +- .../FHIRAuditEventActionListTest.php | 2 +- ...FHIRAuditEventAgentNetworkTypeListTest.php | 2 +- .../FHIRAuditEventOutcomeListTest.php | 2 +- .../FHIRBindingStrengthListTest.php | 2 +- .../FHIRBundleTypeListTest.php | 2 +- .../FHIRCapabilityStatementKindListTest.php | 2 +- .../FHIRCarePlanActivityStatusListTest.php | 2 +- .../FHIRCarePlanIntentListTest.php | 2 +- .../FHIRCarePlanStatusListTest.php | 2 +- .../FHIRCareTeamStatusListTest.php | 2 +- .../FHIRChargeItemStatusListTest.php | 2 +- .../FHIRClinicalImpressionStatusListTest.php | 2 +- .../FHIRCodeSystemContentModeListTest.php | 2 +- ...FHIRCodeSystemHierarchyMeaningListTest.php | 2 +- .../FHIRCompartmentTypeListTest.php | 2 +- ...FHIRCompositionAttestationModeListTest.php | 2 +- .../FHIRCompositionStatusListTest.php | 2 +- .../FHIRConceptMapEquivalenceListTest.php | 2 +- ...HIRConceptMapGroupUnmappedModeListTest.php | 2 +- ...IRConditionClinicalStatusCodesListTest.php | 2 +- ...HIRConditionVerificationStatusListTest.php | 2 +- .../FHIRConditionalDeleteStatusListTest.php | 2 +- .../FHIRConditionalReadStatusListTest.php | 2 +- ...RConfidentialityClassificationListTest.php | 2 +- .../FHIRConsentDataMeaningListTest.php | 2 +- .../FHIRConsentExceptTypeListTest.php | 2 +- .../FHIRConsentStateListTest.php | 2 +- .../FHIRConstraintSeverityListTest.php | 2 +- .../FHIRContactPointSystemListTest.php | 2 +- .../FHIRContactPointUseListTest.php | 2 +- .../FHIRContentTypeListTest.php | 2 +- ...HIRContractResourceStatusCodesListTest.php | 2 +- .../FHIRContributorTypeListTest.php | 2 +- .../FHIRDataElementStringencyListTest.php | 2 +- .../FHIRDaysOfWeekListTest.php | 2 +- .../FHIRDetectedIssueSeverityListTest.php | 2 +- ...IRDeviceMetricCalibrationStateListTest.php | 2 +- ...HIRDeviceMetricCalibrationTypeListTest.php | 2 +- .../FHIRDeviceMetricCategoryListTest.php | 2 +- .../FHIRDeviceMetricColorListTest.php | 2 +- ...RDeviceMetricOperationalStatusListTest.php | 2 +- .../FHIRDeviceUseStatementStatusListTest.php | 2 +- .../FHIRDiagnosticReportStatusListTest.php | 2 +- .../FHIRDigitalMediaTypeListTest.php | 2 +- .../FHIRDiscriminatorTypeListTest.php | 2 +- .../FHIRDocumentModeListTest.php | 2 +- .../FHIRDocumentReferenceStatusListTest.php | 2 +- .../FHIRDocumentRelationshipTypeListTest.php | 2 +- .../FHIREncounterLocationStatusListTest.php | 2 +- .../FHIREncounterStatusListTest.php | 2 +- .../FHIREndpointStatusListTest.php | 2 +- .../FHIREpisodeOfCareStatusListTest.php | 2 +- .../FHIREventCapabilityModeListTest.php | 2 +- .../FHIREventStatusListTest.php | 2 +- .../FHIREventTimingListTest.php | 2 +- ...FHIRExplanationOfBenefitStatusListTest.php | 2 +- .../FHIRExtensionContextListTest.php | 2 +- .../FHIRFHIRAllTypesListTest.php | 2 +- .../FHIRFHIRDefinedTypeListTest.php | 2 +- .../FHIRFHIRDeviceStatusListTest.php | 2 +- .../FHIRFHIRSubstanceStatusListTest.php | 2 +- .../FHIRFamilyHistoryStatusListTest.php | 2 +- .../FHIRFilterOperatorListTest.php | 2 +- ...IRFinancialResourceStatusCodesListTest.php | 2 +- .../FHIRFlagStatusListTest.php | 2 +- .../FHIRGoalStatusListTest.php | 2 +- .../FHIRGraphCompartmentRuleListTest.php | 2 +- .../FHIRGroupTypeListTest.php | 2 +- .../FHIRGuidanceResponseStatusListTest.php | 2 +- .../FHIRGuideDependencyTypeListTest.php | 2 +- .../FHIRGuidePageKindListTest.php | 2 +- .../FHIRHTTPVerbListTest.php | 2 +- .../FHIRIdentifierUseListTest.php | 2 +- .../FHIRIdentityAssuranceLevelListTest.php | 2 +- .../FHIRImmunizationStatusCodesListTest.php | 2 +- .../FHIRInstanceAvailabilityListTest.php | 2 +- .../FHIRIssueSeverityListTest.php | 2 +- .../FHIRIssueTypeListTest.php | 2 +- .../FHIRLinkTypeListTest.php | 2 +- .../FHIRLinkageTypeListTest.php | 2 +- .../FHIRListModeListTest.php | 2 +- .../FHIRListStatusListTest.php | 2 +- .../FHIRLocationModeListTest.php | 2 +- .../FHIRLocationStatusListTest.php | 2 +- .../FHIRMeasmntPrincipleListTest.php | 2 +- .../FHIRMeasureReportStatusListTest.php | 2 +- .../FHIRMeasureReportTypeListTest.php | 2 +- ...MedicationAdministrationStatusListTest.php | 2 +- .../FHIRMedicationDispenseStatusListTest.php | 2 +- .../FHIRMedicationRequestIntentListTest.php | 2 +- .../FHIRMedicationRequestPriorityListTest.php | 2 +- .../FHIRMedicationRequestStatusListTest.php | 2 +- .../FHIRMedicationStatementStatusListTest.php | 2 +- .../FHIRMedicationStatementTakenListTest.php | 2 +- .../FHIRMedicationStatusListTest.php | 2 +- ...HIRMessageSignificanceCategoryListTest.php | 2 +- .../FHIRCodePrimitive/FHIRNameUseListTest.php | 2 +- ...FHIRNamingSystemIdentifierTypeListTest.php | 2 +- .../FHIRNamingSystemTypeListTest.php | 2 +- .../FHIRNarrativeStatusListTest.php | 2 +- .../FHIRNoteTypeListTest.php | 2 +- .../FHIRNutritionOrderStatusListTest.php | 2 +- ...HIRObservationRelationshipTypeListTest.php | 2 +- .../FHIRObservationStatusListTest.php | 2 +- .../FHIROperationKindListTest.php | 2 +- .../FHIROperationParameterUseListTest.php | 2 +- .../FHIRParticipantRequiredListTest.php | 2 +- .../FHIRParticipationStatusListTest.php | 2 +- .../FHIRPropertyRepresentationListTest.php | 2 +- .../FHIRPropertyTypeListTest.php | 2 +- .../FHIRProvenanceEntityRoleListTest.php | 2 +- .../FHIRPublicationStatusListTest.php | 2 +- .../FHIRQualityTypeListTest.php | 2 +- .../FHIRQuantityComparatorListTest.php | 2 +- .../FHIRQuestionnaireItemTypeListTest.php | 2 +- ...HIRQuestionnaireResponseStatusListTest.php | 2 +- .../FHIRReferenceHandlingPolicyListTest.php | 2 +- .../FHIRReferenceVersionRulesListTest.php | 2 +- .../FHIRRelatedArtifactTypeListTest.php | 2 +- .../FHIRRemittanceOutcomeListTest.php | 2 +- .../FHIRRepositoryTypeListTest.php | 2 +- .../FHIRRequestIntentListTest.php | 2 +- .../FHIRRequestPriorityListTest.php | 2 +- .../FHIRRequestStatusListTest.php | 2 +- .../FHIRResearchStudyStatusListTest.php | 2 +- .../FHIRResearchSubjectStatusListTest.php | 2 +- .../FHIRResourceTypeListTest.php | 2 +- .../FHIRResourceVersionPolicyListTest.php | 2 +- .../FHIRResponseTypeListTest.php | 2 +- .../FHIRRestfulCapabilityModeListTest.php | 2 +- .../FHIRSearchComparatorListTest.php | 2 +- .../FHIRSearchEntryModeListTest.php | 2 +- .../FHIRSearchModifierCodeListTest.php | 2 +- .../FHIRSearchParamTypeListTest.php | 2 +- .../FHIRSlicingRulesListTest.php | 2 +- .../FHIRSlotStatusListTest.php | 2 +- .../FHIRSpecimenStatusListTest.php | 2 +- .../FHIRStructureDefinitionKindListTest.php | 2 +- .../FHIRStructureMapContextTypeListTest.php | 2 +- .../FHIRStructureMapGroupTypeModeListTest.php | 2 +- .../FHIRStructureMapInputModeListTest.php | 2 +- .../FHIRStructureMapModelModeListTest.php | 2 +- ...FHIRStructureMapSourceListModeListTest.php | 2 +- ...FHIRStructureMapTargetListModeListTest.php | 2 +- .../FHIRStructureMapTransformListTest.php | 2 +- .../FHIRSubscriptionChannelTypeListTest.php | 2 +- .../FHIRSubscriptionStatusListTest.php | 2 +- .../FHIRSupplyDeliveryStatusListTest.php | 2 +- .../FHIRSupplyRequestStatusListTest.php | 2 +- .../FHIRSystemRestfulInteractionListTest.php | 2 +- ...HIRSystemVersionProcessingModeListTest.php | 2 +- .../FHIRTaskStatusListTest.php | 2 +- .../FHIRTestReportActionResultListTest.php | 2 +- .../FHIRTestReportParticipantTypeListTest.php | 2 +- .../FHIRTestReportResultListTest.php | 2 +- .../FHIRTestReportStatusListTest.php | 2 +- ...HIRTestScriptRequestMethodCodeListTest.php | 2 +- .../FHIRTriggerTypeListTest.php | 2 +- .../FHIRTypeDerivationRuleListTest.php | 2 +- .../FHIRTypeRestfulInteractionListTest.php | 2 +- .../FHIRUDIEntryTypeListTest.php | 2 +- .../FHIRUnitsOfTimeListTest.php | 2 +- .../FHIRUnknownContentCodeListTest.php | 2 +- .../FHIRCodePrimitive/FHIRUseListTest.php | 2 +- .../FHIRVisionBaseListTest.php | 2 +- .../FHIRVisionEyesListTest.php | 2 +- .../FHIRXPathUsageTypeListTest.php | 2 +- .../PHPFHIRTests/FHIRCodePrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRDatePrimitiveTest.php | 2 +- .../FHIRDateTimePrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRDecimalPrimitiveTest.php | 2 +- .../FHIRElement/FHIRAccountStatusTest.php | 2 +- .../FHIRActionCardinalityBehaviorTest.php | 2 +- .../FHIRActionConditionKindTest.php | 2 +- .../FHIRActionGroupingBehaviorTest.php | 2 +- .../FHIRElement/FHIRActionListTest.php | 2 +- .../FHIRActionParticipantTypeTest.php | 2 +- .../FHIRActionPrecheckBehaviorTest.php | 2 +- .../FHIRActionRelationshipTypeTest.php | 2 +- .../FHIRActionRequiredBehaviorTest.php | 2 +- .../FHIRActionSelectionBehaviorTest.php | 2 +- .../FHIRElement/FHIRAddressTest.php | 2 +- .../FHIRElement/FHIRAddressTypeTest.php | 2 +- .../FHIRElement/FHIRAddressUseTest.php | 2 +- .../FHIRAdministrativeGenderTest.php | 2 +- .../FHIRAdverseEventCategoryTest.php | 2 +- .../FHIRAdverseEventCausalityTest.php | 2 +- .../FHIRElement/FHIRAggregationModeTest.php | 2 +- .../FHIRAllergyIntoleranceCategoryTest.php | 2 +- ...IRAllergyIntoleranceClinicalStatusTest.php | 2 +- .../FHIRAllergyIntoleranceCriticalityTest.php | 2 +- .../FHIRAllergyIntoleranceSeverityTest.php | 2 +- .../FHIRAllergyIntoleranceTypeTest.php | 2 +- ...lergyIntoleranceVerificationStatusTest.php | 2 +- .../FHIRElement/FHIRAnnotationTest.php | 2 +- .../FHIRElement/FHIRAppointmentStatusTest.php | 2 +- .../FHIRAssertionDirectionTypeTest.php | 2 +- .../FHIRAssertionOperatorTypeTest.php | 2 +- .../FHIRAssertionResponseTypesTest.php | 2 +- .../FHIRElement/FHIRAttachmentTest.php | 2 +- .../FHIRElement/FHIRAuditEventActionTest.php | 2 +- .../FHIRAuditEventAgentNetworkTypeTest.php | 2 +- .../FHIRElement/FHIRAuditEventOutcomeTest.php | 2 +- .../FHIRAccount/FHIRAccountCoverageTest.php | 2 +- .../FHIRAccount/FHIRAccountGuarantorTest.php | 2 +- ...FHIRActivityDefinitionDynamicValueTest.php | 2 +- .../FHIRActivityDefinitionParticipantTest.php | 2 +- .../FHIRAdverseEventSuspectEntityTest.php | 2 +- .../FHIRAllergyIntoleranceReactionTest.php | 2 +- .../FHIRAppointmentParticipantTest.php | 2 +- .../FHIRAuditEventAgentTest.php | 2 +- .../FHIRAuditEventDetailTest.php | 2 +- .../FHIRAuditEventEntityTest.php | 2 +- .../FHIRAuditEventNetworkTest.php | 2 +- .../FHIRAuditEventSourceTest.php | 2 +- .../FHIRBundle/FHIRBundleEntryTest.php | 2 +- .../FHIRBundle/FHIRBundleLinkTest.php | 2 +- .../FHIRBundle/FHIRBundleRequestTest.php | 2 +- .../FHIRBundle/FHIRBundleResponseTest.php | 2 +- .../FHIRBundle/FHIRBundleSearchTest.php | 2 +- ...FHIRCapabilityStatementCertificateTest.php | 2 +- .../FHIRCapabilityStatementDocumentTest.php | 2 +- .../FHIRCapabilityStatementEndpointTest.php | 2 +- .../FHIRCapabilityStatementEventTest.php | 2 +- ...RCapabilityStatementImplementationTest.php | 2 +- ...HIRCapabilityStatementInteraction1Test.php | 2 +- ...FHIRCapabilityStatementInteractionTest.php | 2 +- .../FHIRCapabilityStatementMessagingTest.php | 2 +- .../FHIRCapabilityStatementOperationTest.php | 2 +- .../FHIRCapabilityStatementResourceTest.php | 2 +- .../FHIRCapabilityStatementRestTest.php | 2 +- ...FHIRCapabilityStatementSearchParamTest.php | 2 +- .../FHIRCapabilityStatementSecurityTest.php | 2 +- .../FHIRCapabilityStatementSoftwareTest.php | 2 +- ...apabilityStatementSupportedMessageTest.php | 2 +- .../FHIRCarePlan/FHIRCarePlanActivityTest.php | 2 +- .../FHIRCarePlan/FHIRCarePlanDetailTest.php | 2 +- .../FHIRCareTeamParticipantTest.php | 2 +- .../FHIRChargeItemParticipantTest.php | 2 +- .../FHIRClaim/FHIRClaimAccidentTest.php | 2 +- .../FHIRClaim/FHIRClaimCareTeamTest.php | 2 +- .../FHIRClaim/FHIRClaimDetailTest.php | 2 +- .../FHIRClaim/FHIRClaimDiagnosisTest.php | 2 +- .../FHIRClaim/FHIRClaimInformationTest.php | 2 +- .../FHIRClaim/FHIRClaimInsuranceTest.php | 2 +- .../FHIRClaim/FHIRClaimItemTest.php | 2 +- .../FHIRClaim/FHIRClaimPayeeTest.php | 2 +- .../FHIRClaim/FHIRClaimProcedureTest.php | 2 +- .../FHIRClaim/FHIRClaimRelatedTest.php | 2 +- .../FHIRClaim/FHIRClaimSubDetailTest.php | 2 +- .../FHIRClaimResponseAddItemTest.php | 2 +- .../FHIRClaimResponseAdjudicationTest.php | 2 +- .../FHIRClaimResponseDetail1Test.php | 2 +- .../FHIRClaimResponseDetailTest.php | 2 +- .../FHIRClaimResponseErrorTest.php | 2 +- .../FHIRClaimResponseInsuranceTest.php | 2 +- .../FHIRClaimResponseItemTest.php | 2 +- .../FHIRClaimResponsePaymentTest.php | 2 +- .../FHIRClaimResponseProcessNoteTest.php | 2 +- .../FHIRClaimResponseSubDetailTest.php | 2 +- .../FHIRClinicalImpressionFindingTest.php | 2 +- ...HIRClinicalImpressionInvestigationTest.php | 2 +- .../FHIRCodeSystemConceptTest.php | 2 +- .../FHIRCodeSystemDesignationTest.php | 2 +- .../FHIRCodeSystemFilterTest.php | 2 +- .../FHIRCodeSystemProperty1Test.php | 2 +- .../FHIRCodeSystemPropertyTest.php | 2 +- .../FHIRCommunicationPayloadTest.php | 2 +- .../FHIRCommunicationRequestPayloadTest.php | 2 +- .../FHIRCommunicationRequestRequesterTest.php | 2 +- .../FHIRCompartmentDefinitionResourceTest.php | 2 +- .../FHIRCompositionAttesterTest.php | 2 +- .../FHIRCompositionEventTest.php | 2 +- .../FHIRCompositionRelatesToTest.php | 2 +- .../FHIRCompositionSectionTest.php | 2 +- .../FHIRConceptMapDependsOnTest.php | 2 +- .../FHIRConceptMapElementTest.php | 2 +- .../FHIRConceptMapGroupTest.php | 2 +- .../FHIRConceptMapTargetTest.php | 2 +- .../FHIRConceptMapUnmappedTest.php | 2 +- .../FHIRConditionEvidenceTest.php | 2 +- .../FHIRCondition/FHIRConditionStageTest.php | 2 +- .../FHIRConsent/FHIRConsentActor1Test.php | 2 +- .../FHIRConsent/FHIRConsentActorTest.php | 2 +- .../FHIRConsent/FHIRConsentData1Test.php | 2 +- .../FHIRConsent/FHIRConsentDataTest.php | 2 +- .../FHIRConsent/FHIRConsentExceptTest.php | 2 +- .../FHIRConsent/FHIRConsentPolicyTest.php | 2 +- .../FHIRContract/FHIRContractAgent1Test.php | 2 +- .../FHIRContract/FHIRContractAgentTest.php | 2 +- .../FHIRContract/FHIRContractFriendlyTest.php | 2 +- .../FHIRContract/FHIRContractLegalTest.php | 2 +- .../FHIRContract/FHIRContractRuleTest.php | 2 +- .../FHIRContract/FHIRContractSignerTest.php | 2 +- .../FHIRContract/FHIRContractTermTest.php | 2 +- .../FHIRContractValuedItem1Test.php | 2 +- .../FHIRContractValuedItemTest.php | 2 +- .../FHIRCoverage/FHIRCoverageGroupingTest.php | 2 +- .../FHIRDataElementMappingTest.php | 2 +- .../FHIRDetectedIssueMitigationTest.php | 2 +- .../FHIRDevice/FHIRDeviceUdiTest.php | 2 +- ...ceComponentProductionSpecificationTest.php | 2 +- .../FHIRDeviceMetricCalibrationTest.php | 2 +- .../FHIRDeviceRequestRequesterTest.php | 2 +- .../FHIRDiagnosticReportImageTest.php | 2 +- .../FHIRDiagnosticReportPerformerTest.php | 2 +- .../FHIRDocumentManifestContentTest.php | 2 +- .../FHIRDocumentManifestRelatedTest.php | 2 +- .../FHIRDocumentReferenceContentTest.php | 2 +- .../FHIRDocumentReferenceContextTest.php | 2 +- .../FHIRDocumentReferenceRelatedTest.php | 2 +- .../FHIRDocumentReferenceRelatesToTest.php | 2 +- ...REligibilityResponseBenefitBalanceTest.php | 2 +- .../FHIREligibilityResponseErrorTest.php | 2 +- .../FHIREligibilityResponseFinancialTest.php | 2 +- .../FHIREligibilityResponseInsuranceTest.php | 2 +- .../FHIREncounterClassHistoryTest.php | 2 +- .../FHIREncounterDiagnosisTest.php | 2 +- .../FHIREncounterHospitalizationTest.php | 2 +- .../FHIREncounterLocationTest.php | 2 +- .../FHIREncounterParticipantTest.php | 2 +- .../FHIREncounterStatusHistoryTest.php | 2 +- .../FHIREpisodeOfCareDiagnosisTest.php | 2 +- .../FHIREpisodeOfCareStatusHistoryTest.php | 2 +- .../FHIRExpansionProfileDesignation1Test.php | 2 +- .../FHIRExpansionProfileDesignation2Test.php | 2 +- .../FHIRExpansionProfileDesignationTest.php | 2 +- .../FHIRExpansionProfileExcludeTest.php | 2 +- ...FHIRExpansionProfileExcludedSystemTest.php | 2 +- .../FHIRExpansionProfileFixedVersionTest.php | 2 +- .../FHIRExpansionProfileIncludeTest.php | 2 +- .../FHIRExplanationOfBenefitAccidentTest.php | 2 +- .../FHIRExplanationOfBenefitAddItemTest.php | 2 +- ...IRExplanationOfBenefitAdjudicationTest.php | 2 +- ...ExplanationOfBenefitBenefitBalanceTest.php | 2 +- .../FHIRExplanationOfBenefitCareTeamTest.php | 2 +- .../FHIRExplanationOfBenefitDetail1Test.php | 2 +- .../FHIRExplanationOfBenefitDetailTest.php | 2 +- .../FHIRExplanationOfBenefitDiagnosisTest.php | 2 +- .../FHIRExplanationOfBenefitFinancialTest.php | 2 +- ...HIRExplanationOfBenefitInformationTest.php | 2 +- .../FHIRExplanationOfBenefitInsuranceTest.php | 2 +- .../FHIRExplanationOfBenefitItemTest.php | 2 +- .../FHIRExplanationOfBenefitPayeeTest.php | 2 +- .../FHIRExplanationOfBenefitPaymentTest.php | 2 +- .../FHIRExplanationOfBenefitProcedureTest.php | 2 +- ...HIRExplanationOfBenefitProcessNoteTest.php | 2 +- .../FHIRExplanationOfBenefitRelatedTest.php | 2 +- .../FHIRExplanationOfBenefitSubDetailTest.php | 2 +- .../FHIRFamilyMemberHistoryConditionTest.php | 2 +- .../FHIRGoal/FHIRGoalTargetTest.php | 2 +- .../FHIRGraphDefinitionCompartmentTest.php | 2 +- .../FHIRGraphDefinitionLinkTest.php | 2 +- .../FHIRGraphDefinitionTargetTest.php | 2 +- .../FHIRGroup/FHIRGroupCharacteristicTest.php | 2 +- .../FHIRGroup/FHIRGroupMemberTest.php | 2 +- ...FHIRHealthcareServiceAvailableTimeTest.php | 2 +- .../FHIRHealthcareServiceNotAvailableTest.php | 2 +- .../FHIRImagingManifestInstanceTest.php | 2 +- .../FHIRImagingManifestSeriesTest.php | 2 +- .../FHIRImagingManifestStudyTest.php | 2 +- .../FHIRImagingStudyInstanceTest.php | 2 +- .../FHIRImagingStudySeriesTest.php | 2 +- .../FHIRImmunizationExplanationTest.php | 2 +- .../FHIRImmunizationPractitionerTest.php | 2 +- .../FHIRImmunizationReactionTest.php | 2 +- ...HIRImmunizationVaccinationProtocolTest.php | 2 +- ...izationRecommendationDateCriterionTest.php | 2 +- ...ImmunizationRecommendationProtocolTest.php | 2 +- ...zationRecommendationRecommendationTest.php | 2 +- .../FHIRImplementationGuideDependencyTest.php | 2 +- .../FHIRImplementationGuideGlobalTest.php | 2 +- .../FHIRImplementationGuidePackageTest.php | 2 +- .../FHIRImplementationGuidePageTest.php | 2 +- .../FHIRImplementationGuideResourceTest.php | 2 +- .../FHIRLinkage/FHIRLinkageItemTest.php | 2 +- .../FHIRList/FHIRListEntryTest.php | 2 +- .../FHIRLocation/FHIRLocationPositionTest.php | 2 +- .../FHIRMeasure/FHIRMeasureGroupTest.php | 2 +- .../FHIRMeasure/FHIRMeasurePopulationTest.php | 2 +- .../FHIRMeasure/FHIRMeasureStratifierTest.php | 2 +- .../FHIRMeasureSupplementalDataTest.php | 2 +- .../FHIRMeasureReportGroupTest.php | 2 +- .../FHIRMeasureReportPopulation1Test.php | 2 +- .../FHIRMeasureReportPopulationTest.php | 2 +- .../FHIRMeasureReportStratifierTest.php | 2 +- .../FHIRMeasureReportStratumTest.php | 2 +- .../FHIRMedicationBatchTest.php | 2 +- .../FHIRMedicationContentTest.php | 2 +- .../FHIRMedicationIngredientTest.php | 2 +- .../FHIRMedicationPackageTest.php | 2 +- ...FHIRMedicationAdministrationDosageTest.php | 2 +- ...RMedicationAdministrationPerformerTest.php | 2 +- .../FHIRMedicationDispensePerformerTest.php | 2 +- ...FHIRMedicationDispenseSubstitutionTest.php | 2 +- ...IRMedicationRequestDispenseRequestTest.php | 2 +- .../FHIRMedicationRequestRequesterTest.php | 2 +- .../FHIRMedicationRequestSubstitutionTest.php | 2 +- ...IRMessageDefinitionAllowedResponseTest.php | 2 +- .../FHIRMessageDefinitionFocusTest.php | 2 +- .../FHIRMessageHeaderDestinationTest.php | 2 +- .../FHIRMessageHeaderResponseTest.php | 2 +- .../FHIRMessageHeaderSourceTest.php | 2 +- .../FHIRNamingSystemUniqueIdTest.php | 2 +- .../FHIRNutritionOrderAdministrationTest.php | 2 +- .../FHIRNutritionOrderEnteralFormulaTest.php | 2 +- .../FHIRNutritionOrderNutrientTest.php | 2 +- .../FHIRNutritionOrderOralDietTest.php | 2 +- .../FHIRNutritionOrderSupplementTest.php | 2 +- .../FHIRNutritionOrderTextureTest.php | 2 +- .../FHIRObservationComponentTest.php | 2 +- .../FHIRObservationReferenceRangeTest.php | 2 +- .../FHIRObservationRelatedTest.php | 2 +- .../FHIROperationDefinitionBindingTest.php | 2 +- .../FHIROperationDefinitionOverloadTest.php | 2 +- .../FHIROperationDefinitionParameterTest.php | 2 +- .../FHIROperationOutcomeIssueTest.php | 2 +- .../FHIROrganizationContactTest.php | 2 +- .../FHIRParametersParameterTest.php | 2 +- .../FHIRPatient/FHIRPatientAnimalTest.php | 2 +- .../FHIRPatientCommunicationTest.php | 2 +- .../FHIRPatient/FHIRPatientContactTest.php | 2 +- .../FHIRPatient/FHIRPatientLinkTest.php | 2 +- .../FHIRPaymentReconciliationDetailTest.php | 2 +- ...IRPaymentReconciliationProcessNoteTest.php | 2 +- .../FHIRPerson/FHIRPersonLinkTest.php | 2 +- .../FHIRPlanDefinitionActionTest.php | 2 +- .../FHIRPlanDefinitionConditionTest.php | 2 +- .../FHIRPlanDefinitionDynamicValueTest.php | 2 +- .../FHIRPlanDefinitionGoalTest.php | 2 +- .../FHIRPlanDefinitionParticipantTest.php | 2 +- .../FHIRPlanDefinitionRelatedActionTest.php | 2 +- .../FHIRPlanDefinitionTargetTest.php | 2 +- .../FHIRPractitionerQualificationTest.php | 2 +- .../FHIRPractitionerRoleAvailableTimeTest.php | 2 +- .../FHIRPractitionerRoleNotAvailableTest.php | 2 +- .../FHIRProcedureFocalDeviceTest.php | 2 +- .../FHIRProcedurePerformerTest.php | 2 +- .../FHIRProcedureRequestRequesterTest.php | 2 +- .../FHIRProcessRequestItemTest.php | 2 +- .../FHIRProcessResponseProcessNoteTest.php | 2 +- .../FHIRProvenanceAgentTest.php | 2 +- .../FHIRProvenanceEntityTest.php | 2 +- .../FHIRQuestionnaireEnableWhenTest.php | 2 +- .../FHIRQuestionnaireItemTest.php | 2 +- .../FHIRQuestionnaireOptionTest.php | 2 +- .../FHIRQuestionnaireResponseAnswerTest.php | 2 +- .../FHIRQuestionnaireResponseItemTest.php | 2 +- .../FHIRReferralRequestRequesterTest.php | 2 +- .../FHIRRequestGroupActionTest.php | 2 +- .../FHIRRequestGroupConditionTest.php | 2 +- .../FHIRRequestGroupRelatedActionTest.php | 2 +- .../FHIRResearchStudyArmTest.php | 2 +- .../FHIRRiskAssessmentPredictionTest.php | 2 +- .../FHIRSearchParameterComponentTest.php | 2 +- .../FHIRSequence/FHIRSequenceQualityTest.php | 2 +- .../FHIRSequenceReferenceSeqTest.php | 2 +- .../FHIRSequenceRepositoryTest.php | 2 +- .../FHIRSequence/FHIRSequenceVariantTest.php | 2 +- .../FHIRSpecimenCollectionTest.php | 2 +- .../FHIRSpecimenContainerTest.php | 2 +- .../FHIRSpecimenProcessingTest.php | 2 +- ...HIRStructureDefinitionDifferentialTest.php | 2 +- .../FHIRStructureDefinitionMappingTest.php | 2 +- .../FHIRStructureDefinitionSnapshotTest.php | 2 +- .../FHIRStructureMapDependentTest.php | 2 +- .../FHIRStructureMapGroupTest.php | 2 +- .../FHIRStructureMapInputTest.php | 2 +- .../FHIRStructureMapParameterTest.php | 2 +- .../FHIRStructureMapRuleTest.php | 2 +- .../FHIRStructureMapSourceTest.php | 2 +- .../FHIRStructureMapStructureTest.php | 2 +- .../FHIRStructureMapTargetTest.php | 2 +- .../FHIRSubscriptionChannelTest.php | 2 +- .../FHIRSubstanceIngredientTest.php | 2 +- .../FHIRSubstanceInstanceTest.php | 2 +- .../FHIRSupplyDeliverySuppliedItemTest.php | 2 +- .../FHIRSupplyRequestOrderedItemTest.php | 2 +- .../FHIRSupplyRequestRequesterTest.php | 2 +- .../FHIRTask/FHIRTaskInputTest.php | 2 +- .../FHIRTask/FHIRTaskOutputTest.php | 2 +- .../FHIRTask/FHIRTaskRequesterTest.php | 2 +- .../FHIRTask/FHIRTaskRestrictionTest.php | 2 +- .../FHIRTestReportAction1Test.php | 2 +- .../FHIRTestReportAction2Test.php | 2 +- .../FHIRTestReportActionTest.php | 2 +- .../FHIRTestReportAssertTest.php | 2 +- .../FHIRTestReportOperationTest.php | 2 +- .../FHIRTestReportParticipantTest.php | 2 +- .../FHIRTestReportSetupTest.php | 2 +- .../FHIRTestReportTeardownTest.php | 2 +- .../FHIRTestReport/FHIRTestReportTestTest.php | 2 +- .../FHIRTestScriptAction1Test.php | 2 +- .../FHIRTestScriptAction2Test.php | 2 +- .../FHIRTestScriptActionTest.php | 2 +- .../FHIRTestScriptAssertTest.php | 2 +- .../FHIRTestScriptCapabilityTest.php | 2 +- .../FHIRTestScriptDestinationTest.php | 2 +- .../FHIRTestScriptFixtureTest.php | 2 +- .../FHIRTestScript/FHIRTestScriptLinkTest.php | 2 +- .../FHIRTestScriptMetadataTest.php | 2 +- .../FHIRTestScriptOperationTest.php | 2 +- .../FHIRTestScriptOriginTest.php | 2 +- .../FHIRTestScriptParam1Test.php | 2 +- .../FHIRTestScriptParam2Test.php | 2 +- .../FHIRTestScriptParam3Test.php | 2 +- .../FHIRTestScriptParamTest.php | 2 +- .../FHIRTestScriptRequestHeaderTest.php | 2 +- .../FHIRTestScriptRule1Test.php | 2 +- .../FHIRTestScriptRule2Test.php | 2 +- .../FHIRTestScriptRule3Test.php | 2 +- .../FHIRTestScript/FHIRTestScriptRuleTest.php | 2 +- .../FHIRTestScriptRuleset1Test.php | 2 +- .../FHIRTestScriptRulesetTest.php | 2 +- .../FHIRTestScriptSetupTest.php | 2 +- .../FHIRTestScriptTeardownTest.php | 2 +- .../FHIRTestScript/FHIRTestScriptTestTest.php | 2 +- .../FHIRTestScriptVariableTest.php | 2 +- .../FHIRValueSet/FHIRValueSetComposeTest.php | 2 +- .../FHIRValueSet/FHIRValueSetConceptTest.php | 2 +- .../FHIRValueSet/FHIRValueSetContainsTest.php | 2 +- .../FHIRValueSetDesignationTest.php | 2 +- .../FHIRValueSetExpansionTest.php | 2 +- .../FHIRValueSet/FHIRValueSetFilterTest.php | 2 +- .../FHIRValueSet/FHIRValueSetIncludeTest.php | 2 +- .../FHIRValueSetParameterTest.php | 2 +- .../FHIRVisionPrescriptionDispenseTest.php | 2 +- .../FHIRElement/FHIRBackboneElementTest.php | 2 +- .../FHIRElement/FHIRBase64BinaryTest.php | 2 +- .../FHIRElement/FHIRBindingStrengthTest.php | 2 +- .../FHIRElement/FHIRBooleanTest.php | 2 +- .../FHIRElement/FHIRBundleTypeTest.php | 2 +- .../FHIRCapabilityStatementKindTest.php | 2 +- .../FHIRCarePlanActivityStatusTest.php | 2 +- .../FHIRElement/FHIRCarePlanIntentTest.php | 2 +- .../FHIRElement/FHIRCarePlanStatusTest.php | 2 +- .../FHIRElement/FHIRCareTeamStatusTest.php | 2 +- .../FHIRElement/FHIRChargeItemStatusTest.php | 2 +- .../FHIRClinicalImpressionStatusTest.php | 2 +- .../FHIRCodeSystemContentModeTest.php | 2 +- .../FHIRCodeSystemHierarchyMeaningTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRCodeTest.php | 2 +- .../FHIRElement/FHIRCodeableConceptTest.php | 2 +- .../FHIRElement/FHIRCodingTest.php | 2 +- .../FHIRElement/FHIRCompartmentTypeTest.php | 2 +- .../FHIRCompositionAttestationModeTest.php | 2 +- .../FHIRElement/FHIRCompositionStatusTest.php | 2 +- .../FHIRConceptMapEquivalenceTest.php | 2 +- .../FHIRConceptMapGroupUnmappedModeTest.php | 2 +- .../FHIRConditionClinicalStatusCodesTest.php | 2 +- .../FHIRConditionVerificationStatusTest.php | 2 +- .../FHIRConditionalDeleteStatusTest.php | 2 +- .../FHIRConditionalReadStatusTest.php | 2 +- .../FHIRConfidentialityClassificationTest.php | 2 +- .../FHIRConsentDataMeaningTest.php | 2 +- .../FHIRElement/FHIRConsentExceptTypeTest.php | 2 +- .../FHIRElement/FHIRConsentStateTest.php | 2 +- .../FHIRConstraintSeverityTest.php | 2 +- .../FHIRElement/FHIRContactDetailTest.php | 2 +- .../FHIRContactPointSystemTest.php | 2 +- .../FHIRElement/FHIRContactPointTest.php | 2 +- .../FHIRElement/FHIRContactPointUseTest.php | 2 +- .../FHIRElement/FHIRContentTypeTest.php | 2 +- .../FHIRContractResourceStatusCodesTest.php | 2 +- .../FHIRElement/FHIRContributorTest.php | 2 +- .../FHIRElement/FHIRContributorTypeTest.php | 2 +- .../FHIRDataElementStringencyTest.php | 2 +- .../FHIRDataRequirementCodeFilterTest.php | 2 +- .../FHIRDataRequirementDateFilterTest.php | 2 +- .../FHIRElement/FHIRDataRequirementTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRDateTest.php | 2 +- .../FHIRElement/FHIRDateTimeTest.php | 2 +- .../FHIRElement/FHIRDaysOfWeekTest.php | 2 +- .../FHIRElement/FHIRDecimalTest.php | 2 +- .../FHIRDetectedIssueSeverityTest.php | 2 +- .../FHIRDeviceMetricCalibrationStateTest.php | 2 +- .../FHIRDeviceMetricCalibrationTypeTest.php | 2 +- .../FHIRDeviceMetricCategoryTest.php | 2 +- .../FHIRElement/FHIRDeviceMetricColorTest.php | 2 +- .../FHIRDeviceMetricOperationalStatusTest.php | 2 +- .../FHIRDeviceUseStatementStatusTest.php | 2 +- .../FHIRDiagnosticReportStatusTest.php | 2 +- .../FHIRElement/FHIRDigitalMediaTypeTest.php | 2 +- .../FHIRElement/FHIRDiscriminatorTypeTest.php | 2 +- .../FHIRElement/FHIRDocumentModeTest.php | 2 +- .../FHIRDocumentReferenceStatusTest.php | 2 +- .../FHIRDocumentRelationshipTypeTest.php | 2 +- .../FHIRElement/FHIRDosageTest.php | 2 +- .../FHIRElementDefinitionBaseTest.php | 2 +- .../FHIRElementDefinitionBindingTest.php | 2 +- .../FHIRElementDefinitionConstraintTest.php | 2 +- ...FHIRElementDefinitionDiscriminatorTest.php | 2 +- .../FHIRElementDefinitionExampleTest.php | 2 +- .../FHIRElementDefinitionMappingTest.php | 2 +- .../FHIRElementDefinitionSlicingTest.php | 2 +- .../FHIRElementDefinitionTypeTest.php | 2 +- .../FHIRElement/FHIRElementDefinitionTest.php | 2 +- .../FHIREncounterLocationStatusTest.php | 2 +- .../FHIRElement/FHIREncounterStatusTest.php | 2 +- .../FHIRElement/FHIREndpointStatusTest.php | 2 +- .../FHIREpisodeOfCareStatusTest.php | 2 +- .../FHIREventCapabilityModeTest.php | 2 +- .../FHIRElement/FHIREventStatusTest.php | 2 +- .../FHIRElement/FHIREventTimingTest.php | 2 +- .../FHIRExplanationOfBenefitStatusTest.php | 2 +- .../FHIRElement/FHIRExtensionContextTest.php | 2 +- .../FHIRElement/FHIRExtensionTest.php | 2 +- .../FHIRElement/FHIRFHIRAllTypesTest.php | 2 +- .../FHIRElement/FHIRFHIRDefinedTypeTest.php | 2 +- .../FHIRElement/FHIRFHIRDeviceStatusTest.php | 2 +- .../FHIRFHIRSubstanceStatusTest.php | 2 +- .../FHIRFamilyHistoryStatusTest.php | 2 +- .../FHIRElement/FHIRFilterOperatorTest.php | 2 +- .../FHIRFinancialResourceStatusCodesTest.php | 2 +- .../FHIRElement/FHIRFlagStatusTest.php | 2 +- .../FHIRElement/FHIRGoalStatusTest.php | 2 +- .../FHIRGraphCompartmentRuleTest.php | 2 +- .../FHIRElement/FHIRGroupTypeTest.php | 2 +- .../FHIRGuidanceResponseStatusTest.php | 2 +- .../FHIRGuideDependencyTypeTest.php | 2 +- .../FHIRElement/FHIRGuidePageKindTest.php | 2 +- .../FHIRElement/FHIRHTTPVerbTest.php | 2 +- .../FHIRElement/FHIRHumanNameTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRIdTest.php | 2 +- .../FHIRElement/FHIRIdentifierTest.php | 2 +- .../FHIRElement/FHIRIdentifierUseTest.php | 2 +- .../FHIRIdentityAssuranceLevelTest.php | 2 +- .../FHIRImmunizationStatusCodesTest.php | 2 +- .../FHIRInstanceAvailabilityTest.php | 2 +- .../FHIRElement/FHIRInstantTest.php | 2 +- .../FHIRElement/FHIRIntegerTest.php | 2 +- .../FHIRElement/FHIRIssueSeverityTest.php | 2 +- .../FHIRElement/FHIRIssueTypeTest.php | 2 +- .../FHIRElement/FHIRLinkTypeTest.php | 2 +- .../FHIRElement/FHIRLinkageTypeTest.php | 2 +- .../FHIRElement/FHIRListModeTest.php | 2 +- .../FHIRElement/FHIRListStatusTest.php | 2 +- .../FHIRElement/FHIRLocationModeTest.php | 2 +- .../FHIRElement/FHIRLocationStatusTest.php | 2 +- .../FHIRElement/FHIRMarkdownTest.php | 2 +- .../FHIRElement/FHIRMeasmntPrincipleTest.php | 2 +- .../FHIRMeasureReportStatusTest.php | 2 +- .../FHIRElement/FHIRMeasureReportTypeTest.php | 2 +- ...FHIRMedicationAdministrationStatusTest.php | 2 +- .../FHIRMedicationDispenseStatusTest.php | 2 +- .../FHIRMedicationRequestIntentTest.php | 2 +- .../FHIRMedicationRequestPriorityTest.php | 2 +- .../FHIRMedicationRequestStatusTest.php | 2 +- .../FHIRMedicationStatementStatusTest.php | 2 +- .../FHIRMedicationStatementTakenTest.php | 2 +- .../FHIRElement/FHIRMedicationStatusTest.php | 2 +- .../FHIRMessageSignificanceCategoryTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRMetaTest.php | 2 +- .../FHIRElement/FHIRNameUseTest.php | 2 +- .../FHIRNamingSystemIdentifierTypeTest.php | 2 +- .../FHIRElement/FHIRNamingSystemTypeTest.php | 2 +- .../FHIRElement/FHIRNarrativeStatusTest.php | 2 +- .../FHIRElement/FHIRNarrativeTest.php | 2 +- .../FHIRElement/FHIRNoteTypeTest.php | 2 +- .../FHIRNutritionOrderStatusTest.php | 2 +- .../FHIRObservationRelationshipTypeTest.php | 2 +- .../FHIRElement/FHIRObservationStatusTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIROidTest.php | 2 +- .../FHIRElement/FHIROperationKindTest.php | 2 +- .../FHIROperationParameterUseTest.php | 2 +- .../FHIRParameterDefinitionTest.php | 2 +- .../FHIRParticipantRequiredTest.php | 2 +- .../FHIRParticipationStatusTest.php | 2 +- .../FHIRElement/FHIRPeriodTest.php | 2 +- .../FHIRElement/FHIRPositiveIntTest.php | 2 +- .../FHIRPropertyRepresentationTest.php | 2 +- .../FHIRElement/FHIRPropertyTypeTest.php | 2 +- .../FHIRProvenanceEntityRoleTest.php | 2 +- .../FHIRElement/FHIRPublicationStatusTest.php | 2 +- .../FHIRElement/FHIRQualityTypeTest.php | 2 +- .../FHIRElement/FHIRQuantity/FHIRAgeTest.php | 2 +- .../FHIRQuantity/FHIRCountTest.php | 2 +- .../FHIRQuantity/FHIRDistanceTest.php | 2 +- .../FHIRQuantity/FHIRDurationTest.php | 2 +- .../FHIRQuantity/FHIRMoneyTest.php | 2 +- .../FHIRQuantityComparatorTest.php | 2 +- .../FHIRElement/FHIRQuantityTest.php | 2 +- .../FHIRQuestionnaireItemTypeTest.php | 2 +- .../FHIRQuestionnaireResponseStatusTest.php | 2 +- .../FHIRElement/FHIRRangeTest.php | 2 +- .../FHIRElement/FHIRRatioTest.php | 2 +- .../FHIRReferenceHandlingPolicyTest.php | 2 +- .../FHIRElement/FHIRReferenceTest.php | 2 +- .../FHIRReferenceVersionRulesTest.php | 2 +- .../FHIRElement/FHIRRelatedArtifactTest.php | 2 +- .../FHIRRelatedArtifactTypeTest.php | 2 +- .../FHIRElement/FHIRRemittanceOutcomeTest.php | 2 +- .../FHIRElement/FHIRRepositoryTypeTest.php | 2 +- .../FHIRElement/FHIRRequestIntentTest.php | 2 +- .../FHIRElement/FHIRRequestPriorityTest.php | 2 +- .../FHIRElement/FHIRRequestStatusTest.php | 2 +- .../FHIRResearchStudyStatusTest.php | 2 +- .../FHIRResearchSubjectStatusTest.php | 2 +- .../FHIRElement/FHIRResourceTypeTest.php | 2 +- .../FHIRResourceVersionPolicyTest.php | 2 +- .../FHIRElement/FHIRResponseTypeTest.php | 2 +- .../FHIRRestfulCapabilityModeTest.php | 2 +- .../FHIRSampledDataDataTypeTest.php | 2 +- .../FHIRElement/FHIRSampledDataTest.php | 2 +- .../FHIRElement/FHIRSearchComparatorTest.php | 2 +- .../FHIRElement/FHIRSearchEntryModeTest.php | 2 +- .../FHIRSearchModifierCodeTest.php | 2 +- .../FHIRElement/FHIRSearchParamTypeTest.php | 2 +- .../FHIRElement/FHIRSignatureTest.php | 2 +- .../FHIRElement/FHIRSlicingRulesTest.php | 2 +- .../FHIRElement/FHIRSlotStatusTest.php | 2 +- .../FHIRElement/FHIRSpecimenStatusTest.php | 2 +- .../FHIRElement/FHIRStringTest.php | 2 +- .../FHIRStructureDefinitionKindTest.php | 2 +- .../FHIRStructureMapContextTypeTest.php | 2 +- .../FHIRStructureMapGroupTypeModeTest.php | 2 +- .../FHIRStructureMapInputModeTest.php | 2 +- .../FHIRStructureMapModelModeTest.php | 2 +- .../FHIRStructureMapSourceListModeTest.php | 2 +- .../FHIRStructureMapTargetListModeTest.php | 2 +- .../FHIRStructureMapTransformTest.php | 2 +- .../FHIRSubscriptionChannelTypeTest.php | 2 +- .../FHIRSubscriptionStatusTest.php | 2 +- .../FHIRSupplyDeliveryStatusTest.php | 2 +- .../FHIRSupplyRequestStatusTest.php | 2 +- .../FHIRSystemRestfulInteractionTest.php | 2 +- .../FHIRSystemVersionProcessingModeTest.php | 2 +- .../FHIRElement/FHIRTaskStatusTest.php | 2 +- .../FHIRTestReportActionResultTest.php | 2 +- .../FHIRTestReportParticipantTypeTest.php | 2 +- .../FHIRElement/FHIRTestReportResultTest.php | 2 +- .../FHIRElement/FHIRTestReportStatusTest.php | 2 +- .../FHIRTestScriptRequestMethodCodeTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRTimeTest.php | 2 +- .../FHIRTiming/FHIRTimingRepeatTest.php | 2 +- .../FHIRElement/FHIRTimingTest.php | 2 +- .../FHIRElement/FHIRTriggerDefinitionTest.php | 2 +- .../FHIRElement/FHIRTriggerTypeTest.php | 2 +- .../FHIRTypeDerivationRuleTest.php | 2 +- .../FHIRTypeRestfulInteractionTest.php | 2 +- .../FHIRElement/FHIRUDIEntryTypeTest.php | 2 +- .../FHIRElement/FHIRUnitsOfTimeTest.php | 2 +- .../FHIRUnknownContentCodeTest.php | 2 +- .../FHIRElement/FHIRUnsignedIntTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUriTest.php | 2 +- .../FHIRElement/FHIRUsageContextTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUseTest.php | 2 +- .../PHPFHIRTests/FHIRElement/FHIRUuidTest.php | 2 +- .../FHIRElement/FHIRVisionBaseTest.php | 2 +- .../FHIRElement/FHIRVisionEyesTest.php | 2 +- .../FHIRElement/FHIRXPathUsageTypeTest.php | 2 +- .../STU3/PHPFHIRTests/FHIRElementTest.php | 2 +- .../STU3/PHPFHIRTests/FHIRIdPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRInstantPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRIntegerPrimitiveTest.php | 2 +- .../FHIRMarkdownPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIROidPrimitiveTest.php | 2 +- .../FHIRPositiveIntPrimitiveTest.php | 2 +- .../FHIRResource/FHIRBinaryTest.php | 2 +- .../FHIRResource/FHIRBundleTest.php | 2 +- .../FHIRDomainResource/FHIRAccountTest.php | 58 +- .../FHIRActivityDefinitionTest.php | 58 +- .../FHIRAdverseEventTest.php | 58 +- .../FHIRAllergyIntoleranceTest.php | 58 +- .../FHIRAppointmentResponseTest.php | 58 +- .../FHIRAppointmentTest.php | 58 +- .../FHIRDomainResource/FHIRAuditEventTest.php | 58 +- .../FHIRDomainResource/FHIRBasicTest.php | 58 +- .../FHIRDomainResource/FHIRBodySiteTest.php | 58 +- .../FHIRCapabilityStatementTest.php | 58 +- .../FHIRDomainResource/FHIRCarePlanTest.php | 58 +- .../FHIRDomainResource/FHIRCareTeamTest.php | 58 +- .../FHIRDomainResource/FHIRChargeItemTest.php | 58 +- .../FHIRClaimResponseTest.php | 58 +- .../FHIRDomainResource/FHIRClaimTest.php | 58 +- .../FHIRClinicalImpressionTest.php | 58 +- .../FHIRDomainResource/FHIRCodeSystemTest.php | 58 +- .../FHIRCommunicationRequestTest.php | 58 +- .../FHIRCommunicationTest.php | 58 +- .../FHIRCompartmentDefinitionTest.php | 58 +- .../FHIRCompositionTest.php | 58 +- .../FHIRDomainResource/FHIRConceptMapTest.php | 58 +- .../FHIRDomainResource/FHIRConditionTest.php | 58 +- .../FHIRDomainResource/FHIRConsentTest.php | 58 +- .../FHIRDomainResource/FHIRContractTest.php | 58 +- .../FHIRDomainResource/FHIRCoverageTest.php | 58 +- .../FHIRDataElementTest.php | 58 +- .../FHIRDetectedIssueTest.php | 58 +- .../FHIRDeviceComponentTest.php | 58 +- .../FHIRDeviceMetricTest.php | 58 +- .../FHIRDeviceRequestTest.php | 58 +- .../FHIRDomainResource/FHIRDeviceTest.php | 58 +- .../FHIRDeviceUseStatementTest.php | 58 +- .../FHIRDiagnosticReportTest.php | 58 +- .../FHIRDocumentManifestTest.php | 58 +- .../FHIRDocumentReferenceTest.php | 58 +- .../FHIREligibilityRequestTest.php | 58 +- .../FHIREligibilityResponseTest.php | 58 +- .../FHIRDomainResource/FHIREncounterTest.php | 58 +- .../FHIRDomainResource/FHIREndpointTest.php | 58 +- .../FHIREnrollmentRequestTest.php | 58 +- .../FHIREnrollmentResponseTest.php | 58 +- .../FHIREpisodeOfCareTest.php | 58 +- .../FHIRExpansionProfileTest.php | 58 +- .../FHIRExplanationOfBenefitTest.php | 58 +- .../FHIRFamilyMemberHistoryTest.php | 58 +- .../FHIRDomainResource/FHIRFlagTest.php | 58 +- .../FHIRDomainResource/FHIRGoalTest.php | 58 +- .../FHIRGraphDefinitionTest.php | 58 +- .../FHIRDomainResource/FHIRGroupTest.php | 58 +- .../FHIRGuidanceResponseTest.php | 58 +- .../FHIRHealthcareServiceTest.php | 58 +- .../FHIRImagingManifestTest.php | 58 +- .../FHIRImagingStudyTest.php | 58 +- .../FHIRImmunizationRecommendationTest.php | 58 +- .../FHIRImmunizationTest.php | 58 +- .../FHIRImplementationGuideTest.php | 58 +- .../FHIRDomainResource/FHIRLibraryTest.php | 58 +- .../FHIRDomainResource/FHIRLinkageTest.php | 58 +- .../FHIRDomainResource/FHIRListTest.php | 58 +- .../FHIRDomainResource/FHIRLocationTest.php | 58 +- .../FHIRMeasureReportTest.php | 58 +- .../FHIRDomainResource/FHIRMeasureTest.php | 58 +- .../FHIRDomainResource/FHIRMediaTest.php | 58 +- .../FHIRMedicationAdministrationTest.php | 58 +- .../FHIRMedicationDispenseTest.php | 58 +- .../FHIRMedicationRequestTest.php | 58 +- .../FHIRMedicationStatementTest.php | 58 +- .../FHIRDomainResource/FHIRMedicationTest.php | 58 +- .../FHIRMessageDefinitionTest.php | 58 +- .../FHIRMessageHeaderTest.php | 58 +- .../FHIRNamingSystemTest.php | 58 +- .../FHIRNutritionOrderTest.php | 58 +- .../FHIRObservationTest.php | 58 +- .../FHIROperationDefinitionTest.php | 58 +- .../FHIROperationOutcomeTest.php | 58 +- .../FHIROrganizationTest.php | 58 +- .../FHIRDomainResource/FHIRPatientTest.php | 58 +- .../FHIRPaymentNoticeTest.php | 58 +- .../FHIRPaymentReconciliationTest.php | 58 +- .../FHIRDomainResource/FHIRPersonTest.php | 58 +- .../FHIRPlanDefinitionTest.php | 58 +- .../FHIRPractitionerRoleTest.php | 58 +- .../FHIRPractitionerTest.php | 58 +- .../FHIRProcedureRequestTest.php | 58 +- .../FHIRDomainResource/FHIRProcedureTest.php | 58 +- .../FHIRProcessRequestTest.php | 58 +- .../FHIRProcessResponseTest.php | 58 +- .../FHIRDomainResource/FHIRProvenanceTest.php | 58 +- .../FHIRQuestionnaireResponseTest.php | 58 +- .../FHIRQuestionnaireTest.php | 58 +- .../FHIRReferralRequestTest.php | 58 +- .../FHIRRelatedPersonTest.php | 58 +- .../FHIRRequestGroupTest.php | 58 +- .../FHIRResearchStudyTest.php | 58 +- .../FHIRResearchSubjectTest.php | 58 +- .../FHIRRiskAssessmentTest.php | 58 +- .../FHIRDomainResource/FHIRScheduleTest.php | 58 +- .../FHIRSearchParameterTest.php | 58 +- .../FHIRDomainResource/FHIRSequenceTest.php | 58 +- .../FHIRServiceDefinitionTest.php | 58 +- .../FHIRDomainResource/FHIRSlotTest.php | 58 +- .../FHIRDomainResource/FHIRSpecimenTest.php | 58 +- .../FHIRStructureDefinitionTest.php | 58 +- .../FHIRStructureMapTest.php | 58 +- .../FHIRSubscriptionTest.php | 58 +- .../FHIRDomainResource/FHIRSubstanceTest.php | 58 +- .../FHIRSupplyDeliveryTest.php | 58 +- .../FHIRSupplyRequestTest.php | 58 +- .../FHIRDomainResource/FHIRTaskTest.php | 58 +- .../FHIRDomainResource/FHIRTestReportTest.php | 58 +- .../FHIRDomainResource/FHIRTestScriptTest.php | 58 +- .../FHIRDomainResource/FHIRValueSetTest.php | 58 +- .../FHIRVisionPrescriptionTest.php | 58 +- .../FHIRResource/FHIRDomainResourceTest.php | 2 +- .../FHIRResource/FHIRParametersTest.php | 2 +- .../FHIRResourceContainerTest.php | 2 +- .../STU3/PHPFHIRTests/FHIRResourceTest.php | 2 +- .../FHIRSampledDataDataTypePrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRStringPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRTimePrimitiveTest.php | 2 +- .../FHIRUnsignedIntPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRUriPrimitiveTest.php | 2 +- .../PHPFHIRTests/FHIRUuidPrimitiveTest.php | 2 +- .../PHPFHIRTests/PHPFHIRConstantsTest.php | 2 +- .../STU3/PHPFHIRTests/PHPFHIRTypeMapTest.php | 2 +- .../STU3/PHPFHIRTypeInterface.php | 10 +- .../PHPFHIRGenerated/STU3/PHPFHIRTypeMap.php | 2 +- .../STU3/PHPFHIRValidationAssertionsTrait.php | 219 + 6206 files changed, 439316 insertions(+), 16870 deletions(-) create mode 100644 src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRValidationAssertionsTrait.php create mode 100644 src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRValidationAssertionsTrait.php create mode 100644 src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRValidationAssertionsTrait.php create mode 100644 src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRValidationAssertionsTrait.php diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBase64BinaryPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBase64BinaryPrimitive.php index 9de15d1a44..22197be825 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBase64BinaryPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBase64BinaryPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BASE_64BINARY_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type base64Binary-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBase64BinaryPrimitive Constructor @@ -173,11 +175,37 @@ public function _writeToFile($fileHandle) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASE_64BINARY_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBinary.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBinary.php index 42c40b0a16..e908708483 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBinary.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBinary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -64,6 +64,7 @@ class FHIRBinary implements PHPFHIRCommentContainerInterface, PHPFHIRContainedTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINARY; @@ -88,7 +89,7 @@ class FHIRBinary implements PHPFHIRCommentContainerInterface, PHPFHIRContainedTy * Validation map for fields in type Binary * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBinary Constructor @@ -225,11 +226,36 @@ public function setId($id = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ID] = $fieldErrs; + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBooleanPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBooleanPrimitive.php index 2246871e5b..6ac8f1e22b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBooleanPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBooleanPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BOOLEAN_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type boolean-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBooleanPrimitive Constructor @@ -159,11 +161,37 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BOOLEAN_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRCodePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRCodePrimitive.php index 5a7745854f..76a9265c8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRCodePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRCodePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRCodePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRCodePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type code-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, ], @@ -163,11 +165,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDatePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDatePrimitive.php index 85e88625c4..9232501afb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDatePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDatePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRDatePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRDatePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type date-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^\\d{4}(\\-\\d{2}(\\-\\d{2})?)?(Z|(\\+|\\-)\\d{2}:\\d{2})?$/', ], @@ -172,7 +174,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -192,11 +194,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDateTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDateTimePrimitive.php index b4a5b70665..2ee7ed020a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDateTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDateTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_TIME_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type dateTime-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^\\d{4}(\\-\\d{2}(\\-\\d{2}(T\\d{2}(:\\d{2}(:\\d{2}(\\.\\d+)?)?)?)?)?)?(Z|(\\+|\\-)\\d{2}:\\d{2})?$/', ], @@ -172,7 +174,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -193,11 +195,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_TIME_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDecimalPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDecimalPrimitive.php index b7d47aa509..0754b16238 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDecimalPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDecimalPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DECIMAL_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type decimal-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDecimalPrimitive Constructor @@ -159,11 +161,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DECIMAL_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement.php index 838970610a..9f4b4f3669 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -69,6 +69,7 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ELEMENT; @@ -99,7 +100,7 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterf * Validation map for fields in type Element * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElement Constructor @@ -273,11 +274,38 @@ public function setId($id = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ID] = $fieldErrs; + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddress.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddress.php index 1f8f3ba1c4..eb73e773e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddress.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddress.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -180,7 +180,7 @@ class FHIRAddress extends FHIRElement * Validation map for fields in type Address * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddress Constructor @@ -708,11 +708,188 @@ public function setZip($zip = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCountry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNTRY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLine())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getZip())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ZIP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CITY])) { + $v = $this->getCity(); + foreach($validationRules[self::FIELD_CITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_CITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CITY])) { + $errs[self::FIELD_CITY] = []; + } + $errs[self::FIELD_CITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNTRY])) { + $v = $this->getCountry(); + foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_COUNTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY])) { + $errs[self::FIELD_COUNTRY] = []; + } + $errs[self::FIELD_COUNTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINE])) { + $v = $this->getLine(); + foreach($validationRules[self::FIELD_LINE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_LINE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINE])) { + $errs[self::FIELD_LINE] = []; + } + $errs[self::FIELD_LINE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATE])) { + $v = $this->getState(); + foreach($validationRules[self::FIELD_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATE])) { + $errs[self::FIELD_STATE] = []; + } + $errs[self::FIELD_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ZIP])) { + $v = $this->getZip(); + foreach($validationRules[self::FIELD_ZIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_ZIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ZIP])) { + $errs[self::FIELD_ZIP] = []; + } + $errs[self::FIELD_ZIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddressUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddressUse.php index 924abe281d..d19985cb4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddressUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddressUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRAddressUse extends FHIRElement * Validation map for fields in type AddressUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddressUse Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAggregationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAggregationMode.php index 24ac34eb0a..713acbe7e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAggregationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAggregationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRAggregationMode extends FHIRElement * Validation map for fields in type AggregationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAggregationMode Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAlertStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAlertStatus.php index 059c631dc9..c12341c945 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAlertStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAlertStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRAlertStatus extends FHIRElement * Validation map for fields in type AlertStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAlertStatus Constructor @@ -162,11 +162,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALERT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAttachment.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAttachment.php index 5237bcf61f..fac73ff0f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAttachment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAttachment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -173,7 +173,7 @@ class FHIRAttachment extends FHIRElement * Validation map for fields in type Attachment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAttachment Constructor @@ -643,11 +643,169 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getHash())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HASH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSize())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIZE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HASH])) { + $v = $this->getHash(); + foreach($validationRules[self::FIELD_HASH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_HASH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HASH])) { + $errs[self::FIELD_HASH] = []; + } + $errs[self::FIELD_HASH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIZE])) { + $v = $this->getSize(); + foreach($validationRules[self::FIELD_SIZE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_SIZE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIZE])) { + $errs[self::FIELD_SIZE] = []; + } + $errs[self::FIELD_SIZE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement.php index d5d4822729..126e0abf1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBackboneElement extends FHIRElement * Validation map for fields in type BackboneElement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBackboneElement Constructor @@ -210,11 +210,69 @@ public function setModifierExtension(array $modifierExtension = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getModifierExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposure.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposure.php index 0e84afa19f..5fa73ae3d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposure.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRAdverseReactionExposure extends FHIRBackboneElement * Validation map for fields in type AdverseReaction.Exposure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseReactionExposure Constructor @@ -386,11 +386,130 @@ public function setType(FHIRExposureType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCausalityExpectation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAUSALITY_EXPECTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CAUSALITY_EXPECTATION])) { + $v = $this->getCausalityExpectation(); + foreach($validationRules[self::FIELD_CAUSALITY_EXPECTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION_DOT_EXPOSURE, self::FIELD_CAUSALITY_EXPECTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAUSALITY_EXPECTATION])) { + $errs[self::FIELD_CAUSALITY_EXPECTATION] = []; + } + $errs[self::FIELD_CAUSALITY_EXPECTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION_DOT_EXPOSURE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION_DOT_EXPOSURE, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION_DOT_EXPOSURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptom.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptom.php index 137374252d..0afaa3f3a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptom.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptom.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRAdverseReactionSymptom extends FHIRBackboneElement * Validation map for fields in type AdverseReaction.Symptom * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseReactionSymptom Constructor @@ -238,11 +238,96 @@ public function setSeverity(FHIRReactionSeverity $severity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION_DOT_SYMPTOM, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION_DOT_SYMPTOM, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php index 9a501a348f..8923268a88 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -170,7 +170,7 @@ class FHIRCarePlanActivity extends FHIRBackboneElement * Validation map for fields in type CarePlan.Activity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanActivity Constructor @@ -594,11 +594,185 @@ public function setStatus(FHIRCarePlanActivityStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getActionResulting())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION_RESULTING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGoal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNotes())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTES] = $fieldErrs; + } + } + if (null !== ($v = $this->getProhibited())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROHIBITED] = $fieldErrs; + } + } + if (null !== ($v = $this->getSimple())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIMPLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION_RESULTING])) { + $v = $this->getActionResulting(); + foreach($validationRules[self::FIELD_ACTION_RESULTING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_ACTION_RESULTING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION_RESULTING])) { + $errs[self::FIELD_ACTION_RESULTING] = []; + } + $errs[self::FIELD_ACTION_RESULTING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL])) { + $v = $this->getGoal(); + foreach($validationRules[self::FIELD_GOAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_GOAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL])) { + $errs[self::FIELD_GOAL] = []; + } + $errs[self::FIELD_GOAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROHIBITED])) { + $v = $this->getProhibited(); + foreach($validationRules[self::FIELD_PROHIBITED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_PROHIBITED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROHIBITED])) { + $errs[self::FIELD_PROHIBITED] = []; + } + $errs[self::FIELD_PROHIBITED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIMPLE])) { + $v = $this->getSimple(); + foreach($validationRules[self::FIELD_SIMPLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_SIMPLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIMPLE])) { + $errs[self::FIELD_SIMPLE] = []; + } + $errs[self::FIELD_SIMPLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoal.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoal.php index 1533c85685..9fe51263df 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRCarePlanGoal extends FHIRBackboneElement * Validation map for fields in type CarePlan.Goal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanGoal Constructor @@ -420,11 +420,132 @@ public function setStatus(FHIRCarePlanGoalStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getConcern())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCERN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotes())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTES] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONCERN])) { + $v = $this->getConcern(); + foreach($validationRules[self::FIELD_CONCERN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_GOAL, self::FIELD_CONCERN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCERN])) { + $errs[self::FIELD_CONCERN] = []; + } + $errs[self::FIELD_CONCERN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_GOAL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_GOAL, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_GOAL, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php index 8da2def2d6..b3f7933d5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRCarePlanParticipant extends FHIRBackboneElement * Validation map for fields in type CarePlan.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanParticipant Constructor @@ -231,11 +231,96 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMember())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MEMBER])) { + $v = $this->getMember(); + foreach($validationRules[self::FIELD_MEMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_PARTICIPANT, self::FIELD_MEMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEMBER])) { + $errs[self::FIELD_MEMBER] = []; + } + $errs[self::FIELD_MEMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimple.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimple.php index 32a311af2f..edcdb5454c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimple.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimple.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -232,7 +232,7 @@ class FHIRCarePlanSimple extends FHIRBackboneElement * Validation map for fields in type CarePlan.Simple * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanSimple Constructor @@ -799,11 +799,251 @@ public function setTimingString($timingString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDailyAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DAILY_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAILS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProduct())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_SCHEDULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAILY_AMOUNT])) { + $v = $this->getDailyAmount(); + foreach($validationRules[self::FIELD_DAILY_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_DAILY_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAILY_AMOUNT])) { + $errs[self::FIELD_DAILY_AMOUNT] = []; + } + $errs[self::FIELD_DAILY_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAILS])) { + $v = $this->getDetails(); + foreach($validationRules[self::FIELD_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAILS])) { + $errs[self::FIELD_DETAILS] = []; + } + $errs[self::FIELD_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT])) { + $v = $this->getProduct(); + foreach($validationRules[self::FIELD_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT])) { + $errs[self::FIELD_PRODUCT] = []; + } + $errs[self::FIELD_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_SCHEDULE])) { + $v = $this->getTimingSchedule(); + foreach($validationRules[self::FIELD_TIMING_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_TIMING_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_SCHEDULE])) { + $errs[self::FIELD_TIMING_SCHEDULE] = []; + } + $errs[self::FIELD_TIMING_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_STRING])) { + $v = $this->getTimingString(); + foreach($validationRules[self::FIELD_TIMING_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_SIMPLE, self::FIELD_TIMING_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_STRING])) { + $errs[self::FIELD_TIMING_STRING] = []; + } + $errs[self::FIELD_TIMING_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php index 40fb2b02c8..7de7586e98 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRCompositionAttester extends FHIRBackboneElement * Validation map for fields in type Composition.Attester * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_MODE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -362,11 +362,115 @@ public function setTime($time = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getMode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php index 6036e621da..2d77d17610 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRCompositionEvent extends FHIRBackboneElement * Validation map for fields in type Composition.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionEvent Constructor @@ -369,11 +369,117 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php index 3c130ea77a..44649678d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -148,7 +148,7 @@ class FHIRCompositionSection extends FHIRBackboneElement * Validation map for fields in type Composition.Section * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionSection Constructor @@ -440,11 +440,149 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSection())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECTION])) { + $v = $this->getSection(); + foreach($validationRules[self::FIELD_SECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_SECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECTION])) { + $errs[self::FIELD_SECTION] = []; + } + $errs[self::FIELD_SECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConcept.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConcept.php index 198d219d75..93908472a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRConceptMapConcept extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Concept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapConcept Constructor @@ -443,11 +443,134 @@ public function setSystem($system = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDependsOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEPENDS_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMap())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_CONCEPT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDS_ON])) { + $v = $this->getDependsOn(); + foreach($validationRules[self::FIELD_DEPENDS_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_CONCEPT, self::FIELD_DEPENDS_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDS_ON])) { + $errs[self::FIELD_DEPENDS_ON] = []; + } + $errs[self::FIELD_DEPENDS_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAP])) { + $v = $this->getMap(); + foreach($validationRules[self::FIELD_MAP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_CONCEPT, self::FIELD_MAP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAP])) { + $errs[self::FIELD_MAP] = []; + } + $errs[self::FIELD_MAP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_CONCEPT, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php index 0c85e6cbb6..d9b2d1edd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRConceptMapDependsOn extends FHIRBackboneElement * Validation map for fields in type ConceptMap.DependsOn * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapDependsOn Constructor @@ -351,11 +351,113 @@ public function setSystem($system = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMap.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMap.php index db0cbcafba..2e4d20b43e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMap.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -149,7 +149,7 @@ class FHIRConceptMapMap extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Map * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapMap Constructor @@ -504,11 +504,149 @@ public function setSystem($system = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComments())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getEquivalence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EQUIVALENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProduct())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRODUCT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_MAP, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENTS])) { + $v = $this->getComments(); + foreach($validationRules[self::FIELD_COMMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_MAP, self::FIELD_COMMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENTS])) { + $errs[self::FIELD_COMMENTS] = []; + } + $errs[self::FIELD_COMMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EQUIVALENCE])) { + $v = $this->getEquivalence(); + foreach($validationRules[self::FIELD_EQUIVALENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_MAP, self::FIELD_EQUIVALENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EQUIVALENCE])) { + $errs[self::FIELD_EQUIVALENCE] = []; + } + $errs[self::FIELD_EQUIVALENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT])) { + $v = $this->getProduct(); + foreach($validationRules[self::FIELD_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_MAP, self::FIELD_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT])) { + $errs[self::FIELD_PRODUCT] = []; + } + $errs[self::FIELD_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_MAP, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php index 4e9600a8ee..b441a5edeb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRConditionEvidence extends FHIRBackboneElement * Validation map for fields in type Condition.Evidence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionEvidence Constructor @@ -263,11 +263,98 @@ public function setDetail(array $detail = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_EVIDENCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_EVIDENCE, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocation.php index bd7f3b1273..6c39851f3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRConditionLocation extends FHIRBackboneElement * Validation map for fields in type Condition.Location * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionLocation Constructor @@ -248,11 +248,96 @@ public function setDetail($detail = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_LOCATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_LOCATION, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItem.php index 565d8fc660..48d5130be7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRConditionRelatedItem extends FHIRBackboneElement * Validation map for fields in type Condition.RelatedItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionRelatedItem Constructor @@ -293,11 +293,113 @@ public function setType(FHIRConditionRelationshipType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_RELATED_ITEM, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_RELATED_ITEM, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_RELATED_ITEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php index f009f902fe..8aeac0155e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRConditionStage extends FHIRBackboneElement * Validation map for fields in type Condition.Stage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionStage Constructor @@ -270,11 +270,98 @@ public function setSummary(FHIRCodeableConcept $summary = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAssessment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ASSESSMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSummary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUMMARY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSESSMENT])) { + $v = $this->getAssessment(); + foreach($validationRules[self::FIELD_ASSESSMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_STAGE, self::FIELD_ASSESSMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSESSMENT])) { + $errs[self::FIELD_ASSESSMENT] = []; + } + $errs[self::FIELD_ASSESSMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUMMARY])) { + $v = $this->getSummary(); + foreach($validationRules[self::FIELD_SUMMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_STAGE, self::FIELD_SUMMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUMMARY])) { + $errs[self::FIELD_SUMMARY] = []; + } + $errs[self::FIELD_SUMMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php index 0a0aee667c..4526cbb711 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRConformanceCertificate extends FHIRBackboneElement * Validation map for fields in type Conformance.Certificate * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceCertificate Constructor @@ -272,11 +272,96 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBlob())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BLOB] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BLOB])) { + $v = $this->getBlob(); + foreach($validationRules[self::FIELD_BLOB] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_CERTIFICATE, self::FIELD_BLOB, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BLOB])) { + $errs[self::FIELD_BLOB] = []; + } + $errs[self::FIELD_BLOB][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_CERTIFICATE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php index 583a38f131..d788adb98a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRConformanceDocument extends FHIRBackboneElement * Validation map for fields in type Conformance.Document * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceDocument Constructor @@ -314,11 +314,113 @@ public function setProfile(FHIRResourceReference $profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_DOCUMENT, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_DOCUMENT, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_DOCUMENT, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php index 150403b579..e4e83640b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -188,7 +188,7 @@ class FHIRConformanceEvent extends FHIRBackboneElement * Validation map for fields in type Conformance.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceEvent Constructor @@ -645,11 +645,200 @@ public function setResponse(FHIRResourceReference $response = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProtocol())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROTOCOL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php index d72d4a7b33..0d315fae5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRConformanceImplementation extends FHIRBackboneElement * Validation map for fields in type Conformance.Implementation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceImplementation Constructor @@ -272,11 +272,96 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_IMPLEMENTATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_IMPLEMENTATION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php index a3f2638c8b..b15655a53e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRConformanceMessaging extends FHIRBackboneElement * Validation map for fields in type Conformance.Messaging * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_EVENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -437,11 +437,132 @@ public function setReliableCache($reliableCache = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReliableCache())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELIABLE_CACHE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_MESSAGING, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_MESSAGING, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_MESSAGING, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELIABLE_CACHE])) { + $v = $this->getReliableCache(); + foreach($validationRules[self::FIELD_RELIABLE_CACHE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_MESSAGING, self::FIELD_RELIABLE_CACHE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELIABLE_CACHE])) { + $errs[self::FIELD_RELIABLE_CACHE] = []; + } + $errs[self::FIELD_RELIABLE_CACHE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php index e718316845..a6a851dbfe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRConformanceOperation extends FHIRBackboneElement * Validation map for fields in type Conformance.Operation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceOperation Constructor @@ -264,11 +264,96 @@ public function setDocumentation($documentation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_OPERATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_OPERATION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1.php index c74be4aeb3..e84e015105 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRConformanceOperation1 extends FHIRBackboneElement * Validation map for fields in type Conformance.Operation1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceOperation1 Constructor @@ -264,11 +264,96 @@ public function setDocumentation($documentation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_OPERATION_1, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_OPERATION_1, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQuery.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQuery.php index f47d8ebb01..ea8f6a1518 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQuery.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQuery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRConformanceQuery extends FHIRBackboneElement * Validation map for fields in type Conformance.Query * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceQuery Constructor @@ -429,11 +429,132 @@ public function setParameter(array $parameter = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_QUERY, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_QUERY, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_QUERY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_QUERY, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php index 9c9a1db1a5..753582ffdf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -177,7 +177,7 @@ class FHIRConformanceResource extends FHIRBackboneElement * Validation map for fields in type Conformance.Resource * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_OPERATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -699,11 +699,187 @@ public function setUpdateCreate($updateCreate = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getOperation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPERATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReadHistory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_READ_HISTORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSearchInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_INCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_PARAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUpdateCreate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UPDATE_CREATE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_READ_HISTORY])) { + $v = $this->getReadHistory(); + foreach($validationRules[self::FIELD_READ_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_READ_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_READ_HISTORY])) { + $errs[self::FIELD_READ_HISTORY] = []; + } + $errs[self::FIELD_READ_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_INCLUDE])) { + $v = $this->getSearchInclude(); + foreach($validationRules[self::FIELD_SEARCH_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_SEARCH_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_INCLUDE])) { + $errs[self::FIELD_SEARCH_INCLUDE] = []; + } + $errs[self::FIELD_SEARCH_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_PARAM])) { + $v = $this->getSearchParam(); + foreach($validationRules[self::FIELD_SEARCH_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_SEARCH_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_PARAM])) { + $errs[self::FIELD_SEARCH_PARAM] = []; + } + $errs[self::FIELD_SEARCH_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UPDATE_CREATE])) { + $v = $this->getUpdateCreate(); + foreach($validationRules[self::FIELD_UPDATE_CREATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_UPDATE_CREATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UPDATE_CREATE])) { + $errs[self::FIELD_UPDATE_CREATE] = []; + } + $errs[self::FIELD_UPDATE_CREATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php index 3bd8a712e5..8741434008 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -175,7 +175,7 @@ class FHIRConformanceRest extends FHIRBackboneElement * Validation map for fields in type Conformance.Rest * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RESOURCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -707,11 +707,189 @@ public function setSecurity(FHIRConformanceSecurity $security = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDocumentMailbox())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENT_MAILBOX, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOperation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPERATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getQuery())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUERY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSecurity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SECURITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENT_MAILBOX])) { + $v = $this->getDocumentMailbox(); + foreach($validationRules[self::FIELD_DOCUMENT_MAILBOX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_DOCUMENT_MAILBOX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENT_MAILBOX])) { + $errs[self::FIELD_DOCUMENT_MAILBOX] = []; + } + $errs[self::FIELD_DOCUMENT_MAILBOX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUERY])) { + $v = $this->getQuery(); + foreach($validationRules[self::FIELD_QUERY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_QUERY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUERY])) { + $errs[self::FIELD_QUERY] = []; + } + $errs[self::FIELD_QUERY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY])) { + $v = $this->getSecurity(); + foreach($validationRules[self::FIELD_SECURITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_SECURITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY])) { + $errs[self::FIELD_SECURITY] = []; + } + $errs[self::FIELD_SECURITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php index 8e171399df..3d8f301695 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -161,7 +161,7 @@ class FHIRConformanceSearchParam extends FHIRBackboneElement * Validation map for fields in type Conformance.SearchParam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceSearchParam Constructor @@ -638,11 +638,168 @@ public function setType(FHIRSearchParamType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getChain())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHAIN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CHAIN])) { + $v = $this->getChain(); + foreach($validationRules[self::FIELD_CHAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_CHAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHAIN])) { + $errs[self::FIELD_CHAIN] = []; + } + $errs[self::FIELD_CHAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php index fa4724280b..bf6a9ab8ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRConformanceSecurity extends FHIRBackboneElement * Validation map for fields in type Conformance.Security * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceSecurity Constructor @@ -446,11 +446,134 @@ public function setService(array $service = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCertificate())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CERTIFICATE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCors())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CORS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getService())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CERTIFICATE])) { + $v = $this->getCertificate(); + foreach($validationRules[self::FIELD_CERTIFICATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SECURITY, self::FIELD_CERTIFICATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CERTIFICATE])) { + $errs[self::FIELD_CERTIFICATE] = []; + } + $errs[self::FIELD_CERTIFICATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CORS])) { + $v = $this->getCors(); + foreach($validationRules[self::FIELD_CORS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SECURITY, self::FIELD_CORS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CORS])) { + $errs[self::FIELD_CORS] = []; + } + $errs[self::FIELD_CORS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SECURITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SECURITY, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php index 805b0c2ba4..3b8cdd3033 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRConformanceSoftware extends FHIRBackboneElement * Validation map for fields in type Conformance.Software * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceSoftware Constructor @@ -346,11 +346,113 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getReleaseDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELEASE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SOFTWARE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEASE_DATE])) { + $v = $this->getReleaseDate(); + foreach($validationRules[self::FIELD_RELEASE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SOFTWARE, self::FIELD_RELEASE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEASE_DATE])) { + $errs[self::FIELD_RELEASE_DATE] = []; + } + $errs[self::FIELD_RELEASE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SOFTWARE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannel.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannel.php index a40bf43b01..f203b04bc0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannel.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRDeviceObservationReportChannel extends FHIRBackboneElement * Validation map for fields in type DeviceObservationReport.Channel * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceObservationReportChannel Constructor @@ -251,11 +251,98 @@ public function setMetric(array $metric = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMetric())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_METRIC, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_OBSERVATION_REPORT_DOT_CHANNEL, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METRIC])) { + $v = $this->getMetric(); + foreach($validationRules[self::FIELD_METRIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_OBSERVATION_REPORT_DOT_CHANNEL, self::FIELD_METRIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METRIC])) { + $errs[self::FIELD_METRIC] = []; + } + $errs[self::FIELD_METRIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetric.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetric.php index 885c2559aa..94c6d65e09 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetric.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetric.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceObservationReportMetric extends FHIRBackboneElement * Validation map for fields in type DeviceObservationReport.Metric * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceObservationReportMetric Constructor @@ -170,11 +170,79 @@ public function setObservation(FHIRResourceReference $observation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getObservation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OBSERVATION])) { + $v = $this->getObservation(); + foreach($validationRules[self::FIELD_OBSERVATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_OBSERVATION_REPORT_DOT_METRIC, self::FIELD_OBSERVATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBSERVATION])) { + $errs[self::FIELD_OBSERVATION] = []; + } + $errs[self::FIELD_OBSERVATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDevice.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDevice.php index 84f95fe51d..41c2479254 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRDeviceObservationReportVirtualDevice extends FHIRBackboneElement * Validation map for fields in type DeviceObservationReport.VirtualDevice * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceObservationReportVirtualDevice Constructor @@ -251,11 +251,98 @@ public function setCode(FHIRCodeableConcept $code = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getChannel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHANNEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CHANNEL])) { + $v = $this->getChannel(); + foreach($validationRules[self::FIELD_CHANNEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_OBSERVATION_REPORT_DOT_VIRTUAL_DEVICE, self::FIELD_CHANNEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHANNEL])) { + $errs[self::FIELD_CHANNEL] = []; + } + $errs[self::FIELD_CHANNEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_OBSERVATION_REPORT_DOT_VIRTUAL_DEVICE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php index 3add892235..b58acf547a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -136,7 +136,7 @@ class FHIRDiagnosticOrderEvent extends FHIRBackboneElement * Validation map for fields in type DiagnosticOrder.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticOrderEvent Constructor @@ -371,11 +371,130 @@ public function setStatus(FHIRDiagnosticOrderStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_EVENT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_EVENT, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_EVENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_EVENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php index f29e01678a..1433750dad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRDiagnosticOrderItem extends FHIRBackboneElement * Validation map for fields in type DiagnosticOrder.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticOrderItem Constructor @@ -461,11 +461,151 @@ public function setStatus(FHIRDiagnosticOrderStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_ITEM, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_ITEM, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_ITEM, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_ITEM, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_ITEM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php index 23410ab2a3..6f65574edc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRDiagnosticReportImage extends FHIRBackboneElement * Validation map for fields in type DiagnosticReport.Image * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReportImage Constructor @@ -252,11 +252,96 @@ public function setLink(FHIRResourceReference $link = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLink())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_DOT_IMAGE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_DOT_IMAGE, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php index 3647b1b8ff..4cd83a824a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRDocumentReferenceContext extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Context * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceContext Constructor @@ -328,11 +328,115 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFacilityType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY_TYPE])) { + $v = $this->getFacilityType(); + foreach($validationRules[self::FIELD_FACILITY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_FACILITY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY_TYPE])) { + $errs[self::FIELD_FACILITY_TYPE] = []; + } + $errs[self::FIELD_FACILITY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameter.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameter.php index cc07f823a2..a6606e1b6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRDocumentReferenceParameter extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceParameter Constructor @@ -263,11 +263,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_PARAMETER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php index 47ecbc458c..a03842e1e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRDocumentReferenceRelatesTo extends FHIRBackboneElement * Validation map for fields in type DocumentReference.RelatesTo * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceRelatesTo Constructor @@ -234,11 +234,96 @@ public function setTarget(FHIRResourceReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATES_TO, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATES_TO, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceService.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceService.php index 5032ad9155..4dd981955d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceService.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceService.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRDocumentReferenceService extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Service * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceService Constructor @@ -323,11 +323,115 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_SERVICE, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_SERVICE, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_SERVICE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodation.php index 137cdca860..d4c9f2b123 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIREncounterAccomodation extends FHIRBackboneElement * Validation map for fields in type Encounter.Accomodation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterAccomodation Constructor @@ -221,11 +221,96 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BED] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BED])) { + $v = $this->getBed(); + foreach($validationRules[self::FIELD_BED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_ACCOMODATION, self::FIELD_BED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BED])) { + $errs[self::FIELD_BED] = []; + } + $errs[self::FIELD_BED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_ACCOMODATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php index 67bdf4a86c..d464c24c01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -234,7 +234,7 @@ class FHIREncounterHospitalization extends FHIRBackboneElement * Validation map for fields in type Encounter.Hospitalization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterHospitalization Constructor @@ -863,11 +863,272 @@ public function setSpecialCourtesy(array $specialCourtesy = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAccomodation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACCOMODATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAdmitSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADMIT_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIET] = $fieldErrs; + } + } + if (null !== ($v = $this->getDischargeDiagnosis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISCHARGE_DIAGNOSIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDischargeDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISCHARGE_DISPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreAdmissionIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReAdmission())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RE_ADMISSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecialArrangement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_ARRANGEMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialCourtesy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_COURTESY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACCOMODATION])) { + $v = $this->getAccomodation(); + foreach($validationRules[self::FIELD_ACCOMODATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_ACCOMODATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCOMODATION])) { + $errs[self::FIELD_ACCOMODATION] = []; + } + $errs[self::FIELD_ACCOMODATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADMIT_SOURCE])) { + $v = $this->getAdmitSource(); + foreach($validationRules[self::FIELD_ADMIT_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_ADMIT_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMIT_SOURCE])) { + $errs[self::FIELD_ADMIT_SOURCE] = []; + } + $errs[self::FIELD_ADMIT_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIET])) { + $v = $this->getDiet(); + foreach($validationRules[self::FIELD_DIET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DIET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIET])) { + $errs[self::FIELD_DIET] = []; + } + $errs[self::FIELD_DIET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCHARGE_DIAGNOSIS])) { + $v = $this->getDischargeDiagnosis(); + foreach($validationRules[self::FIELD_DISCHARGE_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DISCHARGE_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCHARGE_DIAGNOSIS])) { + $errs[self::FIELD_DISCHARGE_DIAGNOSIS] = []; + } + $errs[self::FIELD_DISCHARGE_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCHARGE_DISPOSITION])) { + $v = $this->getDischargeDisposition(); + foreach($validationRules[self::FIELD_DISCHARGE_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DISCHARGE_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCHARGE_DISPOSITION])) { + $errs[self::FIELD_DISCHARGE_DISPOSITION] = []; + } + $errs[self::FIELD_DISCHARGE_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_ADMISSION_IDENTIFIER])) { + $v = $this->getPreAdmissionIdentifier(); + foreach($validationRules[self::FIELD_PRE_ADMISSION_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_PRE_ADMISSION_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_ADMISSION_IDENTIFIER])) { + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER] = []; + } + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RE_ADMISSION])) { + $v = $this->getReAdmission(); + foreach($validationRules[self::FIELD_RE_ADMISSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_RE_ADMISSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RE_ADMISSION])) { + $errs[self::FIELD_RE_ADMISSION] = []; + } + $errs[self::FIELD_RE_ADMISSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_ARRANGEMENT])) { + $v = $this->getSpecialArrangement(); + foreach($validationRules[self::FIELD_SPECIAL_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_SPECIAL_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_ARRANGEMENT])) { + $errs[self::FIELD_SPECIAL_ARRANGEMENT] = []; + } + $errs[self::FIELD_SPECIAL_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_COURTESY])) { + $v = $this->getSpecialCourtesy(); + foreach($validationRules[self::FIELD_SPECIAL_COURTESY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_SPECIAL_COURTESY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_COURTESY])) { + $errs[self::FIELD_SPECIAL_COURTESY] = []; + } + $errs[self::FIELD_SPECIAL_COURTESY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php index 39e18ef322..8905b72b14 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIREncounterLocation extends FHIRBackboneElement * Validation map for fields in type Encounter.Location * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterLocation Constructor @@ -221,11 +221,96 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php index a15b5431cd..003a1b68a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIREncounterParticipant extends FHIRBackboneElement * Validation map for fields in type Encounter.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterParticipant Constructor @@ -262,11 +262,98 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIndividual())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDIVIDUAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_INDIVIDUAL])) { + $v = $this->getIndividual(); + foreach($validationRules[self::FIELD_INDIVIDUAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_INDIVIDUAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDIVIDUAL])) { + $errs[self::FIELD_INDIVIDUAL] = []; + } + $errs[self::FIELD_INDIVIDUAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryCondition.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryCondition.php index a97250bd8c..beeaad71b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -163,7 +163,7 @@ class FHIRFamilyHistoryCondition extends FHIRBackboneElement * Validation map for fields in type FamilyHistory.Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyHistoryCondition Constructor @@ -484,11 +484,164 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_CONDITION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_AGE])) { + $v = $this->getOnsetAge(); + foreach($validationRules[self::FIELD_ONSET_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_CONDITION, self::FIELD_ONSET_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_AGE])) { + $errs[self::FIELD_ONSET_AGE] = []; + } + $errs[self::FIELD_ONSET_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_RANGE])) { + $v = $this->getOnsetRange(); + foreach($validationRules[self::FIELD_ONSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_CONDITION, self::FIELD_ONSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_RANGE])) { + $errs[self::FIELD_ONSET_RANGE] = []; + } + $errs[self::FIELD_ONSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_STRING])) { + $v = $this->getOnsetString(); + foreach($validationRules[self::FIELD_ONSET_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_CONDITION, self::FIELD_ONSET_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_STRING])) { + $errs[self::FIELD_ONSET_STRING] = []; + } + $errs[self::FIELD_ONSET_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_CONDITION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_CONDITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelation.php index 6b76ba3303..6ac5693a37 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -258,7 +258,7 @@ class FHIRFamilyHistoryRelation extends FHIRBackboneElement * Validation map for fields in type FamilyHistory.Relation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyHistoryRelation Constructor @@ -990,11 +990,268 @@ public function setRelationship(FHIRCodeableConcept $relationship = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBornDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDeceasedAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BORN_DATE])) { + $v = $this->getBornDate(); + foreach($validationRules[self::FIELD_BORN_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_BORN_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_DATE])) { + $errs[self::FIELD_BORN_DATE] = []; + } + $errs[self::FIELD_BORN_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_PERIOD])) { + $v = $this->getBornPeriod(); + foreach($validationRules[self::FIELD_BORN_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_BORN_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_PERIOD])) { + $errs[self::FIELD_BORN_PERIOD] = []; + } + $errs[self::FIELD_BORN_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_STRING])) { + $v = $this->getBornString(); + foreach($validationRules[self::FIELD_BORN_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_BORN_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_STRING])) { + $errs[self::FIELD_BORN_STRING] = []; + } + $errs[self::FIELD_BORN_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_AGE])) { + $v = $this->getDeceasedAge(); + foreach($validationRules[self::FIELD_DECEASED_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_DECEASED_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_AGE])) { + $errs[self::FIELD_DECEASED_AGE] = []; + } + $errs[self::FIELD_DECEASED_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_BOOLEAN])) { + $v = $this->getDeceasedBoolean(); + foreach($validationRules[self::FIELD_DECEASED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_DECEASED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_BOOLEAN])) { + $errs[self::FIELD_DECEASED_BOOLEAN] = []; + } + $errs[self::FIELD_DECEASED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_DATE])) { + $v = $this->getDeceasedDate(); + foreach($validationRules[self::FIELD_DECEASED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_DECEASED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_DATE])) { + $errs[self::FIELD_DECEASED_DATE] = []; + } + $errs[self::FIELD_DECEASED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_RANGE])) { + $v = $this->getDeceasedRange(); + foreach($validationRules[self::FIELD_DECEASED_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_DECEASED_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_RANGE])) { + $errs[self::FIELD_DECEASED_RANGE] = []; + } + $errs[self::FIELD_DECEASED_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_STRING])) { + $v = $this->getDeceasedString(); + foreach($validationRules[self::FIELD_DECEASED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_DECEASED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_STRING])) { + $errs[self::FIELD_DECEASED_STRING] = []; + } + $errs[self::FIELD_DECEASED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_DOT_RELATION, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php index bbe3e7f03a..75abcc6f7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -166,7 +166,7 @@ class FHIRGroupCharacteristic extends FHIRBackboneElement * Validation map for fields in type Group.Characteristic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupCharacteristic Constructor @@ -491,11 +491,164 @@ public function setValueRange(FHIRRange $valueRange = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExclude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php index cbe9dd3525..74cc59c1bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -172,7 +172,7 @@ class FHIRImagingStudyInstance extends FHIRBackboneElement * Validation map for fields in type ImagingStudy.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudyInstance Constructor @@ -608,11 +608,181 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSopclass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOPCLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ATTACHMENT])) { + $v = $this->getAttachment(); + foreach($validationRules[self::FIELD_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTACHMENT])) { + $errs[self::FIELD_ATTACHMENT] = []; + } + $errs[self::FIELD_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOPCLASS])) { + $v = $this->getSopclass(); + foreach($validationRules[self::FIELD_SOPCLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_SOPCLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOPCLASS])) { + $errs[self::FIELD_SOPCLASS] = []; + } + $errs[self::FIELD_SOPCLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php index f53c6c499f..fd1f9c4a13 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -214,7 +214,7 @@ class FHIRImagingStudySeries extends FHIRBackboneElement * Validation map for fields in type ImagingStudy.Series * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INSTANCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -836,11 +836,234 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAvailability())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getModality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfInstances())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY])) { + $v = $this->getAvailability(); + foreach($validationRules[self::FIELD_AVAILABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_AVAILABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY])) { + $errs[self::FIELD_AVAILABILITY] = []; + } + $errs[self::FIELD_AVAILABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODALITY])) { + $v = $this->getModality(); + foreach($validationRules[self::FIELD_MODALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_MODALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODALITY])) { + $errs[self::FIELD_MODALITY] = []; + } + $errs[self::FIELD_MODALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_INSTANCES])) { + $v = $this->getNumberOfInstances(); + foreach($validationRules[self::FIELD_NUMBER_OF_INSTANCES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_NUMBER_OF_INSTANCES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_INSTANCES])) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = []; + } + $errs[self::FIELD_NUMBER_OF_INSTANCES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php index 0d5828db93..a328df4152 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRImmunizationExplanation extends FHIRBackboneElement * Validation map for fields in type Immunization.Explanation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationExplanation Constructor @@ -301,11 +301,100 @@ public function setRefusalReason(array $refusalReason = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRefusalReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFUSAL_REASON, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_EXPLANATION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFUSAL_REASON])) { + $v = $this->getRefusalReason(); + foreach($validationRules[self::FIELD_REFUSAL_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_EXPLANATION, self::FIELD_REFUSAL_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFUSAL_REASON])) { + $errs[self::FIELD_REFUSAL_REASON] = []; + } + $errs[self::FIELD_REFUSAL_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php index 274e078cc7..42da3d4892 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRImmunizationReaction extends FHIRBackboneElement * Validation map for fields in type Immunization.Reaction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationReaction Constructor @@ -323,11 +323,113 @@ public function setReported($reported = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getReported())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTED])) { + $v = $this->getReported(); + foreach($validationRules[self::FIELD_REPORTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_REPORTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTED])) { + $errs[self::FIELD_REPORTED] = []; + } + $errs[self::FIELD_REPORTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php index 1d4124ce8b..3c35eeb242 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -185,7 +185,7 @@ class FHIRImmunizationVaccinationProtocol extends FHIRBackboneElement * Validation map for fields in type Immunization.VaccinationProtocol * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationVaccinationProtocol Constructor @@ -622,11 +622,198 @@ public function setSeriesDoses($seriesDoses = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeriesDoses())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES_DOSES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_SEQUENCE])) { + $v = $this->getDoseSequence(); + foreach($validationRules[self::FIELD_DOSE_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DOSE_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_SEQUENCE])) { + $errs[self::FIELD_DOSE_SEQUENCE] = []; + } + $errs[self::FIELD_DOSE_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_STATUS])) { + $v = $this->getDoseStatus(); + foreach($validationRules[self::FIELD_DOSE_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DOSE_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_STATUS])) { + $errs[self::FIELD_DOSE_STATUS] = []; + } + $errs[self::FIELD_DOSE_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_STATUS_REASON])) { + $v = $this->getDoseStatusReason(); + foreach($validationRules[self::FIELD_DOSE_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DOSE_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_STATUS_REASON])) { + $errs[self::FIELD_DOSE_STATUS_REASON] = []; + } + $errs[self::FIELD_DOSE_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_TARGET])) { + $v = $this->getDoseTarget(); + foreach($validationRules[self::FIELD_DOSE_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DOSE_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_TARGET])) { + $errs[self::FIELD_DOSE_TARGET] = []; + } + $errs[self::FIELD_DOSE_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES_DOSES])) { + $v = $this->getSeriesDoses(); + foreach($validationRules[self::FIELD_SERIES_DOSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_SERIES_DOSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES_DOSES])) { + $errs[self::FIELD_SERIES_DOSES] = []; + } + $errs[self::FIELD_SERIES_DOSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php index 2351b9dbfe..c14319d494 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRImmunizationRecommendationDateCriterion extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.DateCriterion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationDateCriterion Constructor @@ -258,11 +258,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_DATE_CRITERION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_DATE_CRITERION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php index 0c7fa750a1..1e1eb7f640 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRImmunizationRecommendationProtocol extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.Protocol * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationProtocol Constructor @@ -395,11 +395,130 @@ public function setSeries($series = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_SEQUENCE])) { + $v = $this->getDoseSequence(); + foreach($validationRules[self::FIELD_DOSE_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_DOSE_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_SEQUENCE])) { + $errs[self::FIELD_DOSE_SEQUENCE] = []; + } + $errs[self::FIELD_DOSE_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php index e50fa38092..57f3ac1bed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -187,7 +187,7 @@ class FHIRImmunizationRecommendationRecommendation extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.Recommendation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationRecommendation Constructor @@ -694,11 +694,204 @@ public function setVaccineType(FHIRCodeableConcept $vaccineType = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDateCriterion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATE_CRITERION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDoseNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getForecastStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORECAST_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProtocol())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROTOCOL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingImmunization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_IMMUNIZATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSupportingPatientInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_PATIENT_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVaccineType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VACCINE_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_CRITERION])) { + $v = $this->getDateCriterion(); + foreach($validationRules[self::FIELD_DATE_CRITERION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DATE_CRITERION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_CRITERION])) { + $errs[self::FIELD_DATE_CRITERION] = []; + } + $errs[self::FIELD_DATE_CRITERION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_NUMBER])) { + $v = $this->getDoseNumber(); + foreach($validationRules[self::FIELD_DOSE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DOSE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_NUMBER])) { + $errs[self::FIELD_DOSE_NUMBER] = []; + } + $errs[self::FIELD_DOSE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORECAST_STATUS])) { + $v = $this->getForecastStatus(); + foreach($validationRules[self::FIELD_FORECAST_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_FORECAST_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORECAST_STATUS])) { + $errs[self::FIELD_FORECAST_STATUS] = []; + } + $errs[self::FIELD_FORECAST_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_IMMUNIZATION])) { + $v = $this->getSupportingImmunization(); + foreach($validationRules[self::FIELD_SUPPORTING_IMMUNIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SUPPORTING_IMMUNIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_IMMUNIZATION])) { + $errs[self::FIELD_SUPPORTING_IMMUNIZATION] = []; + } + $errs[self::FIELD_SUPPORTING_IMMUNIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_PATIENT_INFORMATION])) { + $v = $this->getSupportingPatientInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_PATIENT_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SUPPORTING_PATIENT_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINE_TYPE])) { + $v = $this->getVaccineType(); + foreach($validationRules[self::FIELD_VACCINE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_VACCINE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINE_TYPE])) { + $errs[self::FIELD_VACCINE_TYPE] = []; + } + $errs[self::FIELD_VACCINE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php index 2c30a49723..bea404ecbd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -136,7 +136,7 @@ class FHIRListEntry extends FHIRBackboneElement * Validation map for fields in type List.Entry * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListEntry Constructor @@ -418,11 +418,132 @@ public function setItem(FHIRResourceReference $item = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeleted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DELETED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFlag())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FLAG, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DELETED])) { + $v = $this->getDeleted(); + foreach($validationRules[self::FIELD_DELETED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_DELETED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DELETED])) { + $errs[self::FIELD_DELETED] = []; + } + $errs[self::FIELD_DELETED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FLAG])) { + $v = $this->getFlag(); + foreach($validationRules[self::FIELD_FLAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_FLAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FLAG])) { + $errs[self::FIELD_FLAG] = []; + } + $errs[self::FIELD_FLAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php index 8a5e47f3fe..185ba40e7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRLocationPosition extends FHIRBackboneElement * Validation map for fields in type Location.Position * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationPosition Constructor @@ -345,11 +345,113 @@ public function setLongitude($longitude = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAltitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALTITUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLatitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LATITUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLongitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LONGITUDE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALTITUDE])) { + $v = $this->getAltitude(); + foreach($validationRules[self::FIELD_ALTITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_ALTITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALTITUDE])) { + $errs[self::FIELD_ALTITUDE] = []; + } + $errs[self::FIELD_ALTITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LATITUDE])) { + $v = $this->getLatitude(); + foreach($validationRules[self::FIELD_LATITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_LATITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LATITUDE])) { + $errs[self::FIELD_LATITUDE] = []; + } + $errs[self::FIELD_LATITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LONGITUDE])) { + $v = $this->getLongitude(); + foreach($validationRules[self::FIELD_LONGITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_LONGITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LONGITUDE])) { + $errs[self::FIELD_LONGITUDE] = []; + } + $errs[self::FIELD_LONGITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php index e6cdec7514..febbd6707a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRMedicationContent extends FHIRBackboneElement * Validation map for fields in type Medication.Content * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationContent Constructor @@ -227,11 +227,96 @@ public function setItem(FHIRResourceReference $item = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_CONTENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_CONTENT, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php index f177f931d5..075fa9fd4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRMedicationIngredient extends FHIRBackboneElement * Validation map for fields in type Medication.Ingredient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationIngredient Constructor @@ -230,11 +230,96 @@ public function setItem(FHIRResourceReference $item = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php index 9f7c2e8cea..4ee4a61561 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRMedicationPackage extends FHIRBackboneElement * Validation map for fields in type Medication.Package * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationPackage Constructor @@ -256,11 +256,98 @@ public function setContent(array $content = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContainer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTAINER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINER])) { + $v = $this->getContainer(); + foreach($validationRules[self::FIELD_CONTAINER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PACKAGE, self::FIELD_CONTAINER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINER])) { + $errs[self::FIELD_CONTAINER] = []; + } + $errs[self::FIELD_CONTAINER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PACKAGE, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php index 9ab068f40d..b7b756d7ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRMedicationProduct extends FHIRBackboneElement * Validation map for fields in type Medication.Product * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationProduct Constructor @@ -256,11 +256,98 @@ public function setIngredient(array $ingredient = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PRODUCT, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PRODUCT, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php index 2145b44ad9..666880d68d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -240,7 +240,7 @@ class FHIRMedicationAdministrationDosage extends FHIRBackboneElement * Validation map for fields in type MedicationAdministration.Dosage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministrationDosage Constructor @@ -759,11 +759,232 @@ public function setTimingPeriod(FHIRPeriod $timingPeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $v = $this->getMaxDosePerPeriod(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_MAX_DOSE_PER_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE])) { + $v = $this->getRate(); + foreach($validationRules[self::FIELD_RATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_RATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE])) { + $errs[self::FIELD_RATE] = []; + } + $errs[self::FIELD_RATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispense.php index 3483dd9773..a0c4e1c5ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -222,7 +222,7 @@ class FHIRMedicationDispenseDispense extends FHIRBackboneElement * Validation map for fields in type MedicationDispense.Dispense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispenseDispense Constructor @@ -798,11 +798,236 @@ public function setWhenPrepared($whenPrepared = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDosage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReceiver())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECEIVER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenHandedOver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_HANDED_OVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenPrepared())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_PREPARED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DISPENSE, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DISPENSE, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DISPENSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION])) { + $v = $this->getMedication(); + foreach($validationRules[self::FIELD_MEDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DISPENSE, self::FIELD_MEDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION])) { + $errs[self::FIELD_MEDICATION] = []; + } + $errs[self::FIELD_MEDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DISPENSE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DISPENSE, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DISPENSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DISPENSE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_HANDED_OVER])) { + $v = $this->getWhenHandedOver(); + foreach($validationRules[self::FIELD_WHEN_HANDED_OVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DISPENSE, self::FIELD_WHEN_HANDED_OVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_HANDED_OVER])) { + $errs[self::FIELD_WHEN_HANDED_OVER] = []; + } + $errs[self::FIELD_WHEN_HANDED_OVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_PREPARED])) { + $v = $this->getWhenPrepared(); + foreach($validationRules[self::FIELD_WHEN_PREPARED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DISPENSE, self::FIELD_WHEN_PREPARED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_PREPARED])) { + $errs[self::FIELD_WHEN_PREPARED] = []; + } + $errs[self::FIELD_WHEN_PREPARED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosage.php index 8b1387ee3d..de44145733 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -267,7 +267,7 @@ class FHIRMedicationDispenseDosage extends FHIRBackboneElement * Validation map for fields in type MedicationDispense.Dosage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispenseDosage Constructor @@ -868,11 +868,266 @@ public function setTimingSchedule(FHIRSchedule $timingSchedule = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditionalInstructions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_SCHEDULE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_INSTRUCTIONS])) { + $v = $this->getAdditionalInstructions(); + foreach($validationRules[self::FIELD_ADDITIONAL_INSTRUCTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_ADDITIONAL_INSTRUCTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_INSTRUCTIONS])) { + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS] = []; + } + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $v = $this->getMaxDosePerPeriod(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_MAX_DOSE_PER_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE])) { + $v = $this->getRate(); + foreach($validationRules[self::FIELD_RATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_RATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE])) { + $errs[self::FIELD_RATE] = []; + } + $errs[self::FIELD_RATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_SCHEDULE])) { + $v = $this->getTimingSchedule(); + foreach($validationRules[self::FIELD_TIMING_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE, self::FIELD_TIMING_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_SCHEDULE])) { + $errs[self::FIELD_TIMING_SCHEDULE] = []; + } + $errs[self::FIELD_TIMING_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php index c6b7bb5538..a273203e20 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRMedicationDispenseSubstitution extends FHIRBackboneElement * Validation map for fields in type MedicationDispense.Substitution * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispenseSubstitution Constructor @@ -358,11 +358,117 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResponsibleParty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESPONSIBLE_PARTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE_PARTY])) { + $v = $this->getResponsibleParty(); + foreach($validationRules[self::FIELD_RESPONSIBLE_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_RESPONSIBLE_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE_PARTY])) { + $errs[self::FIELD_RESPONSIBLE_PARTY] = []; + } + $errs[self::FIELD_RESPONSIBLE_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispense.php index 5eafc5e6fc..cbe1128d81 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -163,7 +163,7 @@ class FHIRMedicationPrescriptionDispense extends FHIRBackboneElement * Validation map for fields in type MedicationPrescription.Dispense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationPrescriptionDispense Constructor @@ -447,11 +447,147 @@ public function setValidityPeriod(FHIRPeriod $validityPeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpectedSupplyDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfRepeatsAllowed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidityPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDITY_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPECTED_SUPPLY_DURATION])) { + $v = $this->getExpectedSupplyDuration(); + foreach($validationRules[self::FIELD_EXPECTED_SUPPLY_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_EXPECTED_SUPPLY_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPECTED_SUPPLY_DURATION])) { + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION] = []; + } + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION])) { + $v = $this->getMedication(); + foreach($validationRules[self::FIELD_MEDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_MEDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION])) { + $errs[self::FIELD_MEDICATION] = []; + } + $errs[self::FIELD_MEDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $v = $this->getNumberOfRepeatsAllowed(); + foreach($validationRules[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_NUMBER_OF_REPEATS_ALLOWED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = []; + } + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDITY_PERIOD])) { + $v = $this->getValidityPeriod(); + foreach($validationRules[self::FIELD_VALIDITY_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_VALIDITY_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDITY_PERIOD])) { + $errs[self::FIELD_VALIDITY_PERIOD] = []; + } + $errs[self::FIELD_VALIDITY_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstruction.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstruction.php index 3543e91f3c..22a673a08c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstruction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstruction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -281,7 +281,7 @@ class FHIRMedicationPrescriptionDosageInstruction extends FHIRBackboneElement * Validation map for fields in type MedicationPrescription.DosageInstruction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationPrescriptionDosageInstruction Constructor @@ -943,11 +943,283 @@ public function setTimingSchedule(FHIRSchedule $timingSchedule = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditionalInstructions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_SCHEDULE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_INSTRUCTIONS])) { + $v = $this->getAdditionalInstructions(); + foreach($validationRules[self::FIELD_ADDITIONAL_INSTRUCTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_ADDITIONAL_INSTRUCTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_INSTRUCTIONS])) { + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS] = []; + } + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_QUANTITY])) { + $v = $this->getDoseQuantity(); + foreach($validationRules[self::FIELD_DOSE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_DOSE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_QUANTITY])) { + $errs[self::FIELD_DOSE_QUANTITY] = []; + } + $errs[self::FIELD_DOSE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $v = $this->getMaxDosePerPeriod(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_MAX_DOSE_PER_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE])) { + $v = $this->getRate(); + foreach($validationRules[self::FIELD_RATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_RATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE])) { + $errs[self::FIELD_RATE] = []; + } + $errs[self::FIELD_RATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_SCHEDULE])) { + $v = $this->getTimingSchedule(); + foreach($validationRules[self::FIELD_TIMING_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_DOSAGE_INSTRUCTION, self::FIELD_TIMING_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_SCHEDULE])) { + $errs[self::FIELD_TIMING_SCHEDULE] = []; + } + $errs[self::FIELD_TIMING_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitution.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitution.php index a70829682b..f332b006e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRMedicationPrescriptionSubstitution extends FHIRBackboneElement * Validation map for fields in type MedicationPrescription.Substitution * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationPrescriptionSubstitution Constructor @@ -232,11 +232,96 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_SUBSTITUTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_DOT_SUBSTITUTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php index faa4917796..85ba1a84a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -219,7 +219,7 @@ class FHIRMedicationStatementDosage extends FHIRBackboneElement * Validation map for fields in type MedicationStatement.Dosage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatementDosage Constructor @@ -665,11 +665,215 @@ public function setTiming(FHIRSchedule $timing = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $v = $this->getMaxDosePerPeriod(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_MAX_DOSE_PER_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE])) { + $v = $this->getRate(); + foreach($validationRules[self::FIELD_RATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_RATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE])) { + $errs[self::FIELD_RATE] = []; + } + $errs[self::FIELD_RATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING])) { + $v = $this->getTiming(); + foreach($validationRules[self::FIELD_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING])) { + $errs[self::FIELD_TIMING] = []; + } + $errs[self::FIELD_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php index 8abd7287eb..4c5aaadb50 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRMessageHeaderDestination extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Destination * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderDestination Constructor @@ -320,11 +320,113 @@ public function setTarget(FHIRResourceReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php index 9fbb142620..8cc74e6af9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRMessageHeaderResponse extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Response * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderResponse Constructor @@ -321,11 +321,113 @@ public function setIdentifier($identifier = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAILS] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAILS])) { + $v = $this->getDetails(); + foreach($validationRules[self::FIELD_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAILS])) { + $errs[self::FIELD_DETAILS] = []; + } + $errs[self::FIELD_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php index 06767127cb..2e100a99b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -148,7 +148,7 @@ class FHIRMessageHeaderSource extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderSource Constructor @@ -468,11 +468,147 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getSoftware())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOFTWARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOFTWARE])) { + $v = $this->getSoftware(); + foreach($validationRules[self::FIELD_SOFTWARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_SOFTWARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOFTWARE])) { + $errs[self::FIELD_SOFTWARE] = []; + } + $errs[self::FIELD_SOFTWARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php index 4935e7be45..49bb943814 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRObservationReferenceRange extends FHIRBackboneElement * Validation map for fields in type Observation.ReferenceRange * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationReferenceRange Constructor @@ -344,11 +344,130 @@ public function setMeaning(FHIRCodeableConcept $meaning = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getHigh())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIGH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLow())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOW] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeaning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEANING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGE])) { + $v = $this->getAge(); + foreach($validationRules[self::FIELD_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE])) { + $errs[self::FIELD_AGE] = []; + } + $errs[self::FIELD_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HIGH])) { + $v = $this->getHigh(); + foreach($validationRules[self::FIELD_HIGH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_HIGH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIGH])) { + $errs[self::FIELD_HIGH] = []; + } + $errs[self::FIELD_HIGH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOW])) { + $v = $this->getLow(); + foreach($validationRules[self::FIELD_LOW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_LOW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOW])) { + $errs[self::FIELD_LOW] = []; + } + $errs[self::FIELD_LOW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEANING])) { + $v = $this->getMeaning(); + foreach($validationRules[self::FIELD_MEANING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_MEANING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEANING])) { + $errs[self::FIELD_MEANING] = []; + } + $errs[self::FIELD_MEANING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php index e1e4689fd6..f0db166755 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRObservationRelated extends FHIRBackboneElement * Validation map for fields in type Observation.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationRelated Constructor @@ -238,11 +238,96 @@ public function setType(FHIRObservationRelationshipType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_RELATED, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_RELATED, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php index 4182b7a88f..34ab93b2cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIROperationOutcomeIssue extends FHIRBackboneElement * Validation map for fields in type OperationOutcome.Issue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationOutcomeIssue Constructor @@ -426,11 +426,132 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAILS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAILS])) { + $v = $this->getDetails(); + foreach($validationRules[self::FIELD_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAILS])) { + $errs[self::FIELD_DETAILS] = []; + } + $errs[self::FIELD_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php index 8ea9337c0f..0e9bb71153 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIROrderWhen extends FHIRBackboneElement * Validation map for fields in type Order.When * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrderWhen Constructor @@ -229,11 +229,96 @@ public function setSchedule(FHIRSchedule $schedule = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_DOT_WHEN, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_DOT_WHEN, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php index e43839d102..efa68a90d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIROrganizationContact extends FHIRBackboneElement * Validation map for fields in type Organization.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrganizationContact Constructor @@ -429,11 +429,149 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php index 4525559352..b0f5b36836 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRPatientAnimal extends FHIRBackboneElement * Validation map for fields in type Patient.Animal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientAnimal Constructor @@ -278,11 +278,113 @@ public function setSpecies(FHIRCodeableConcept $species = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBreed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BREED] = $fieldErrs; + } + } + if (null !== ($v = $this->getGenderStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BREED])) { + $v = $this->getBreed(); + foreach($validationRules[self::FIELD_BREED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_ANIMAL, self::FIELD_BREED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BREED])) { + $errs[self::FIELD_BREED] = []; + } + $errs[self::FIELD_BREED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER_STATUS])) { + $v = $this->getGenderStatus(); + foreach($validationRules[self::FIELD_GENDER_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_ANIMAL, self::FIELD_GENDER_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER_STATUS])) { + $errs[self::FIELD_GENDER_STATUS] = []; + } + $errs[self::FIELD_GENDER_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIES])) { + $v = $this->getSpecies(); + foreach($validationRules[self::FIELD_SPECIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_ANIMAL, self::FIELD_SPECIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIES])) { + $errs[self::FIELD_SPECIES] = []; + } + $errs[self::FIELD_SPECIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php index 84b9caa987..064b193bb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -163,7 +163,7 @@ class FHIRPatientContact extends FHIRBackboneElement * Validation map for fields in type Patient.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientContact Constructor @@ -514,11 +514,168 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelationship())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATIONSHIP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php index 83408df848..303e117c96 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRPatientLink extends FHIRBackboneElement * Validation map for fields in type Patient.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientLink Constructor @@ -235,11 +235,96 @@ public function setType(FHIRLinkType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOther())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OTHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OTHER])) { + $v = $this->getOther(); + foreach($validationRules[self::FIELD_OTHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_LINK, self::FIELD_OTHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OTHER])) { + $errs[self::FIELD_OTHER] = []; + } + $errs[self::FIELD_OTHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_LINK, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php index 428f06a2e3..4358274824 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRPractitionerQualification extends FHIRBackboneElement * Validation map for fields in type Practitioner.Qualification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerQualification Constructor @@ -274,11 +274,113 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssuer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUER])) { + $v = $this->getIssuer(); + foreach($validationRules[self::FIELD_ISSUER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_ISSUER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUER])) { + $errs[self::FIELD_ISSUER] = []; + } + $errs[self::FIELD_ISSUER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php index 6ae19e897e..8d061c9363 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRProcedurePerformer extends FHIRBackboneElement * Validation map for fields in type Procedure.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedurePerformer Constructor @@ -224,11 +224,96 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPerson())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERSON] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERSON])) { + $v = $this->getPerson(); + foreach($validationRules[self::FIELD_PERSON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_PERFORMER, self::FIELD_PERSON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERSON])) { + $errs[self::FIELD_PERSON] = []; + } + $errs[self::FIELD_PERSON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_PERFORMER, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItem.php index d6e3ad94b6..db1f244841 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRProcedureRelatedItem extends FHIRBackboneElement * Validation map for fields in type Procedure.RelatedItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureRelatedItem Constructor @@ -235,11 +235,96 @@ public function setType(FHIRProcedureRelationshipType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_RELATED_ITEM, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_RELATED_ITEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBinding.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBinding.php index 8da20c7a78..cdb69c9e7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -164,7 +164,7 @@ class FHIRProfileBinding extends FHIRBackboneElement * Validation map for fields in type Profile.Binding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileBinding Constructor @@ -541,11 +541,164 @@ public function setReferenceUri($referenceUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getConformance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFORMANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsExtensible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_EXTENSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONFORMANCE])) { + $v = $this->getConformance(); + foreach($validationRules[self::FIELD_CONFORMANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_BINDING, self::FIELD_CONFORMANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONFORMANCE])) { + $errs[self::FIELD_CONFORMANCE] = []; + } + $errs[self::FIELD_CONFORMANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_BINDING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_EXTENSIBLE])) { + $v = $this->getIsExtensible(); + foreach($validationRules[self::FIELD_IS_EXTENSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_BINDING, self::FIELD_IS_EXTENSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_EXTENSIBLE])) { + $errs[self::FIELD_IS_EXTENSIBLE] = []; + } + $errs[self::FIELD_IS_EXTENSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_BINDING, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_RESOURCE])) { + $v = $this->getReferenceResource(); + foreach($validationRules[self::FIELD_REFERENCE_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_BINDING, self::FIELD_REFERENCE_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_RESOURCE])) { + $errs[self::FIELD_REFERENCE_RESOURCE] = []; + } + $errs[self::FIELD_REFERENCE_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_URI])) { + $v = $this->getReferenceUri(); + foreach($validationRules[self::FIELD_REFERENCE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_BINDING, self::FIELD_REFERENCE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_URI])) { + $errs[self::FIELD_REFERENCE_URI] = []; + } + $errs[self::FIELD_REFERENCE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraint.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraint.php index 7e0c98b3d2..b1766e75b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraint.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRProfileConstraint extends FHIRBackboneElement * Validation map for fields in type Profile.Constraint * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileConstraint Constructor @@ -496,11 +496,147 @@ public function setXpath($xpath = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHuman())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HUMAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getKey())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HUMAN])) { + $v = $this->getHuman(); + foreach($validationRules[self::FIELD_HUMAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_CONSTRAINT, self::FIELD_HUMAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HUMAN])) { + $errs[self::FIELD_HUMAN] = []; + } + $errs[self::FIELD_HUMAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KEY])) { + $v = $this->getKey(); + foreach($validationRules[self::FIELD_KEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_CONSTRAINT, self::FIELD_KEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KEY])) { + $errs[self::FIELD_KEY] = []; + } + $errs[self::FIELD_KEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_CONSTRAINT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_CONSTRAINT, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH])) { + $v = $this->getXpath(); + foreach($validationRules[self::FIELD_XPATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_CONSTRAINT, self::FIELD_XPATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH])) { + $errs[self::FIELD_XPATH] = []; + } + $errs[self::FIELD_XPATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinition.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinition.php index 2f8e502092..8ee0ebb82f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -1007,7 +1007,7 @@ class FHIRProfileDefinition extends FHIRBackboneElement * Validation map for fields in type Profile.Definition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileDefinition Constructor @@ -4789,11 +4789,1262 @@ public function setValueUuid($valueUuid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBinding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING] = $fieldErrs; + } + } + if (null !== ($v = $this->getComments())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENTS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getConstraint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONSTRAINT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExampleAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleContact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_CONTACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getExamplePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_SCHEDULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_UUID] = $fieldErrs; + } + } + if (null !== ($v = $this->getFormal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsModifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_MODIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMapping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_LENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMustSupport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MUST_SUPPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getNameReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getShort())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SHORT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSynonym())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SYNONYM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SCHEDULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UUID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BINDING])) { + $v = $this->getBinding(); + foreach($validationRules[self::FIELD_BINDING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_BINDING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING])) { + $errs[self::FIELD_BINDING] = []; + } + $errs[self::FIELD_BINDING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENTS])) { + $v = $this->getComments(); + foreach($validationRules[self::FIELD_COMMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_COMMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENTS])) { + $errs[self::FIELD_COMMENTS] = []; + } + $errs[self::FIELD_COMMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONSTRAINT])) { + $v = $this->getConstraint(); + foreach($validationRules[self::FIELD_CONSTRAINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_CONSTRAINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONSTRAINT])) { + $errs[self::FIELD_CONSTRAINT] = []; + } + $errs[self::FIELD_CONSTRAINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_ADDRESS])) { + $v = $this->getExampleAddress(); + foreach($validationRules[self::FIELD_EXAMPLE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_ADDRESS])) { + $errs[self::FIELD_EXAMPLE_ADDRESS] = []; + } + $errs[self::FIELD_EXAMPLE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_ATTACHMENT])) { + $v = $this->getExampleAttachment(); + foreach($validationRules[self::FIELD_EXAMPLE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_ATTACHMENT])) { + $errs[self::FIELD_EXAMPLE_ATTACHMENT] = []; + } + $errs[self::FIELD_EXAMPLE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_BASE_64BINARY])) { + $v = $this->getExampleBase64Binary(); + foreach($validationRules[self::FIELD_EXAMPLE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_BASE_64BINARY])) { + $errs[self::FIELD_EXAMPLE_BASE_64BINARY] = []; + } + $errs[self::FIELD_EXAMPLE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_BOOLEAN])) { + $v = $this->getExampleBoolean(); + foreach($validationRules[self::FIELD_EXAMPLE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_BOOLEAN])) { + $errs[self::FIELD_EXAMPLE_BOOLEAN] = []; + } + $errs[self::FIELD_EXAMPLE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_CODE])) { + $v = $this->getExampleCode(); + foreach($validationRules[self::FIELD_EXAMPLE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_CODE])) { + $errs[self::FIELD_EXAMPLE_CODE] = []; + } + $errs[self::FIELD_EXAMPLE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_CODEABLE_CONCEPT])) { + $v = $this->getExampleCodeableConcept(); + foreach($validationRules[self::FIELD_EXAMPLE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_EXAMPLE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_EXAMPLE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_CODING])) { + $v = $this->getExampleCoding(); + foreach($validationRules[self::FIELD_EXAMPLE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_CODING])) { + $errs[self::FIELD_EXAMPLE_CODING] = []; + } + $errs[self::FIELD_EXAMPLE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_CONTACT])) { + $v = $this->getExampleContact(); + foreach($validationRules[self::FIELD_EXAMPLE_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_CONTACT])) { + $errs[self::FIELD_EXAMPLE_CONTACT] = []; + } + $errs[self::FIELD_EXAMPLE_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_DATE])) { + $v = $this->getExampleDate(); + foreach($validationRules[self::FIELD_EXAMPLE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_DATE])) { + $errs[self::FIELD_EXAMPLE_DATE] = []; + } + $errs[self::FIELD_EXAMPLE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_DATE_TIME])) { + $v = $this->getExampleDateTime(); + foreach($validationRules[self::FIELD_EXAMPLE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_DATE_TIME])) { + $errs[self::FIELD_EXAMPLE_DATE_TIME] = []; + } + $errs[self::FIELD_EXAMPLE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_DECIMAL])) { + $v = $this->getExampleDecimal(); + foreach($validationRules[self::FIELD_EXAMPLE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_DECIMAL])) { + $errs[self::FIELD_EXAMPLE_DECIMAL] = []; + } + $errs[self::FIELD_EXAMPLE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_HUMAN_NAME])) { + $v = $this->getExampleHumanName(); + foreach($validationRules[self::FIELD_EXAMPLE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_HUMAN_NAME])) { + $errs[self::FIELD_EXAMPLE_HUMAN_NAME] = []; + } + $errs[self::FIELD_EXAMPLE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_ID])) { + $v = $this->getExampleId(); + foreach($validationRules[self::FIELD_EXAMPLE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_ID])) { + $errs[self::FIELD_EXAMPLE_ID] = []; + } + $errs[self::FIELD_EXAMPLE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_IDENTIFIER])) { + $v = $this->getExampleIdentifier(); + foreach($validationRules[self::FIELD_EXAMPLE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_IDENTIFIER])) { + $errs[self::FIELD_EXAMPLE_IDENTIFIER] = []; + } + $errs[self::FIELD_EXAMPLE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_INSTANT])) { + $v = $this->getExampleInstant(); + foreach($validationRules[self::FIELD_EXAMPLE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_INSTANT])) { + $errs[self::FIELD_EXAMPLE_INSTANT] = []; + } + $errs[self::FIELD_EXAMPLE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_INTEGER])) { + $v = $this->getExampleInteger(); + foreach($validationRules[self::FIELD_EXAMPLE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_INTEGER])) { + $errs[self::FIELD_EXAMPLE_INTEGER] = []; + } + $errs[self::FIELD_EXAMPLE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_OID])) { + $v = $this->getExampleOid(); + foreach($validationRules[self::FIELD_EXAMPLE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_OID])) { + $errs[self::FIELD_EXAMPLE_OID] = []; + } + $errs[self::FIELD_EXAMPLE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_PERIOD])) { + $v = $this->getExamplePeriod(); + foreach($validationRules[self::FIELD_EXAMPLE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_PERIOD])) { + $errs[self::FIELD_EXAMPLE_PERIOD] = []; + } + $errs[self::FIELD_EXAMPLE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_QUANTITY])) { + $v = $this->getExampleQuantity(); + foreach($validationRules[self::FIELD_EXAMPLE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_QUANTITY])) { + $errs[self::FIELD_EXAMPLE_QUANTITY] = []; + } + $errs[self::FIELD_EXAMPLE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_RANGE])) { + $v = $this->getExampleRange(); + foreach($validationRules[self::FIELD_EXAMPLE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_RANGE])) { + $errs[self::FIELD_EXAMPLE_RANGE] = []; + } + $errs[self::FIELD_EXAMPLE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_RATIO])) { + $v = $this->getExampleRatio(); + foreach($validationRules[self::FIELD_EXAMPLE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_RATIO])) { + $errs[self::FIELD_EXAMPLE_RATIO] = []; + } + $errs[self::FIELD_EXAMPLE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_RESOURCE])) { + $v = $this->getExampleResource(); + foreach($validationRules[self::FIELD_EXAMPLE_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_RESOURCE])) { + $errs[self::FIELD_EXAMPLE_RESOURCE] = []; + } + $errs[self::FIELD_EXAMPLE_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_SAMPLED_DATA])) { + $v = $this->getExampleSampledData(); + foreach($validationRules[self::FIELD_EXAMPLE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_SAMPLED_DATA])) { + $errs[self::FIELD_EXAMPLE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_EXAMPLE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_SCHEDULE])) { + $v = $this->getExampleSchedule(); + foreach($validationRules[self::FIELD_EXAMPLE_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_SCHEDULE])) { + $errs[self::FIELD_EXAMPLE_SCHEDULE] = []; + } + $errs[self::FIELD_EXAMPLE_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_STRING])) { + $v = $this->getExampleString(); + foreach($validationRules[self::FIELD_EXAMPLE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_STRING])) { + $errs[self::FIELD_EXAMPLE_STRING] = []; + } + $errs[self::FIELD_EXAMPLE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_URI])) { + $v = $this->getExampleUri(); + foreach($validationRules[self::FIELD_EXAMPLE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_URI])) { + $errs[self::FIELD_EXAMPLE_URI] = []; + } + $errs[self::FIELD_EXAMPLE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_UUID])) { + $v = $this->getExampleUuid(); + foreach($validationRules[self::FIELD_EXAMPLE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_EXAMPLE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_UUID])) { + $errs[self::FIELD_EXAMPLE_UUID] = []; + } + $errs[self::FIELD_EXAMPLE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORMAL])) { + $v = $this->getFormal(); + foreach($validationRules[self::FIELD_FORMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_FORMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAL])) { + $errs[self::FIELD_FORMAL] = []; + } + $errs[self::FIELD_FORMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_MODIFIER])) { + $v = $this->getIsModifier(); + foreach($validationRules[self::FIELD_IS_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_IS_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_MODIFIER])) { + $errs[self::FIELD_IS_MODIFIER] = []; + } + $errs[self::FIELD_IS_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAPPING])) { + $v = $this->getMapping(); + foreach($validationRules[self::FIELD_MAPPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_MAPPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAPPING])) { + $errs[self::FIELD_MAPPING] = []; + } + $errs[self::FIELD_MAPPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_LENGTH])) { + $v = $this->getMaxLength(); + foreach($validationRules[self::FIELD_MAX_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_MAX_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_LENGTH])) { + $errs[self::FIELD_MAX_LENGTH] = []; + } + $errs[self::FIELD_MAX_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MUST_SUPPORT])) { + $v = $this->getMustSupport(); + foreach($validationRules[self::FIELD_MUST_SUPPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_MUST_SUPPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MUST_SUPPORT])) { + $errs[self::FIELD_MUST_SUPPORT] = []; + } + $errs[self::FIELD_MUST_SUPPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME_REFERENCE])) { + $v = $this->getNameReference(); + foreach($validationRules[self::FIELD_NAME_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_NAME_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME_REFERENCE])) { + $errs[self::FIELD_NAME_REFERENCE] = []; + } + $errs[self::FIELD_NAME_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHORT])) { + $v = $this->getShort(); + foreach($validationRules[self::FIELD_SHORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_SHORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHORT])) { + $errs[self::FIELD_SHORT] = []; + } + $errs[self::FIELD_SHORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYNONYM])) { + $v = $this->getSynonym(); + foreach($validationRules[self::FIELD_SYNONYM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_SYNONYM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYNONYM])) { + $errs[self::FIELD_SYNONYM] = []; + } + $errs[self::FIELD_SYNONYM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT])) { + $v = $this->getValueContact(); + foreach($validationRules[self::FIELD_VALUE_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT])) { + $errs[self::FIELD_VALUE_CONTACT] = []; + } + $errs[self::FIELD_VALUE_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RESOURCE])) { + $v = $this->getValueResource(); + foreach($validationRules[self::FIELD_VALUE_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RESOURCE])) { + $errs[self::FIELD_VALUE_RESOURCE] = []; + } + $errs[self::FIELD_VALUE_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SCHEDULE])) { + $v = $this->getValueSchedule(); + foreach($validationRules[self::FIELD_VALUE_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SCHEDULE])) { + $errs[self::FIELD_VALUE_SCHEDULE] = []; + } + $errs[self::FIELD_VALUE_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UUID])) { + $v = $this->getValueUuid(); + foreach($validationRules[self::FIELD_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_DEFINITION, self::FIELD_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UUID])) { + $errs[self::FIELD_VALUE_UUID] = []; + } + $errs[self::FIELD_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElement.php index ec6d94ad62..b07ec907ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -153,7 +153,7 @@ class FHIRProfileElement extends FHIRBackboneElement * Validation map for fields in type Profile.Element * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileElement Constructor @@ -498,11 +498,149 @@ public function setSlicing(FHIRProfileSlicing $slicing = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRepresentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPRESENTATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSlicing())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLICING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_ELEMENT, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_ELEMENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_ELEMENT, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPRESENTATION])) { + $v = $this->getRepresentation(); + foreach($validationRules[self::FIELD_REPRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_ELEMENT, self::FIELD_REPRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPRESENTATION])) { + $errs[self::FIELD_REPRESENTATION] = []; + } + $errs[self::FIELD_REPRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLICING])) { + $v = $this->getSlicing(); + foreach($validationRules[self::FIELD_SLICING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_ELEMENT, self::FIELD_SLICING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLICING])) { + $errs[self::FIELD_SLICING] = []; + } + $errs[self::FIELD_SLICING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefn.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefn.php index 79463da817..2405c3d459 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefn.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -148,7 +148,7 @@ class FHIRProfileExtensionDefn extends FHIRBackboneElement * Validation map for fields in type Profile.ExtensionDefn * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CONTEXT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -507,11 +507,149 @@ public function setDisplay($display = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContextType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_EXTENSION_DEFN, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_EXTENSION_DEFN, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT_TYPE])) { + $v = $this->getContextType(); + foreach($validationRules[self::FIELD_CONTEXT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_EXTENSION_DEFN, self::FIELD_CONTEXT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT_TYPE])) { + $errs[self::FIELD_CONTEXT_TYPE] = []; + } + $errs[self::FIELD_CONTEXT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_EXTENSION_DEFN, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_EXTENSION_DEFN, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping.php index 8d2980c6f2..826db5cba1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRProfileMapping extends FHIRBackboneElement * Validation map for fields in type Profile.Mapping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileMapping Constructor @@ -424,11 +424,130 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComments())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENTS])) { + $v = $this->getComments(); + foreach($validationRules[self::FIELD_COMMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_MAPPING, self::FIELD_COMMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENTS])) { + $errs[self::FIELD_COMMENTS] = []; + } + $errs[self::FIELD_COMMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTITY])) { + $v = $this->getIdentity(); + foreach($validationRules[self::FIELD_IDENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_MAPPING, self::FIELD_IDENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY])) { + $errs[self::FIELD_IDENTITY] = []; + } + $errs[self::FIELD_IDENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_MAPPING, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_MAPPING, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1.php index 47bf42c697..018c12ff50 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRProfileMapping1 extends FHIRBackboneElement * Validation map for fields in type Profile.Mapping1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileMapping1 Constructor @@ -275,11 +275,96 @@ public function setMap($map = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTITY])) { + $v = $this->getIdentity(); + foreach($validationRules[self::FIELD_IDENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_MAPPING_1, self::FIELD_IDENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY])) { + $errs[self::FIELD_IDENTITY] = []; + } + $errs[self::FIELD_IDENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAP])) { + $v = $this->getMap(); + foreach($validationRules[self::FIELD_MAP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_MAPPING_1, self::FIELD_MAP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAP])) { + $errs[self::FIELD_MAP] = []; + } + $errs[self::FIELD_MAP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQuery.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQuery.php index e4ffe96f22..fc78bd456b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQuery.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQuery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRProfileQuery extends FHIRBackboneElement * Validation map for fields in type Profile.Query * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileQuery Constructor @@ -363,11 +363,115 @@ public function setParameter(array $parameter = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_QUERY, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_QUERY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_QUERY, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParam.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParam.php index 947988d5b1..52c4b55977 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParam.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -148,7 +148,7 @@ class FHIRProfileSearchParam extends FHIRBackboneElement * Validation map for fields in type Profile.SearchParam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileSearchParam Constructor @@ -526,11 +526,149 @@ public function setXpath($xpath = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_SEARCH_PARAM, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_SEARCH_PARAM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_SEARCH_PARAM, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_SEARCH_PARAM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH])) { + $v = $this->getXpath(); + foreach($validationRules[self::FIELD_XPATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_SEARCH_PARAM, self::FIELD_XPATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH])) { + $errs[self::FIELD_XPATH] = []; + } + $errs[self::FIELD_XPATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicing.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicing.php index 49ddb48abf..5ffe5ee8c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicing.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRProfileSlicing extends FHIRBackboneElement * Validation map for fields in type Profile.Slicing * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileSlicing Constructor @@ -354,11 +354,113 @@ public function setRules(FHIRSlicingRules $rules = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiscriminator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISCRIMINATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrdered())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED] = $fieldErrs; + } + } + if (null !== ($v = $this->getRules())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISCRIMINATOR])) { + $v = $this->getDiscriminator(); + foreach($validationRules[self::FIELD_DISCRIMINATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_SLICING, self::FIELD_DISCRIMINATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCRIMINATOR])) { + $errs[self::FIELD_DISCRIMINATOR] = []; + } + $errs[self::FIELD_DISCRIMINATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED])) { + $v = $this->getOrdered(); + foreach($validationRules[self::FIELD_ORDERED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_SLICING, self::FIELD_ORDERED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED])) { + $errs[self::FIELD_ORDERED] = []; + } + $errs[self::FIELD_ORDERED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULES])) { + $v = $this->getRules(); + foreach($validationRules[self::FIELD_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_SLICING, self::FIELD_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULES])) { + $errs[self::FIELD_RULES] = []; + } + $errs[self::FIELD_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructure.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructure.php index 97540d1f35..df45f940c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructure.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -161,7 +161,7 @@ class FHIRProfileStructure extends FHIRBackboneElement * Validation map for fields in type Profile.Structure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileStructure Constructor @@ -596,11 +596,168 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublish())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISH] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSearchParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_PARAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_STRUCTURE, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_STRUCTURE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISH])) { + $v = $this->getPublish(); + foreach($validationRules[self::FIELD_PUBLISH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_STRUCTURE, self::FIELD_PUBLISH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISH])) { + $errs[self::FIELD_PUBLISH] = []; + } + $errs[self::FIELD_PUBLISH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_STRUCTURE, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_PARAM])) { + $v = $this->getSearchParam(); + foreach($validationRules[self::FIELD_SEARCH_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_STRUCTURE, self::FIELD_SEARCH_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_PARAM])) { + $errs[self::FIELD_SEARCH_PARAM] = []; + } + $errs[self::FIELD_SEARCH_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_STRUCTURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileType.php index 7e4dc0874b..936c15f9e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRProfileType extends FHIRBackboneElement * Validation map for fields in type Profile.Type * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfileType Constructor @@ -390,11 +390,115 @@ public function setProfile($profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAggregation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGGREGATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGGREGATION])) { + $v = $this->getAggregation(); + foreach($validationRules[self::FIELD_AGGREGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_TYPE, self::FIELD_AGGREGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGGREGATION])) { + $errs[self::FIELD_AGGREGATION] = []; + } + $errs[self::FIELD_AGGREGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_TYPE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE_DOT_TYPE, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php index 2854a564ff..8bb102f804 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRProvenanceAgent extends FHIRBackboneElement * Validation map for fields in type Provenance.Agent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceAgent Constructor @@ -370,11 +370,130 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php index dc2f1d1c7f..b1948df990 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -154,7 +154,7 @@ class FHIRProvenanceEntity extends FHIRBackboneElement * Validation map for fields in type Provenance.Entity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceEntity Constructor @@ -452,11 +452,147 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponse.php index 1d1c786191..e67e8da48f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -192,7 +192,7 @@ class FHIRQueryResponse extends FHIRBackboneElement * Validation map for fields in type Query.Response * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQueryResponse Constructor @@ -846,11 +846,227 @@ public function setTotal($total = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getFirst())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FIRST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLast())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LAST, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPrevious())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PREVIOUS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FIRST])) { + $v = $this->getFirst(); + foreach($validationRules[self::FIELD_FIRST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY_DOT_RESPONSE, self::FIELD_FIRST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIRST])) { + $errs[self::FIELD_FIRST] = []; + } + $errs[self::FIELD_FIRST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY_DOT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST])) { + $v = $this->getLast(); + foreach($validationRules[self::FIELD_LAST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY_DOT_RESPONSE, self::FIELD_LAST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST])) { + $errs[self::FIELD_LAST] = []; + } + $errs[self::FIELD_LAST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NEXT])) { + $v = $this->getNext(); + foreach($validationRules[self::FIELD_NEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY_DOT_RESPONSE, self::FIELD_NEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NEXT])) { + $errs[self::FIELD_NEXT] = []; + } + $errs[self::FIELD_NEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY_DOT_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY_DOT_RESPONSE, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREVIOUS])) { + $v = $this->getPrevious(); + foreach($validationRules[self::FIELD_PREVIOUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY_DOT_RESPONSE, self::FIELD_PREVIOUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREVIOUS])) { + $errs[self::FIELD_PREVIOUS] = []; + } + $errs[self::FIELD_PREVIOUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY_DOT_RESPONSE, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY_DOT_RESPONSE, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php index 342a892f2d..9c4b65b5f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -164,7 +164,7 @@ class FHIRQuestionnaireGroup extends FHIRBackboneElement * Validation map for fields in type Questionnaire.Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireGroup Constructor @@ -563,11 +563,168 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getHeader())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEADER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getQuestion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUESTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER])) { + $v = $this->getHeader(); + foreach($validationRules[self::FIELD_HEADER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_HEADER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER])) { + $errs[self::FIELD_HEADER] = []; + } + $errs[self::FIELD_HEADER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUESTION])) { + $v = $this->getQuestion(); + foreach($validationRules[self::FIELD_QUESTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_QUESTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUESTION])) { + $errs[self::FIELD_QUESTION] = []; + } + $errs[self::FIELD_QUESTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php index 991597a68a..5459519004 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -620,7 +620,7 @@ class FHIRQuestionnaireQuestion extends FHIRBackboneElement * Validation map for fields in type Questionnaire.Question * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireQuestion Constructor @@ -2763,11 +2763,746 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAnswerBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getChoice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHOICE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDataAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataContact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_CONTACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_SCHEDULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_UUID] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOptions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPTIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getRemarks())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REMARKS] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ANSWER_BOOLEAN])) { + $v = $this->getAnswerBoolean(); + foreach($validationRules[self::FIELD_ANSWER_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_ANSWER_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_BOOLEAN])) { + $errs[self::FIELD_ANSWER_BOOLEAN] = []; + } + $errs[self::FIELD_ANSWER_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_DATE])) { + $v = $this->getAnswerDate(); + foreach($validationRules[self::FIELD_ANSWER_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_ANSWER_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_DATE])) { + $errs[self::FIELD_ANSWER_DATE] = []; + } + $errs[self::FIELD_ANSWER_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_DATE_TIME])) { + $v = $this->getAnswerDateTime(); + foreach($validationRules[self::FIELD_ANSWER_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_ANSWER_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_DATE_TIME])) { + $errs[self::FIELD_ANSWER_DATE_TIME] = []; + } + $errs[self::FIELD_ANSWER_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_DECIMAL])) { + $v = $this->getAnswerDecimal(); + foreach($validationRules[self::FIELD_ANSWER_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_ANSWER_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_DECIMAL])) { + $errs[self::FIELD_ANSWER_DECIMAL] = []; + } + $errs[self::FIELD_ANSWER_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_INSTANT])) { + $v = $this->getAnswerInstant(); + foreach($validationRules[self::FIELD_ANSWER_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_ANSWER_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_INSTANT])) { + $errs[self::FIELD_ANSWER_INSTANT] = []; + } + $errs[self::FIELD_ANSWER_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_INTEGER])) { + $v = $this->getAnswerInteger(); + foreach($validationRules[self::FIELD_ANSWER_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_ANSWER_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_INTEGER])) { + $errs[self::FIELD_ANSWER_INTEGER] = []; + } + $errs[self::FIELD_ANSWER_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_STRING])) { + $v = $this->getAnswerString(); + foreach($validationRules[self::FIELD_ANSWER_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_ANSWER_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_STRING])) { + $errs[self::FIELD_ANSWER_STRING] = []; + } + $errs[self::FIELD_ANSWER_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHOICE])) { + $v = $this->getChoice(); + foreach($validationRules[self::FIELD_CHOICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_CHOICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHOICE])) { + $errs[self::FIELD_CHOICE] = []; + } + $errs[self::FIELD_CHOICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_ADDRESS])) { + $v = $this->getDataAddress(); + foreach($validationRules[self::FIELD_DATA_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_ADDRESS])) { + $errs[self::FIELD_DATA_ADDRESS] = []; + } + $errs[self::FIELD_DATA_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_ATTACHMENT])) { + $v = $this->getDataAttachment(); + foreach($validationRules[self::FIELD_DATA_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_ATTACHMENT])) { + $errs[self::FIELD_DATA_ATTACHMENT] = []; + } + $errs[self::FIELD_DATA_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_BASE_64BINARY])) { + $v = $this->getDataBase64Binary(); + foreach($validationRules[self::FIELD_DATA_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_BASE_64BINARY])) { + $errs[self::FIELD_DATA_BASE_64BINARY] = []; + } + $errs[self::FIELD_DATA_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_BOOLEAN])) { + $v = $this->getDataBoolean(); + foreach($validationRules[self::FIELD_DATA_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_BOOLEAN])) { + $errs[self::FIELD_DATA_BOOLEAN] = []; + } + $errs[self::FIELD_DATA_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_CODE])) { + $v = $this->getDataCode(); + foreach($validationRules[self::FIELD_DATA_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_CODE])) { + $errs[self::FIELD_DATA_CODE] = []; + } + $errs[self::FIELD_DATA_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_CODEABLE_CONCEPT])) { + $v = $this->getDataCodeableConcept(); + foreach($validationRules[self::FIELD_DATA_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DATA_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DATA_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_CODING])) { + $v = $this->getDataCoding(); + foreach($validationRules[self::FIELD_DATA_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_CODING])) { + $errs[self::FIELD_DATA_CODING] = []; + } + $errs[self::FIELD_DATA_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_CONTACT])) { + $v = $this->getDataContact(); + foreach($validationRules[self::FIELD_DATA_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_CONTACT])) { + $errs[self::FIELD_DATA_CONTACT] = []; + } + $errs[self::FIELD_DATA_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_DATE])) { + $v = $this->getDataDate(); + foreach($validationRules[self::FIELD_DATA_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_DATE])) { + $errs[self::FIELD_DATA_DATE] = []; + } + $errs[self::FIELD_DATA_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_DATE_TIME])) { + $v = $this->getDataDateTime(); + foreach($validationRules[self::FIELD_DATA_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_DATE_TIME])) { + $errs[self::FIELD_DATA_DATE_TIME] = []; + } + $errs[self::FIELD_DATA_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_DECIMAL])) { + $v = $this->getDataDecimal(); + foreach($validationRules[self::FIELD_DATA_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_DECIMAL])) { + $errs[self::FIELD_DATA_DECIMAL] = []; + } + $errs[self::FIELD_DATA_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_HUMAN_NAME])) { + $v = $this->getDataHumanName(); + foreach($validationRules[self::FIELD_DATA_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_HUMAN_NAME])) { + $errs[self::FIELD_DATA_HUMAN_NAME] = []; + } + $errs[self::FIELD_DATA_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_ID])) { + $v = $this->getDataId(); + foreach($validationRules[self::FIELD_DATA_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_ID])) { + $errs[self::FIELD_DATA_ID] = []; + } + $errs[self::FIELD_DATA_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_IDENTIFIER])) { + $v = $this->getDataIdentifier(); + foreach($validationRules[self::FIELD_DATA_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_IDENTIFIER])) { + $errs[self::FIELD_DATA_IDENTIFIER] = []; + } + $errs[self::FIELD_DATA_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_INSTANT])) { + $v = $this->getDataInstant(); + foreach($validationRules[self::FIELD_DATA_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_INSTANT])) { + $errs[self::FIELD_DATA_INSTANT] = []; + } + $errs[self::FIELD_DATA_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_INTEGER])) { + $v = $this->getDataInteger(); + foreach($validationRules[self::FIELD_DATA_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_INTEGER])) { + $errs[self::FIELD_DATA_INTEGER] = []; + } + $errs[self::FIELD_DATA_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_OID])) { + $v = $this->getDataOid(); + foreach($validationRules[self::FIELD_DATA_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_OID])) { + $errs[self::FIELD_DATA_OID] = []; + } + $errs[self::FIELD_DATA_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_PERIOD])) { + $v = $this->getDataPeriod(); + foreach($validationRules[self::FIELD_DATA_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_PERIOD])) { + $errs[self::FIELD_DATA_PERIOD] = []; + } + $errs[self::FIELD_DATA_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_QUANTITY])) { + $v = $this->getDataQuantity(); + foreach($validationRules[self::FIELD_DATA_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_QUANTITY])) { + $errs[self::FIELD_DATA_QUANTITY] = []; + } + $errs[self::FIELD_DATA_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_RANGE])) { + $v = $this->getDataRange(); + foreach($validationRules[self::FIELD_DATA_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_RANGE])) { + $errs[self::FIELD_DATA_RANGE] = []; + } + $errs[self::FIELD_DATA_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_RATIO])) { + $v = $this->getDataRatio(); + foreach($validationRules[self::FIELD_DATA_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_RATIO])) { + $errs[self::FIELD_DATA_RATIO] = []; + } + $errs[self::FIELD_DATA_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_RESOURCE])) { + $v = $this->getDataResource(); + foreach($validationRules[self::FIELD_DATA_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_RESOURCE])) { + $errs[self::FIELD_DATA_RESOURCE] = []; + } + $errs[self::FIELD_DATA_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_SAMPLED_DATA])) { + $v = $this->getDataSampledData(); + foreach($validationRules[self::FIELD_DATA_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_SAMPLED_DATA])) { + $errs[self::FIELD_DATA_SAMPLED_DATA] = []; + } + $errs[self::FIELD_DATA_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_SCHEDULE])) { + $v = $this->getDataSchedule(); + foreach($validationRules[self::FIELD_DATA_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_SCHEDULE])) { + $errs[self::FIELD_DATA_SCHEDULE] = []; + } + $errs[self::FIELD_DATA_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_STRING])) { + $v = $this->getDataString(); + foreach($validationRules[self::FIELD_DATA_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_STRING])) { + $errs[self::FIELD_DATA_STRING] = []; + } + $errs[self::FIELD_DATA_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_URI])) { + $v = $this->getDataUri(); + foreach($validationRules[self::FIELD_DATA_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_URI])) { + $errs[self::FIELD_DATA_URI] = []; + } + $errs[self::FIELD_DATA_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_UUID])) { + $v = $this->getDataUuid(); + foreach($validationRules[self::FIELD_DATA_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_DATA_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_UUID])) { + $errs[self::FIELD_DATA_UUID] = []; + } + $errs[self::FIELD_DATA_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPTIONS])) { + $v = $this->getOptions(); + foreach($validationRules[self::FIELD_OPTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_OPTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPTIONS])) { + $errs[self::FIELD_OPTIONS] = []; + } + $errs[self::FIELD_OPTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REMARKS])) { + $v = $this->getRemarks(); + foreach($validationRules[self::FIELD_REMARKS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_REMARKS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REMARKS])) { + $errs[self::FIELD_REMARKS] = []; + } + $errs[self::FIELD_REMARKS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource.php index 0eec75e073..6fe0feeac9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRResource extends FHIRBackboneElement * Validation map for fields in type Resource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResource Constructor @@ -354,11 +354,115 @@ public function setText(FHIRNarrative $text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContained())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReaction.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReaction.php index 1d9e2dd6b0..81ede74699 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -177,7 +177,7 @@ class FHIRAdverseReaction extends FHIRResource implements PHPFHIRContainedTypeIn * Validation map for fields in type AdverseReaction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseReaction Constructor @@ -651,11 +651,223 @@ public function setSymptom(array $symptom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDidNotOccurFlag())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DID_NOT_OCCUR_FLAG] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExposure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXPOSURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSymptom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SYMPTOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DID_NOT_OCCUR_FLAG])) { + $v = $this->getDidNotOccurFlag(); + foreach($validationRules[self::FIELD_DID_NOT_OCCUR_FLAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION, self::FIELD_DID_NOT_OCCUR_FLAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DID_NOT_OCCUR_FLAG])) { + $errs[self::FIELD_DID_NOT_OCCUR_FLAG] = []; + } + $errs[self::FIELD_DID_NOT_OCCUR_FLAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE])) { + $v = $this->getExposure(); + foreach($validationRules[self::FIELD_EXPOSURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION, self::FIELD_EXPOSURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE])) { + $errs[self::FIELD_EXPOSURE] = []; + } + $errs[self::FIELD_EXPOSURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYMPTOM])) { + $v = $this->getSymptom(); + foreach($validationRules[self::FIELD_SYMPTOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_REACTION, self::FIELD_SYMPTOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYMPTOM])) { + $errs[self::FIELD_SYMPTOM] = []; + } + $errs[self::FIELD_SYMPTOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlert.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlert.php index c2dc202a06..7459b4b84f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlert.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -162,7 +162,7 @@ class FHIRAlert extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Alert * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAlert Constructor @@ -515,11 +515,202 @@ public function setSubject(FHIRResourceReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALERT, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALERT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALERT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALERT, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALERT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALERT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntolerance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntolerance.php index de26110c22..4b0e6c21bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntolerance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntolerance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -214,7 +214,7 @@ class FHIRAllergyIntolerance extends FHIRResource implements PHPFHIRContainedTyp * Validation map for fields in type AllergyIntolerance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntolerance Constructor @@ -823,11 +823,274 @@ public function setSubstance(FHIRResourceReference $substance = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCriticality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITICALITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReaction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecordedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSensitivityTest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SENSITIVITY_TEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSensitivityType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENSITIVITY_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CRITICALITY])) { + $v = $this->getCriticality(); + foreach($validationRules[self::FIELD_CRITICALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CRITICALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITICALITY])) { + $errs[self::FIELD_CRITICALITY] = []; + } + $errs[self::FIELD_CRITICALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REACTION])) { + $v = $this->getReaction(); + foreach($validationRules[self::FIELD_REACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_REACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REACTION])) { + $errs[self::FIELD_REACTION] = []; + } + $errs[self::FIELD_REACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED_DATE])) { + $v = $this->getRecordedDate(); + foreach($validationRules[self::FIELD_RECORDED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_RECORDED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED_DATE])) { + $errs[self::FIELD_RECORDED_DATE] = []; + } + $errs[self::FIELD_RECORDED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENSITIVITY_TEST])) { + $v = $this->getSensitivityTest(); + foreach($validationRules[self::FIELD_SENSITIVITY_TEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_SENSITIVITY_TEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENSITIVITY_TEST])) { + $errs[self::FIELD_SENSITIVITY_TEST] = []; + } + $errs[self::FIELD_SENSITIVITY_TEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENSITIVITY_TYPE])) { + $v = $this->getSensitivityType(); + foreach($validationRules[self::FIELD_SENSITIVITY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_SENSITIVITY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENSITIVITY_TYPE])) { + $errs[self::FIELD_SENSITIVITY_TYPE] = []; + } + $errs[self::FIELD_SENSITIVITY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlan.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlan.php index 443324a0b1..0ff3ef837a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlan.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -223,7 +223,7 @@ class FHIRCarePlan extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type CarePlan * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlan Constructor @@ -913,11 +913,278 @@ public function setStatus(FHIRCarePlanStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getActivity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTIVITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getConcern())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCERN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGoal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getModified())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODIFIED] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotes())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVITY])) { + $v = $this->getActivity(); + foreach($validationRules[self::FIELD_ACTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_ACTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVITY])) { + $errs[self::FIELD_ACTIVITY] = []; + } + $errs[self::FIELD_ACTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCERN])) { + $v = $this->getConcern(); + foreach($validationRules[self::FIELD_CONCERN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_CONCERN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCERN])) { + $errs[self::FIELD_CONCERN] = []; + } + $errs[self::FIELD_CONCERN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL])) { + $v = $this->getGoal(); + foreach($validationRules[self::FIELD_GOAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_GOAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL])) { + $errs[self::FIELD_GOAL] = []; + } + $errs[self::FIELD_GOAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIED])) { + $v = $this->getModified(); + foreach($validationRules[self::FIELD_MODIFIED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_MODIFIED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIED])) { + $errs[self::FIELD_MODIFIED] = []; + } + $errs[self::FIELD_MODIFIED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRComposition.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRComposition.php index a9a9a63a81..cda62a20a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRComposition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRComposition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -283,7 +283,7 @@ class FHIRComposition extends FHIRResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Composition * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_AUTHOR => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1068,11 +1068,342 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAttester())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ATTESTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getConfidentiality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFIDENTIALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCustodian())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CUSTODIAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSection())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ATTESTER])) { + $v = $this->getAttester(); + foreach($validationRules[self::FIELD_ATTESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_ATTESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTESTER])) { + $errs[self::FIELD_ATTESTER] = []; + } + $errs[self::FIELD_ATTESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONFIDENTIALITY])) { + $v = $this->getConfidentiality(); + foreach($validationRules[self::FIELD_CONFIDENTIALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CONFIDENTIALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONFIDENTIALITY])) { + $errs[self::FIELD_CONFIDENTIALITY] = []; + } + $errs[self::FIELD_CONFIDENTIALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CUSTODIAN])) { + $v = $this->getCustodian(); + foreach($validationRules[self::FIELD_CUSTODIAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CUSTODIAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CUSTODIAN])) { + $errs[self::FIELD_CUSTODIAN] = []; + } + $errs[self::FIELD_CUSTODIAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECTION])) { + $v = $this->getSection(); + foreach($validationRules[self::FIELD_SECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_SECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECTION])) { + $errs[self::FIELD_SECTION] = []; + } + $errs[self::FIELD_SECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMap.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMap.php index db6df42268..1842193193 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMap.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -258,7 +258,7 @@ class FHIRConceptMap extends FHIRResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type ConceptMap * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMap Constructor @@ -1079,11 +1079,323 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCondition.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCondition.php index 9e0497b4c3..0af506cf40 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -362,7 +362,7 @@ class FHIRCondition extends FHIRResource implements PHPFHIRContainedTypeInterfac * Validation map for fields in type Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCondition Constructor @@ -1484,11 +1484,446 @@ public function setSubject(FHIRResourceReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbatementAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsserter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCertainty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CERTAINTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateAsserted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_ASSERTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvidence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVIDENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNotes())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTES] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_AGE])) { + $v = $this->getAbatementAge(); + foreach($validationRules[self::FIELD_ABATEMENT_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_AGE])) { + $errs[self::FIELD_ABATEMENT_AGE] = []; + } + $errs[self::FIELD_ABATEMENT_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_BOOLEAN])) { + $v = $this->getAbatementBoolean(); + foreach($validationRules[self::FIELD_ABATEMENT_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_BOOLEAN])) { + $errs[self::FIELD_ABATEMENT_BOOLEAN] = []; + } + $errs[self::FIELD_ABATEMENT_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_DATE])) { + $v = $this->getAbatementDate(); + foreach($validationRules[self::FIELD_ABATEMENT_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_DATE])) { + $errs[self::FIELD_ABATEMENT_DATE] = []; + } + $errs[self::FIELD_ABATEMENT_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSERTER])) { + $v = $this->getAsserter(); + foreach($validationRules[self::FIELD_ASSERTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ASSERTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERTER])) { + $errs[self::FIELD_ASSERTER] = []; + } + $errs[self::FIELD_ASSERTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CERTAINTY])) { + $v = $this->getCertainty(); + foreach($validationRules[self::FIELD_CERTAINTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CERTAINTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CERTAINTY])) { + $errs[self::FIELD_CERTAINTY] = []; + } + $errs[self::FIELD_CERTAINTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_ASSERTED])) { + $v = $this->getDateAsserted(); + foreach($validationRules[self::FIELD_DATE_ASSERTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_DATE_ASSERTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_ASSERTED])) { + $errs[self::FIELD_DATE_ASSERTED] = []; + } + $errs[self::FIELD_DATE_ASSERTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVIDENCE])) { + $v = $this->getEvidence(); + foreach($validationRules[self::FIELD_EVIDENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_EVIDENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVIDENCE])) { + $errs[self::FIELD_EVIDENCE] = []; + } + $errs[self::FIELD_EVIDENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_AGE])) { + $v = $this->getOnsetAge(); + foreach($validationRules[self::FIELD_ONSET_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_AGE])) { + $errs[self::FIELD_ONSET_AGE] = []; + } + $errs[self::FIELD_ONSET_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_DATE])) { + $v = $this->getOnsetDate(); + foreach($validationRules[self::FIELD_ONSET_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_DATE])) { + $errs[self::FIELD_ONSET_DATE] = []; + } + $errs[self::FIELD_ONSET_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ITEM])) { + $v = $this->getRelatedItem(); + foreach($validationRules[self::FIELD_RELATED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_RELATED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ITEM])) { + $errs[self::FIELD_RELATED_ITEM] = []; + } + $errs[self::FIELD_RELATED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STAGE])) { + $v = $this->getStage(); + foreach($validationRules[self::FIELD_STAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_STAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STAGE])) { + $errs[self::FIELD_STAGE] = []; + } + $errs[self::FIELD_STAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformance.php index 9e7a6ab6cf..51b7dd65fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -342,7 +342,7 @@ class FHIRConformance extends FHIRResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Conformance * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_FORMAT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1588,11 +1588,416 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAcceptUnknown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCEPT_UNKNOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDocument())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFhirVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FHIR_VERSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFormat())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FORMAT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getImplementation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLEMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMessaging())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MESSAGING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSoftware())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOFTWARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCEPT_UNKNOWN])) { + $v = $this->getAcceptUnknown(); + foreach($validationRules[self::FIELD_ACCEPT_UNKNOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_ACCEPT_UNKNOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCEPT_UNKNOWN])) { + $errs[self::FIELD_ACCEPT_UNKNOWN] = []; + } + $errs[self::FIELD_ACCEPT_UNKNOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENT])) { + $v = $this->getDocument(); + foreach($validationRules[self::FIELD_DOCUMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_DOCUMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENT])) { + $errs[self::FIELD_DOCUMENT] = []; + } + $errs[self::FIELD_DOCUMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORMAT])) { + $v = $this->getFormat(); + foreach($validationRules[self::FIELD_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAT])) { + $errs[self::FIELD_FORMAT] = []; + } + $errs[self::FIELD_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLEMENTATION])) { + $v = $this->getImplementation(); + foreach($validationRules[self::FIELD_IMPLEMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_IMPLEMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLEMENTATION])) { + $errs[self::FIELD_IMPLEMENTATION] = []; + } + $errs[self::FIELD_IMPLEMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MESSAGING])) { + $v = $this->getMessaging(); + foreach($validationRules[self::FIELD_MESSAGING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_MESSAGING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MESSAGING])) { + $errs[self::FIELD_MESSAGING] = []; + } + $errs[self::FIELD_MESSAGING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REST])) { + $v = $this->getRest(); + foreach($validationRules[self::FIELD_REST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_REST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REST])) { + $errs[self::FIELD_REST] = []; + } + $errs[self::FIELD_REST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOFTWARE])) { + $v = $this->getSoftware(); + foreach($validationRules[self::FIELD_SOFTWARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_SOFTWARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOFTWARE])) { + $errs[self::FIELD_SOFTWARE] = []; + } + $errs[self::FIELD_SOFTWARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDevice.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDevice.php index e457ad5274..f4cb69bb8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -264,7 +264,7 @@ class FHIRDevice extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Device * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDevice Constructor @@ -1057,11 +1057,323 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExpiry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getModel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getOwner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUdi())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UDI] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPIRY])) { + $v = $this->getExpiry(); + foreach($validationRules[self::FIELD_EXPIRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_EXPIRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRY])) { + $errs[self::FIELD_EXPIRY] = []; + } + $errs[self::FIELD_EXPIRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODEL])) { + $v = $this->getModel(); + foreach($validationRules[self::FIELD_MODEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MODEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODEL])) { + $errs[self::FIELD_MODEL] = []; + } + $errs[self::FIELD_MODEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNER])) { + $v = $this->getOwner(); + foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_OWNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNER])) { + $errs[self::FIELD_OWNER] = []; + } + $errs[self::FIELD_OWNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReport.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReport.php index d9e2693129..2ffbf53b7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReport.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRDeviceObservationReport extends FHIRResource implements PHPFHIRContain * Validation map for fields in type DeviceObservationReport * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceObservationReport Constructor @@ -433,11 +433,185 @@ public function setVirtualDevice(array $virtualDevice = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVirtualDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VIRTUAL_DEVICE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_OBSERVATION_REPORT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANT])) { + $v = $this->getInstant(); + foreach($validationRules[self::FIELD_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_OBSERVATION_REPORT, self::FIELD_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANT])) { + $errs[self::FIELD_INSTANT] = []; + } + $errs[self::FIELD_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_OBSERVATION_REPORT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_OBSERVATION_REPORT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VIRTUAL_DEVICE])) { + $v = $this->getVirtualDevice(); + foreach($validationRules[self::FIELD_VIRTUAL_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_OBSERVATION_REPORT, self::FIELD_VIRTUAL_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VIRTUAL_DEVICE])) { + $errs[self::FIELD_VIRTUAL_DEVICE] = []; + } + $errs[self::FIELD_VIRTUAL_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrder.php index 56670a3b68..0e21888f54 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -213,7 +213,7 @@ class FHIRDiagnosticOrder extends FHIRResource implements PHPFHIRContainedTypeIn * Validation map for fields in type DiagnosticOrder * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticOrder Constructor @@ -840,11 +840,276 @@ public function setSubject(FHIRResourceReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClinicalNotes())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_NOTES] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrderer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLINICAL_NOTES])) { + $v = $this->getClinicalNotes(); + foreach($validationRules[self::FIELD_CLINICAL_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_CLINICAL_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLINICAL_NOTES])) { + $errs[self::FIELD_CLINICAL_NOTES] = []; + } + $errs[self::FIELD_CLINICAL_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERER])) { + $v = $this->getOrderer(); + foreach($validationRules[self::FIELD_ORDERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_ORDERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERER])) { + $errs[self::FIELD_ORDERER] = []; + } + $errs[self::FIELD_ORDERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReport.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReport.php index b9a818788c..ba108180dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReport.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -327,7 +327,7 @@ class FHIRDiagnosticReport extends FHIRResource implements PHPFHIRContainedTypeI * Validation map for fields in type DiagnosticReport * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReport Constructor @@ -1413,11 +1413,401 @@ public function setSubject(FHIRResourceReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCodedDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODED_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getConclusion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCLUSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosticDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTIC_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosticPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTIC_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getImage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImagingStudy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGING_STUDY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPresentedForm())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRESENTED_FORM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRequestDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUEST_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResult())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESULT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getServiceCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODED_DIAGNOSIS])) { + $v = $this->getCodedDiagnosis(); + foreach($validationRules[self::FIELD_CODED_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CODED_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODED_DIAGNOSIS])) { + $errs[self::FIELD_CODED_DIAGNOSIS] = []; + } + $errs[self::FIELD_CODED_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCLUSION])) { + $v = $this->getConclusion(); + foreach($validationRules[self::FIELD_CONCLUSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CONCLUSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCLUSION])) { + $errs[self::FIELD_CONCLUSION] = []; + } + $errs[self::FIELD_CONCLUSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSTIC_DATE_TIME])) { + $v = $this->getDiagnosticDateTime(); + foreach($validationRules[self::FIELD_DIAGNOSTIC_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_DIAGNOSTIC_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSTIC_DATE_TIME])) { + $errs[self::FIELD_DIAGNOSTIC_DATE_TIME] = []; + } + $errs[self::FIELD_DIAGNOSTIC_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSTIC_PERIOD])) { + $v = $this->getDiagnosticPeriod(); + foreach($validationRules[self::FIELD_DIAGNOSTIC_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_DIAGNOSTIC_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSTIC_PERIOD])) { + $errs[self::FIELD_DIAGNOSTIC_PERIOD] = []; + } + $errs[self::FIELD_DIAGNOSTIC_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGE])) { + $v = $this->getImage(); + foreach($validationRules[self::FIELD_IMAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IMAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGE])) { + $errs[self::FIELD_IMAGE] = []; + } + $errs[self::FIELD_IMAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGING_STUDY])) { + $v = $this->getImagingStudy(); + foreach($validationRules[self::FIELD_IMAGING_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IMAGING_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGING_STUDY])) { + $errs[self::FIELD_IMAGING_STUDY] = []; + } + $errs[self::FIELD_IMAGING_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESENTED_FORM])) { + $v = $this->getPresentedForm(); + foreach($validationRules[self::FIELD_PRESENTED_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_PRESENTED_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESENTED_FORM])) { + $errs[self::FIELD_PRESENTED_FORM] = []; + } + $errs[self::FIELD_PRESENTED_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_DETAIL])) { + $v = $this->getRequestDetail(); + foreach($validationRules[self::FIELD_REQUEST_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_REQUEST_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_DETAIL])) { + $errs[self::FIELD_REQUEST_DETAIL] = []; + } + $errs[self::FIELD_REQUEST_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_CATEGORY])) { + $v = $this->getServiceCategory(); + foreach($validationRules[self::FIELD_SERVICE_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SERVICE_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_CATEGORY])) { + $errs[self::FIELD_SERVICE_CATEGORY] = []; + } + $errs[self::FIELD_SERVICE_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifest.php index 35ed123283..6c2d3ae50c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -264,7 +264,7 @@ class FHIRDocumentManifest extends FHIRResource implements PHPFHIRContainedTypeI * Validation map for fields in type DocumentManifest * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CONTENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1115,11 +1115,329 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getConfidentiality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFIDENTIALITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMasterIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MASTER_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSupercedes())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPERCEDES] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONFIDENTIALITY])) { + $v = $this->getConfidentiality(); + foreach($validationRules[self::FIELD_CONFIDENTIALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_CONFIDENTIALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONFIDENTIALITY])) { + $errs[self::FIELD_CONFIDENTIALITY] = []; + } + $errs[self::FIELD_CONFIDENTIALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MASTER_IDENTIFIER])) { + $v = $this->getMasterIdentifier(); + foreach($validationRules[self::FIELD_MASTER_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_MASTER_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MASTER_IDENTIFIER])) { + $errs[self::FIELD_MASTER_IDENTIFIER] = []; + } + $errs[self::FIELD_MASTER_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPERCEDES])) { + $v = $this->getSupercedes(); + foreach($validationRules[self::FIELD_SUPERCEDES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_SUPERCEDES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPERCEDES])) { + $errs[self::FIELD_SUPERCEDES] = []; + } + $errs[self::FIELD_SUPERCEDES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReference.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReference.php index bdb4ddb99b..444e0850db 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReference.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -399,7 +399,7 @@ class FHIRDocumentReference extends FHIRResource implements PHPFHIRContainedType * Validation map for fields in type DocumentReference * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_AUTHOR => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1798,11 +1798,516 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthenticator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHENTICATOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getConfidentiality())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONFIDENTIALITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getCustodian())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CUSTODIAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOC_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFormat())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FORMAT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getHash())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HASH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIndexed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDEXED] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMasterIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MASTER_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMimeType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIME_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPolicyManager())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POLICY_MANAGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrimaryLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIMARY_LANGUAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatesTo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATES_TO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSize())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIZE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHENTICATOR])) { + $v = $this->getAuthenticator(); + foreach($validationRules[self::FIELD_AUTHENTICATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_AUTHENTICATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHENTICATOR])) { + $errs[self::FIELD_AUTHENTICATOR] = []; + } + $errs[self::FIELD_AUTHENTICATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONFIDENTIALITY])) { + $v = $this->getConfidentiality(); + foreach($validationRules[self::FIELD_CONFIDENTIALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CONFIDENTIALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONFIDENTIALITY])) { + $errs[self::FIELD_CONFIDENTIALITY] = []; + } + $errs[self::FIELD_CONFIDENTIALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CUSTODIAN])) { + $v = $this->getCustodian(); + foreach($validationRules[self::FIELD_CUSTODIAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CUSTODIAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CUSTODIAN])) { + $errs[self::FIELD_CUSTODIAN] = []; + } + $errs[self::FIELD_CUSTODIAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOC_STATUS])) { + $v = $this->getDocStatus(); + foreach($validationRules[self::FIELD_DOC_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_DOC_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOC_STATUS])) { + $errs[self::FIELD_DOC_STATUS] = []; + } + $errs[self::FIELD_DOC_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORMAT])) { + $v = $this->getFormat(); + foreach($validationRules[self::FIELD_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAT])) { + $errs[self::FIELD_FORMAT] = []; + } + $errs[self::FIELD_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HASH])) { + $v = $this->getHash(); + foreach($validationRules[self::FIELD_HASH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_HASH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HASH])) { + $errs[self::FIELD_HASH] = []; + } + $errs[self::FIELD_HASH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDEXED])) { + $v = $this->getIndexed(); + foreach($validationRules[self::FIELD_INDEXED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_INDEXED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDEXED])) { + $errs[self::FIELD_INDEXED] = []; + } + $errs[self::FIELD_INDEXED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MASTER_IDENTIFIER])) { + $v = $this->getMasterIdentifier(); + foreach($validationRules[self::FIELD_MASTER_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_MASTER_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MASTER_IDENTIFIER])) { + $errs[self::FIELD_MASTER_IDENTIFIER] = []; + } + $errs[self::FIELD_MASTER_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIME_TYPE])) { + $v = $this->getMimeType(); + foreach($validationRules[self::FIELD_MIME_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_MIME_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIME_TYPE])) { + $errs[self::FIELD_MIME_TYPE] = []; + } + $errs[self::FIELD_MIME_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY_MANAGER])) { + $v = $this->getPolicyManager(); + foreach($validationRules[self::FIELD_POLICY_MANAGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_POLICY_MANAGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY_MANAGER])) { + $errs[self::FIELD_POLICY_MANAGER] = []; + } + $errs[self::FIELD_POLICY_MANAGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIMARY_LANGUAGE])) { + $v = $this->getPrimaryLanguage(); + foreach($validationRules[self::FIELD_PRIMARY_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_PRIMARY_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIMARY_LANGUAGE])) { + $errs[self::FIELD_PRIMARY_LANGUAGE] = []; + } + $errs[self::FIELD_PRIMARY_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATES_TO])) { + $v = $this->getRelatesTo(); + foreach($validationRules[self::FIELD_RELATES_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_RELATES_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATES_TO])) { + $errs[self::FIELD_RELATES_TO] = []; + } + $errs[self::FIELD_RELATES_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIZE])) { + $v = $this->getSize(); + foreach($validationRules[self::FIELD_SIZE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_SIZE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIZE])) { + $errs[self::FIELD_SIZE] = []; + } + $errs[self::FIELD_SIZE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounter.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounter.php index e55a9cc7ea..af834621f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -273,7 +273,7 @@ class FHIREncounter extends FHIRResource implements PHPFHIRContainedTypeInterfac * Validation map for fields in type Encounter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounter Constructor @@ -1055,11 +1055,361 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getHospitalization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HOSPITALIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIndication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LENGTH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getServiceProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HOSPITALIZATION])) { + $v = $this->getHospitalization(); + foreach($validationRules[self::FIELD_HOSPITALIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_HOSPITALIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HOSPITALIZATION])) { + $errs[self::FIELD_HOSPITALIZATION] = []; + } + $errs[self::FIELD_HOSPITALIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION])) { + $v = $this->getIndication(); + foreach($validationRules[self::FIELD_INDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_INDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION])) { + $errs[self::FIELD_INDICATION] = []; + } + $errs[self::FIELD_INDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LENGTH])) { + $v = $this->getLength(); + foreach($validationRules[self::FIELD_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LENGTH])) { + $errs[self::FIELD_LENGTH] = []; + } + $errs[self::FIELD_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_PROVIDER])) { + $v = $this->getServiceProvider(); + foreach($validationRules[self::FIELD_SERVICE_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_SERVICE_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_PROVIDER])) { + $errs[self::FIELD_SERVICE_PROVIDER] = []; + } + $errs[self::FIELD_SERVICE_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistory.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistory.php index 4456ee5b54..a205da8f7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRFamilyHistory extends FHIRResource implements PHPFHIRContainedTypeInte * Validation map for fields in type FamilyHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyHistory Constructor @@ -439,11 +439,170 @@ public function setSubject(FHIRResourceReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATION])) { + $v = $this->getRelation(); + foreach($validationRules[self::FIELD_RELATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY, self::FIELD_RELATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATION])) { + $errs[self::FIELD_RELATION] = []; + } + $errs[self::FIELD_RELATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroup.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroup.php index 2c7e72bc8b..1ede940109 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -190,7 +190,7 @@ class FHIRGroup extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroup Constructor @@ -695,11 +695,238 @@ public function setType(FHIRGroupType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActual())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTUAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMember())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTUAL])) { + $v = $this->getActual(); + foreach($validationRules[self::FIELD_ACTUAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_ACTUAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTUAL])) { + $errs[self::FIELD_ACTUAL] = []; + } + $errs[self::FIELD_ACTUAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC])) { + $v = $this->getCharacteristic(); + foreach($validationRules[self::FIELD_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC])) { + $errs[self::FIELD_CHARACTERISTIC] = []; + } + $errs[self::FIELD_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEMBER])) { + $v = $this->getMember(); + foreach($validationRules[self::FIELD_MEMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_MEMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEMBER])) { + $errs[self::FIELD_MEMBER] = []; + } + $errs[self::FIELD_MEMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudy.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudy.php index a7d97ef352..68aa67b41e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -306,7 +306,7 @@ class FHIRImagingStudy extends FHIRResource implements PHPFHIRContainedTypeInter * Validation map for fields in type ImagingStudy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudy Constructor @@ -1373,11 +1373,397 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccessionNo())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCESSION_NO] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailability())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getClinicalInformation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_INFORMATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInterpreter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTERPRETER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModality())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODALITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNumberOfInstances())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_SERIES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOrder())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ORDER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProcedure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReferrer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSeries())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERIES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCESSION_NO])) { + $v = $this->getAccessionNo(); + foreach($validationRules[self::FIELD_ACCESSION_NO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_ACCESSION_NO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCESSION_NO])) { + $errs[self::FIELD_ACCESSION_NO] = []; + } + $errs[self::FIELD_ACCESSION_NO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY])) { + $v = $this->getAvailability(); + foreach($validationRules[self::FIELD_AVAILABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_AVAILABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY])) { + $errs[self::FIELD_AVAILABILITY] = []; + } + $errs[self::FIELD_AVAILABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLINICAL_INFORMATION])) { + $v = $this->getClinicalInformation(); + foreach($validationRules[self::FIELD_CLINICAL_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_CLINICAL_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLINICAL_INFORMATION])) { + $errs[self::FIELD_CLINICAL_INFORMATION] = []; + } + $errs[self::FIELD_CLINICAL_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERPRETER])) { + $v = $this->getInterpreter(); + foreach($validationRules[self::FIELD_INTERPRETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_INTERPRETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERPRETER])) { + $errs[self::FIELD_INTERPRETER] = []; + } + $errs[self::FIELD_INTERPRETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODALITY])) { + $v = $this->getModality(); + foreach($validationRules[self::FIELD_MODALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_MODALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODALITY])) { + $errs[self::FIELD_MODALITY] = []; + } + $errs[self::FIELD_MODALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_INSTANCES])) { + $v = $this->getNumberOfInstances(); + foreach($validationRules[self::FIELD_NUMBER_OF_INSTANCES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_NUMBER_OF_INSTANCES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_INSTANCES])) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = []; + } + $errs[self::FIELD_NUMBER_OF_INSTANCES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_SERIES])) { + $v = $this->getNumberOfSeries(); + foreach($validationRules[self::FIELD_NUMBER_OF_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_NUMBER_OF_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_SERIES])) { + $errs[self::FIELD_NUMBER_OF_SERIES] = []; + } + $errs[self::FIELD_NUMBER_OF_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDER])) { + $v = $this->getOrder(); + foreach($validationRules[self::FIELD_ORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_ORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDER])) { + $errs[self::FIELD_ORDER] = []; + } + $errs[self::FIELD_ORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRER])) { + $v = $this->getReferrer(); + foreach($validationRules[self::FIELD_REFERRER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_REFERRER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRER])) { + $errs[self::FIELD_REFERRER] = []; + } + $errs[self::FIELD_REFERRER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunization.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunization.php index de27adf3ec..fafe766f91 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -314,7 +314,7 @@ class FHIRImmunization extends FHIRResource implements PHPFHIRContainedTypeInter * Validation map for fields in type Immunization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunization Constructor @@ -1260,11 +1260,410 @@ public function setVaccineType(FHIRCodeableConcept $vaccineType = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpirationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExplanation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPLANATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReaction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRefusedIndicator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFUSED_INDICATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getReported())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVaccinationProtocol())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VACCINATION_PROTOCOL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVaccineType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VACCINE_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_QUANTITY])) { + $v = $this->getDoseQuantity(); + foreach($validationRules[self::FIELD_DOSE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_DOSE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_QUANTITY])) { + $errs[self::FIELD_DOSE_QUANTITY] = []; + } + $errs[self::FIELD_DOSE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPIRATION_DATE])) { + $v = $this->getExpirationDate(); + foreach($validationRules[self::FIELD_EXPIRATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_EXPIRATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRATION_DATE])) { + $errs[self::FIELD_EXPIRATION_DATE] = []; + } + $errs[self::FIELD_EXPIRATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPLANATION])) { + $v = $this->getExplanation(); + foreach($validationRules[self::FIELD_EXPLANATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_EXPLANATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPLANATION])) { + $errs[self::FIELD_EXPLANATION] = []; + } + $errs[self::FIELD_EXPLANATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REACTION])) { + $v = $this->getReaction(); + foreach($validationRules[self::FIELD_REACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REACTION])) { + $errs[self::FIELD_REACTION] = []; + } + $errs[self::FIELD_REACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFUSED_INDICATOR])) { + $v = $this->getRefusedIndicator(); + foreach($validationRules[self::FIELD_REFUSED_INDICATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REFUSED_INDICATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFUSED_INDICATOR])) { + $errs[self::FIELD_REFUSED_INDICATOR] = []; + } + $errs[self::FIELD_REFUSED_INDICATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTED])) { + $v = $this->getReported(); + foreach($validationRules[self::FIELD_REPORTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REPORTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTED])) { + $errs[self::FIELD_REPORTED] = []; + } + $errs[self::FIELD_REPORTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINATION_PROTOCOL])) { + $v = $this->getVaccinationProtocol(); + foreach($validationRules[self::FIELD_VACCINATION_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_VACCINATION_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINATION_PROTOCOL])) { + $errs[self::FIELD_VACCINATION_PROTOCOL] = []; + } + $errs[self::FIELD_VACCINATION_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINE_TYPE])) { + $v = $this->getVaccineType(); + foreach($validationRules[self::FIELD_VACCINE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_VACCINE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINE_TYPE])) { + $errs[self::FIELD_VACCINE_TYPE] = []; + } + $errs[self::FIELD_VACCINE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendation.php index 5030f2c896..986c13b05e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRImmunizationRecommendation extends FHIRResource implements PHPFHIRCont * Validation map for fields in type ImmunizationRecommendation * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RECOMMENDATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -355,11 +355,153 @@ public function setSubject(FHIRResourceReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRecommendation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECOMMENDATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECOMMENDATION])) { + $v = $this->getRecommendation(); + foreach($validationRules[self::FIELD_RECOMMENDATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_RECOMMENDATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECOMMENDATION])) { + $errs[self::FIELD_RECOMMENDATION] = []; + } + $errs[self::FIELD_RECOMMENDATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRList.php index 6ccd2941fc..8fefe66446 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -204,7 +204,7 @@ class FHIRList extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type List * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRList Constructor @@ -733,11 +733,255 @@ public function setSubject(FHIRResourceReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEmptyReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EMPTY_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTRY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrdered())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EMPTY_REASON])) { + $v = $this->getEmptyReason(); + foreach($validationRules[self::FIELD_EMPTY_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_EMPTY_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EMPTY_REASON])) { + $errs[self::FIELD_EMPTY_REASON] = []; + } + $errs[self::FIELD_EMPTY_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTRY])) { + $v = $this->getEntry(); + foreach($validationRules[self::FIELD_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY])) { + $errs[self::FIELD_ENTRY] = []; + } + $errs[self::FIELD_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED])) { + $v = $this->getOrdered(); + foreach($validationRules[self::FIELD_ORDERED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ORDERED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED])) { + $errs[self::FIELD_ORDERED] = []; + } + $errs[self::FIELD_ORDERED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocation.php index 06588022c4..9adc6f1e46 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -246,7 +246,7 @@ class FHIRLocation extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Location * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocation Constructor @@ -871,11 +871,304 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if (null !== ($v = $this->getPhysicalType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHYSICAL_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPosition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHYSICAL_TYPE])) { + $v = $this->getPhysicalType(); + foreach($validationRules[self::FIELD_PHYSICAL_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_PHYSICAL_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHYSICAL_TYPE])) { + $errs[self::FIELD_PHYSICAL_TYPE] = []; + } + $errs[self::FIELD_PHYSICAL_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POSITION])) { + $v = $this->getPosition(); + foreach($validationRules[self::FIELD_POSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_POSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POSITION])) { + $errs[self::FIELD_POSITION] = []; + } + $errs[self::FIELD_POSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedia.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedia.php index 6c87d2cf80..8a172454fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedia.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedia.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -263,7 +263,7 @@ class FHIRMedia extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Media * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedia Constructor @@ -1012,11 +1012,321 @@ public function setWidth($width = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrames())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FRAMES] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeight())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEIGHT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtype())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getView())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VIEW] = $fieldErrs; + } + } + if (null !== ($v = $this->getWidth())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WIDTH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE_NAME])) { + $v = $this->getDeviceName(); + foreach($validationRules[self::FIELD_DEVICE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_DEVICE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE_NAME])) { + $errs[self::FIELD_DEVICE_NAME] = []; + } + $errs[self::FIELD_DEVICE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FRAMES])) { + $v = $this->getFrames(); + foreach($validationRules[self::FIELD_FRAMES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_FRAMES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRAMES])) { + $errs[self::FIELD_FRAMES] = []; + } + $errs[self::FIELD_FRAMES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEIGHT])) { + $v = $this->getHeight(); + foreach($validationRules[self::FIELD_HEIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_HEIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEIGHT])) { + $errs[self::FIELD_HEIGHT] = []; + } + $errs[self::FIELD_HEIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LENGTH])) { + $v = $this->getLength(); + foreach($validationRules[self::FIELD_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LENGTH])) { + $errs[self::FIELD_LENGTH] = []; + } + $errs[self::FIELD_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATOR])) { + $v = $this->getOperator(); + foreach($validationRules[self::FIELD_OPERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_OPERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATOR])) { + $errs[self::FIELD_OPERATOR] = []; + } + $errs[self::FIELD_OPERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTYPE])) { + $v = $this->getSubtype(); + foreach($validationRules[self::FIELD_SUBTYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_SUBTYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTYPE])) { + $errs[self::FIELD_SUBTYPE] = []; + } + $errs[self::FIELD_SUBTYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VIEW])) { + $v = $this->getView(); + foreach($validationRules[self::FIELD_VIEW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_VIEW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VIEW])) { + $errs[self::FIELD_VIEW] = []; + } + $errs[self::FIELD_VIEW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WIDTH])) { + $v = $this->getWidth(); + foreach($validationRules[self::FIELD_WIDTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_WIDTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WIDTH])) { + $errs[self::FIELD_WIDTH] = []; + } + $errs[self::FIELD_WIDTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedication.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedication.php index 59f6f42f6f..b9a645d38c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedication.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -179,7 +179,7 @@ class FHIRMedication extends FHIRResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Medication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedication Constructor @@ -557,11 +557,217 @@ public function setProduct(FHIRMedicationProduct $product = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsBrand())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_BRAND] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPackage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PACKAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProduct())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_BRAND])) { + $v = $this->getIsBrand(); + foreach($validationRules[self::FIELD_IS_BRAND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_IS_BRAND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_BRAND])) { + $errs[self::FIELD_IS_BRAND] = []; + } + $errs[self::FIELD_IS_BRAND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE])) { + $v = $this->getPackage(); + foreach($validationRules[self::FIELD_PACKAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_PACKAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE])) { + $errs[self::FIELD_PACKAGE] = []; + } + $errs[self::FIELD_PACKAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT])) { + $v = $this->getProduct(); + foreach($validationRules[self::FIELD_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT])) { + $errs[self::FIELD_PRODUCT] = []; + } + $errs[self::FIELD_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministration.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministration.php index 155a1ade93..a53784aec2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -253,7 +253,7 @@ class FHIRMedicationAdministration extends FHIRResource implements PHPFHIRContai * Validation map for fields in type MedicationAdministration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministration Constructor @@ -975,11 +975,310 @@ public function setWhenGiven(FHIRPeriod $whenGiven = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDosage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMedication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPractitioner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTITIONER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonNotGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_NOT_GIVEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getWasNotGiven())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WAS_NOT_GIVEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenGiven())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_GIVEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION])) { + $v = $this->getMedication(); + foreach($validationRules[self::FIELD_MEDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_MEDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION])) { + $errs[self::FIELD_MEDICATION] = []; + } + $errs[self::FIELD_MEDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRACTITIONER])) { + $v = $this->getPractitioner(); + foreach($validationRules[self::FIELD_PRACTITIONER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PRACTITIONER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRACTITIONER])) { + $errs[self::FIELD_PRACTITIONER] = []; + } + $errs[self::FIELD_PRACTITIONER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIPTION])) { + $v = $this->getPrescription(); + foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIPTION])) { + $errs[self::FIELD_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_NOT_GIVEN])) { + $v = $this->getReasonNotGiven(); + foreach($validationRules[self::FIELD_REASON_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_REASON_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_NOT_GIVEN])) { + $errs[self::FIELD_REASON_NOT_GIVEN] = []; + } + $errs[self::FIELD_REASON_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WAS_NOT_GIVEN])) { + $v = $this->getWasNotGiven(); + foreach($validationRules[self::FIELD_WAS_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_WAS_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WAS_NOT_GIVEN])) { + $errs[self::FIELD_WAS_NOT_GIVEN] = []; + } + $errs[self::FIELD_WAS_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_GIVEN])) { + $v = $this->getWhenGiven(); + foreach($validationRules[self::FIELD_WHEN_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_WHEN_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_GIVEN])) { + $errs[self::FIELD_WHEN_GIVEN] = []; + } + $errs[self::FIELD_WHEN_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispense.php index e708893678..d457586933 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -175,7 +175,7 @@ class FHIRMedicationDispense extends FHIRResource implements PHPFHIRContainedTyp * Validation map for fields in type MedicationDispense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispense Constructor @@ -579,11 +579,221 @@ public function setSubstitution(FHIRMedicationDispenseSubstitution $substitution } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAuthorizingPrescription())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHORIZING_PRESCRIPTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDispense())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DISPENSE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDispenser())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPENSER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstitution())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTITUTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORIZING_PRESCRIPTION])) { + $v = $this->getAuthorizingPrescription(); + foreach($validationRules[self::FIELD_AUTHORIZING_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_AUTHORIZING_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORIZING_PRESCRIPTION])) { + $errs[self::FIELD_AUTHORIZING_PRESCRIPTION] = []; + } + $errs[self::FIELD_AUTHORIZING_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPENSE])) { + $v = $this->getDispense(); + foreach($validationRules[self::FIELD_DISPENSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DISPENSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSE])) { + $errs[self::FIELD_DISPENSE] = []; + } + $errs[self::FIELD_DISPENSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPENSER])) { + $v = $this->getDispenser(); + foreach($validationRules[self::FIELD_DISPENSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DISPENSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSER])) { + $errs[self::FIELD_DISPENSER] = []; + } + $errs[self::FIELD_DISPENSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTITUTION])) { + $v = $this->getSubstitution(); + foreach($validationRules[self::FIELD_SUBSTITUTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_SUBSTITUTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTITUTION])) { + $errs[self::FIELD_SUBSTITUTION] = []; + } + $errs[self::FIELD_SUBSTITUTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescription.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescription.php index 9075d1665e..055116c801 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescription.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -248,7 +248,7 @@ class FHIRMedicationPrescription extends FHIRResource implements PHPFHIRContaine * Validation map for fields in type MedicationPrescription * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationPrescription Constructor @@ -882,11 +882,306 @@ public function setSubstitution(FHIRMedicationPrescriptionSubstitution $substitu } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDateWritten())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_WRITTEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDispense())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPENSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDosageInstruction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE_INSTRUCTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMedication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescriber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstitution())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTITUTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE_WRITTEN])) { + $v = $this->getDateWritten(); + foreach($validationRules[self::FIELD_DATE_WRITTEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_DATE_WRITTEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_WRITTEN])) { + $errs[self::FIELD_DATE_WRITTEN] = []; + } + $errs[self::FIELD_DATE_WRITTEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPENSE])) { + $v = $this->getDispense(); + foreach($validationRules[self::FIELD_DISPENSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_DISPENSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSE])) { + $errs[self::FIELD_DISPENSE] = []; + } + $errs[self::FIELD_DISPENSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE_INSTRUCTION])) { + $v = $this->getDosageInstruction(); + foreach($validationRules[self::FIELD_DOSAGE_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_DOSAGE_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE_INSTRUCTION])) { + $errs[self::FIELD_DOSAGE_INSTRUCTION] = []; + } + $errs[self::FIELD_DOSAGE_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION])) { + $v = $this->getMedication(); + foreach($validationRules[self::FIELD_MEDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_MEDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION])) { + $errs[self::FIELD_MEDICATION] = []; + } + $errs[self::FIELD_MEDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIBER])) { + $v = $this->getPrescriber(); + foreach($validationRules[self::FIELD_PRESCRIBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_PRESCRIBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIBER])) { + $errs[self::FIELD_PRESCRIBER] = []; + } + $errs[self::FIELD_PRESCRIBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_RESOURCE])) { + $v = $this->getReasonResource(); + foreach($validationRules[self::FIELD_REASON_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_REASON_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_RESOURCE])) { + $errs[self::FIELD_REASON_RESOURCE] = []; + } + $errs[self::FIELD_REASON_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTITUTION])) { + $v = $this->getSubstitution(); + foreach($validationRules[self::FIELD_SUBSTITUTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION, self::FIELD_SUBSTITUTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTITUTION])) { + $errs[self::FIELD_SUBSTITUTION] = []; + } + $errs[self::FIELD_SUBSTITUTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatement.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatement.php index 3e5b6c964a..6082b75c5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -196,7 +196,7 @@ class FHIRMedicationStatement extends FHIRResource implements PHPFHIRContainedTy * Validation map for fields in type MedicationStatement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatement Constructor @@ -741,11 +741,242 @@ public function setWhenGiven(FHIRPeriod $whenGiven = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDosage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMedication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonNotGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_NOT_GIVEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getWasNotGiven())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WAS_NOT_GIVEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenGiven())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_GIVEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION])) { + $v = $this->getMedication(); + foreach($validationRules[self::FIELD_MEDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_MEDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION])) { + $errs[self::FIELD_MEDICATION] = []; + } + $errs[self::FIELD_MEDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_NOT_GIVEN])) { + $v = $this->getReasonNotGiven(); + foreach($validationRules[self::FIELD_REASON_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_REASON_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_NOT_GIVEN])) { + $errs[self::FIELD_REASON_NOT_GIVEN] = []; + } + $errs[self::FIELD_REASON_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WAS_NOT_GIVEN])) { + $v = $this->getWasNotGiven(); + foreach($validationRules[self::FIELD_WAS_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_WAS_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WAS_NOT_GIVEN])) { + $errs[self::FIELD_WAS_NOT_GIVEN] = []; + } + $errs[self::FIELD_WAS_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_GIVEN])) { + $v = $this->getWhenGiven(); + foreach($validationRules[self::FIELD_WHEN_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_WHEN_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_GIVEN])) { + $errs[self::FIELD_WHEN_GIVEN] = []; + } + $errs[self::FIELD_WHEN_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeader.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeader.php index 80f23425c3..be0e8a7613 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -255,7 +255,7 @@ class FHIRMessageHeader extends FHIRResource implements PHPFHIRContainedTypeInte * Validation map for fields in type MessageHeader * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeader Constructor @@ -906,11 +906,306 @@ public function setTimestamp($timestamp = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getData())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDestination())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESTINATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getReceiver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimestamp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMESTAMP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMESTAMP])) { + $v = $this->getTimestamp(); + foreach($validationRules[self::FIELD_TIMESTAMP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_TIMESTAMP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMESTAMP])) { + $errs[self::FIELD_TIMESTAMP] = []; + } + $errs[self::FIELD_TIMESTAMP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservation.php index 6e12816c87..1ae273e52f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -404,7 +404,7 @@ class FHIRObservation extends FHIRResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Observation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservation Constructor @@ -1593,11 +1593,495 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAppliesDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPLIES_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppliesPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPLIES_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComments())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getInterpretation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTERPRETATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReferenceRange())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_RANGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReliability())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELIABILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecimen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPLIES_DATE_TIME])) { + $v = $this->getAppliesDateTime(); + foreach($validationRules[self::FIELD_APPLIES_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_APPLIES_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES_DATE_TIME])) { + $errs[self::FIELD_APPLIES_DATE_TIME] = []; + } + $errs[self::FIELD_APPLIES_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPLIES_PERIOD])) { + $v = $this->getAppliesPeriod(); + foreach($validationRules[self::FIELD_APPLIES_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_APPLIES_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES_PERIOD])) { + $errs[self::FIELD_APPLIES_PERIOD] = []; + } + $errs[self::FIELD_APPLIES_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENTS])) { + $v = $this->getComments(); + foreach($validationRules[self::FIELD_COMMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_COMMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENTS])) { + $errs[self::FIELD_COMMENTS] = []; + } + $errs[self::FIELD_COMMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERPRETATION])) { + $v = $this->getInterpretation(); + foreach($validationRules[self::FIELD_INTERPRETATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_INTERPRETATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERPRETATION])) { + $errs[self::FIELD_INTERPRETATION] = []; + } + $errs[self::FIELD_INTERPRETATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_RANGE])) { + $v = $this->getReferenceRange(); + foreach($validationRules[self::FIELD_REFERENCE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_REFERENCE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_RANGE])) { + $errs[self::FIELD_REFERENCE_RANGE] = []; + } + $errs[self::FIELD_REFERENCE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELIABILITY])) { + $v = $this->getReliability(); + foreach($validationRules[self::FIELD_RELIABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_RELIABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELIABILITY])) { + $errs[self::FIELD_RELIABILITY] = []; + } + $errs[self::FIELD_RELIABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcome.php index ae8f4f0bea..8ed2880d4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIROperationOutcome extends FHIRResource implements PHPFHIRContainedTypeI * Validation map for fields in type OperationOutcome * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ISSUE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -218,11 +218,117 @@ public function setIssue(array $issue = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getIssue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ISSUE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ISSUE])) { + $v = $this->getIssue(); + foreach($validationRules[self::FIELD_ISSUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME, self::FIELD_ISSUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUE])) { + $errs[self::FIELD_ISSUE] = []; + } + $errs[self::FIELD_ISSUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrder.php index e7549ae111..ae3b37cdd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -208,7 +208,7 @@ class FHIROrder extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Order * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_DETAIL => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -731,11 +731,272 @@ public function setWhen(FHIROrderWhen $when = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_RESOURCE])) { + $v = $this->getReasonResource(); + foreach($validationRules[self::FIELD_REASON_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_REASON_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_RESOURCE])) { + $errs[self::FIELD_REASON_RESOURCE] = []; + } + $errs[self::FIELD_REASON_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN])) { + $v = $this->getWhen(); + foreach($validationRules[self::FIELD_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN])) { + $errs[self::FIELD_WHEN] = []; + } + $errs[self::FIELD_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponse.php index 58f0b19e51..25c95cdbb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -206,7 +206,7 @@ class FHIROrderResponse extends FHIRResource implements PHPFHIRContainedTypeInte * Validation map for fields in type OrderResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrderResponse Constructor @@ -746,11 +746,255 @@ public function setWho(FHIRResourceReference $who = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthorityCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthorityResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFulfillment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FULFILLMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getWho())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORITY_CODEABLE_CONCEPT])) { + $v = $this->getAuthorityCodeableConcept(); + foreach($validationRules[self::FIELD_AUTHORITY_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_AUTHORITY_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AUTHORITY_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AUTHORITY_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORITY_RESOURCE])) { + $v = $this->getAuthorityResource(); + foreach($validationRules[self::FIELD_AUTHORITY_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_AUTHORITY_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY_RESOURCE])) { + $errs[self::FIELD_AUTHORITY_RESOURCE] = []; + } + $errs[self::FIELD_AUTHORITY_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FULFILLMENT])) { + $v = $this->getFulfillment(); + foreach($validationRules[self::FIELD_FULFILLMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_FULFILLMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FULFILLMENT])) { + $errs[self::FIELD_FULFILLMENT] = []; + } + $errs[self::FIELD_FULFILLMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO])) { + $v = $this->getWho(); + foreach($validationRules[self::FIELD_WHO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_WHO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO])) { + $errs[self::FIELD_WHO] = []; + } + $errs[self::FIELD_WHO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganization.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganization.php index 7ae4979b3b..6bd3e07aed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -205,7 +205,7 @@ class FHIROrganization extends FHIRResource implements PHPFHIRContainedTypeInter * Validation map for fields in type Organization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrganization Constructor @@ -830,11 +830,261 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROther.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROther.php index 27c285654d..7385386b03 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROther.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROther.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIROther extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Other * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROther Constructor @@ -458,11 +458,185 @@ public function setSubject(FHIRResourceReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OTHER, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OTHER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OTHER, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OTHER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OTHER, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatient.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatient.php index ae9e10cb7b..5c21a17802 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -336,7 +336,7 @@ class FHIRPatient extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Patient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatient Constructor @@ -1582,11 +1582,439 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAnimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareProvider())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_PROVIDER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCommunication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDeceasedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaritalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MARITAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultipleBirthBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultipleBirthInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANIMAL])) { + $v = $this->getAnimal(); + foreach($validationRules[self::FIELD_ANIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ANIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANIMAL])) { + $errs[self::FIELD_ANIMAL] = []; + } + $errs[self::FIELD_ANIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_PROVIDER])) { + $v = $this->getCareProvider(); + foreach($validationRules[self::FIELD_CARE_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_CARE_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_PROVIDER])) { + $errs[self::FIELD_CARE_PROVIDER] = []; + } + $errs[self::FIELD_CARE_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION])) { + $v = $this->getCommunication(); + foreach($validationRules[self::FIELD_COMMUNICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_COMMUNICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION])) { + $errs[self::FIELD_COMMUNICATION] = []; + } + $errs[self::FIELD_COMMUNICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_BOOLEAN])) { + $v = $this->getDeceasedBoolean(); + foreach($validationRules[self::FIELD_DECEASED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_DECEASED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_BOOLEAN])) { + $errs[self::FIELD_DECEASED_BOOLEAN] = []; + } + $errs[self::FIELD_DECEASED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_DATE_TIME])) { + $v = $this->getDeceasedDateTime(); + foreach($validationRules[self::FIELD_DECEASED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_DECEASED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_DATE_TIME])) { + $errs[self::FIELD_DECEASED_DATE_TIME] = []; + } + $errs[self::FIELD_DECEASED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MARITAL_STATUS])) { + $v = $this->getMaritalStatus(); + foreach($validationRules[self::FIELD_MARITAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MARITAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MARITAL_STATUS])) { + $errs[self::FIELD_MARITAL_STATUS] = []; + } + $errs[self::FIELD_MARITAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $v = $this->getMultipleBirthBoolean(); + foreach($validationRules[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MULTIPLE_BIRTH_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = []; + } + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $v = $this->getMultipleBirthInteger(); + foreach($validationRules[self::FIELD_MULTIPLE_BIRTH_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MULTIPLE_BIRTH_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER] = []; + } + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitioner.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitioner.php index f8d1b4fcbc..73e10caecc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitioner.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitioner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -272,7 +272,7 @@ class FHIRPractitioner extends FHIRResource implements PHPFHIRContainedTypeInter * Validation map for fields in type Practitioner * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitioner Constructor @@ -1185,11 +1185,352 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCommunication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getQualification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUALIFICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION])) { + $v = $this->getCommunication(); + foreach($validationRules[self::FIELD_COMMUNICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_COMMUNICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION])) { + $errs[self::FIELD_COMMUNICATION] = []; + } + $errs[self::FIELD_COMMUNICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFICATION])) { + $v = $this->getQualification(); + foreach($validationRules[self::FIELD_QUALIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_QUALIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFICATION])) { + $errs[self::FIELD_QUALIFICATION] = []; + } + $errs[self::FIELD_QUALIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedure.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedure.php index 4447a65350..2fff030233 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -275,7 +275,7 @@ class FHIRProcedure extends FHIRResource implements PHPFHIRContainedTypeInterfac * Validation map for fields in type Procedure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedure Constructor @@ -1214,11 +1214,350 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getComplication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPLICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFollowUp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOLLOW_UP] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIndication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNotes())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTES] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelatedItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPORT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPLICATION])) { + $v = $this->getComplication(); + foreach($validationRules[self::FIELD_COMPLICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_COMPLICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPLICATION])) { + $errs[self::FIELD_COMPLICATION] = []; + } + $errs[self::FIELD_COMPLICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOLLOW_UP])) { + $v = $this->getFollowUp(); + foreach($validationRules[self::FIELD_FOLLOW_UP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_FOLLOW_UP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOLLOW_UP])) { + $errs[self::FIELD_FOLLOW_UP] = []; + } + $errs[self::FIELD_FOLLOW_UP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION])) { + $v = $this->getIndication(); + foreach($validationRules[self::FIELD_INDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_INDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION])) { + $errs[self::FIELD_INDICATION] = []; + } + $errs[self::FIELD_INDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ITEM])) { + $v = $this->getRelatedItem(); + foreach($validationRules[self::FIELD_RELATED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_RELATED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ITEM])) { + $errs[self::FIELD_RELATED_ITEM] = []; + } + $errs[self::FIELD_RELATED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORT])) { + $v = $this->getReport(); + foreach($validationRules[self::FIELD_REPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORT])) { + $errs[self::FIELD_REPORT] = []; + } + $errs[self::FIELD_REPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfile.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfile.php index 5301b68744..d0df3274a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfile.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfile.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -303,7 +303,7 @@ class FHIRProfile extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Profile * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProfile Constructor @@ -1415,11 +1415,382 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExtensionDefn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXTENSION_DEFN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFhirVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FHIR_VERSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMapping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getQuery())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUERY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStructure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRUCTURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION_DEFN])) { + $v = $this->getExtensionDefn(); + foreach($validationRules[self::FIELD_EXTENSION_DEFN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_EXTENSION_DEFN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION_DEFN])) { + $errs[self::FIELD_EXTENSION_DEFN] = []; + } + $errs[self::FIELD_EXTENSION_DEFN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAPPING])) { + $v = $this->getMapping(); + foreach($validationRules[self::FIELD_MAPPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_MAPPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAPPING])) { + $errs[self::FIELD_MAPPING] = []; + } + $errs[self::FIELD_MAPPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUERY])) { + $v = $this->getQuery(); + foreach($validationRules[self::FIELD_QUERY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_QUERY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUERY])) { + $errs[self::FIELD_QUERY] = []; + } + $errs[self::FIELD_QUERY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRUCTURE])) { + $v = $this->getStructure(); + foreach($validationRules[self::FIELD_STRUCTURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_STRUCTURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRUCTURE])) { + $errs[self::FIELD_STRUCTURE] = []; + } + $errs[self::FIELD_STRUCTURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROFILE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenance.php index bff794814b..a42c563ada 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -217,7 +217,7 @@ class FHIRProvenance extends FHIRResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Provenance * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_TARGET => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -863,11 +863,259 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEntity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntegritySignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTEGRITY_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POLICY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecorded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTEGRITY_SIGNATURE])) { + $v = $this->getIntegritySignature(); + foreach($validationRules[self::FIELD_INTEGRITY_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_INTEGRITY_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTEGRITY_SIGNATURE])) { + $errs[self::FIELD_INTEGRITY_SIGNATURE] = []; + } + $errs[self::FIELD_INTEGRITY_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY])) { + $v = $this->getPolicy(); + foreach($validationRules[self::FIELD_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY])) { + $errs[self::FIELD_POLICY] = []; + } + $errs[self::FIELD_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED])) { + $v = $this->getRecorded(); + foreach($validationRules[self::FIELD_RECORDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_RECORDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED])) { + $errs[self::FIELD_RECORDED] = []; + } + $errs[self::FIELD_RECORDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuery.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuery.php index 1d8b59f2b8..3b995d176d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuery.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRQuery extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Query * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PARAMETER => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -337,11 +337,151 @@ public function setResponse(FHIRQueryResponse $response = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaire.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaire.php index 4e63f8fc00..065415c1bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaire.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaire.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -213,7 +213,7 @@ class FHIRQuestionnaire extends FHIRResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Questionnaire * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaire Constructor @@ -701,11 +701,253 @@ public function setSubject(FHIRResourceReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthored())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED])) { + $v = $this->getAuthored(); + foreach($validationRules[self::FIELD_AUTHORED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_AUTHORED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED])) { + $errs[self::FIELD_AUTHORED] = []; + } + $errs[self::FIELD_AUTHORED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPerson.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPerson.php index e037a5f0dc..f8df0b6bb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -191,7 +191,7 @@ class FHIRRelatedPerson extends FHIRResource implements PHPFHIRContainedTypeInte * Validation map for fields in type RelatedPerson * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRelatedPerson Constructor @@ -658,11 +658,240 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEvent.php index 6c1edcb788..8628cf8556 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRSecurityEvent extends FHIRResource implements PHPFHIRContainedTypeInte * Validation map for fields in type SecurityEvent * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PARTICIPANT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -410,11 +410,170 @@ public function setSource(FHIRSecurityEventSource $source = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getObject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OBJECT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OBJECT])) { + $v = $this->getObject(); + foreach($validationRules[self::FIELD_OBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT, self::FIELD_OBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBJECT])) { + $errs[self::FIELD_OBJECT] = []; + } + $errs[self::FIELD_OBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimen.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimen.php index 15ca66c8da..240ce67b41 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimen.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -197,7 +197,7 @@ class FHIRSpecimen extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Specimen * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimen Constructor @@ -744,11 +744,259 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccessionIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCESSION_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollection())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContainer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReceivedTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVED_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTreatment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TREATMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCESSION_IDENTIFIER])) { + $v = $this->getAccessionIdentifier(); + foreach($validationRules[self::FIELD_ACCESSION_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_ACCESSION_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCESSION_IDENTIFIER])) { + $errs[self::FIELD_ACCESSION_IDENTIFIER] = []; + } + $errs[self::FIELD_ACCESSION_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTION])) { + $v = $this->getCollection(); + foreach($validationRules[self::FIELD_COLLECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_COLLECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTION])) { + $errs[self::FIELD_COLLECTION] = []; + } + $errs[self::FIELD_COLLECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINER])) { + $v = $this->getContainer(); + foreach($validationRules[self::FIELD_CONTAINER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_CONTAINER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINER])) { + $errs[self::FIELD_CONTAINER] = []; + } + $errs[self::FIELD_CONTAINER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVED_TIME])) { + $v = $this->getReceivedTime(); + foreach($validationRules[self::FIELD_RECEIVED_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_RECEIVED_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVED_TIME])) { + $errs[self::FIELD_RECEIVED_TIME] = []; + } + $errs[self::FIELD_RECEIVED_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TREATMENT])) { + $v = $this->getTreatment(); + foreach($validationRules[self::FIELD_TREATMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_TREATMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TREATMENT])) { + $errs[self::FIELD_TREATMENT] = []; + } + $errs[self::FIELD_TREATMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstance.php index e055400edc..44f6a96254 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRSubstance extends FHIRResource implements PHPFHIRContainedTypeInterfac * Validation map for fields in type Substance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstance Constructor @@ -384,11 +384,168 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupply.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupply.php index cba1c3bffd..cf93c0a1bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupply.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupply.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -159,7 +159,7 @@ class FHIRSupply extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Supply * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupply Constructor @@ -482,11 +482,202 @@ public function setStatus(FHIRSupplyStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDispense())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DISPENSE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderedItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISPENSE])) { + $v = $this->getDispense(); + foreach($validationRules[self::FIELD_DISPENSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY, self::FIELD_DISPENSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSE])) { + $errs[self::FIELD_DISPENSE] = []; + } + $errs[self::FIELD_DISPENSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_ITEM])) { + $v = $this->getOrderedItem(); + foreach($validationRules[self::FIELD_ORDERED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY, self::FIELD_ORDERED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_ITEM])) { + $errs[self::FIELD_ORDERED_ITEM] = []; + } + $errs[self::FIELD_ORDERED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSet.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSet.php index 5ca0184f2c..b271702955 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSet.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -263,7 +263,7 @@ class FHIRValueSet extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type ValueSet * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSet Constructor @@ -1093,11 +1093,338 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCompose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefine())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpansion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPANSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExtensible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXTENSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPOSE])) { + $v = $this->getCompose(); + foreach($validationRules[self::FIELD_COMPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_COMPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPOSE])) { + $errs[self::FIELD_COMPOSE] = []; + } + $errs[self::FIELD_COMPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINE])) { + $v = $this->getDefine(); + foreach($validationRules[self::FIELD_DEFINE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_DEFINE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINE])) { + $errs[self::FIELD_DEFINE] = []; + } + $errs[self::FIELD_DEFINE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPANSION])) { + $v = $this->getExpansion(); + foreach($validationRules[self::FIELD_EXPANSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXPANSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPANSION])) { + $errs[self::FIELD_EXPANSION] = []; + } + $errs[self::FIELD_EXPANSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSIBLE])) { + $v = $this->getExtensible(); + foreach($validationRules[self::FIELD_EXTENSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXTENSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSIBLE])) { + $errs[self::FIELD_EXTENSIBLE] = []; + } + $errs[self::FIELD_EXTENSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetail.php index f80d744430..cd79f81162 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRSecurityEventDetail extends FHIRBackboneElement * Validation map for fields in type SecurityEvent.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventDetail Constructor @@ -266,11 +266,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_DETAIL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEvent.php index 0a80973507..ab2dff304a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -162,7 +162,7 @@ class FHIRSecurityEventEvent extends FHIRBackboneElement * Validation map for fields in type SecurityEvent.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventEvent Constructor @@ -543,11 +543,166 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcomeDesc())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME_DESC] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubtype())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBTYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_EVENT, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_EVENT, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_EVENT, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_DESC])) { + $v = $this->getOutcomeDesc(); + foreach($validationRules[self::FIELD_OUTCOME_DESC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_EVENT, self::FIELD_OUTCOME_DESC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_DESC])) { + $errs[self::FIELD_OUTCOME_DESC] = []; + } + $errs[self::FIELD_OUTCOME_DESC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTYPE])) { + $v = $this->getSubtype(); + foreach($validationRules[self::FIELD_SUBTYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_EVENT, self::FIELD_SUBTYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTYPE])) { + $errs[self::FIELD_SUBTYPE] = []; + } + $errs[self::FIELD_SUBTYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_EVENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetwork.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetwork.php index d02bec3a10..3c35316ef0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetwork.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetwork.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRSecurityEventNetwork extends FHIRBackboneElement * Validation map for fields in type SecurityEvent.Network * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventNetwork Constructor @@ -264,11 +264,96 @@ public function setType(FHIRSecurityEventParticipantNetworkType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_NETWORK, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_NETWORK, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObject.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObject.php index 0867b9a2d9..b7365ac492 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObject.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObject.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -216,7 +216,7 @@ class FHIRSecurityEventObject extends FHIRBackboneElement * Validation map for fields in type SecurityEvent.Object * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventObject Constructor @@ -786,11 +786,234 @@ public function setType(FHIRSecurityEventObjectType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getLifecycle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIFECYCLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuery())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUERY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSensitivity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENSITIVITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_OBJECT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_OBJECT, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_OBJECT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIFECYCLE])) { + $v = $this->getLifecycle(); + foreach($validationRules[self::FIELD_LIFECYCLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_OBJECT, self::FIELD_LIFECYCLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIFECYCLE])) { + $errs[self::FIELD_LIFECYCLE] = []; + } + $errs[self::FIELD_LIFECYCLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_OBJECT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUERY])) { + $v = $this->getQuery(); + foreach($validationRules[self::FIELD_QUERY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_OBJECT, self::FIELD_QUERY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUERY])) { + $errs[self::FIELD_QUERY] = []; + } + $errs[self::FIELD_QUERY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_OBJECT, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_OBJECT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENSITIVITY])) { + $v = $this->getSensitivity(); + foreach($validationRules[self::FIELD_SENSITIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_OBJECT, self::FIELD_SENSITIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENSITIVITY])) { + $errs[self::FIELD_SENSITIVITY] = []; + } + $errs[self::FIELD_SENSITIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_OBJECT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipant.php index fc7a862161..dfc658bc53 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -190,7 +190,7 @@ class FHIRSecurityEventParticipant extends FHIRBackboneElement * Validation map for fields in type SecurityEvent.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventParticipant Constructor @@ -671,11 +671,200 @@ public function setUserId($userId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAltId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALT_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedia())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUserId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USER_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALT_ID])) { + $v = $this->getAltId(); + foreach($validationRules[self::FIELD_ALT_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_PARTICIPANT, self::FIELD_ALT_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALT_ID])) { + $errs[self::FIELD_ALT_ID] = []; + } + $errs[self::FIELD_ALT_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIA])) { + $v = $this->getMedia(); + foreach($validationRules[self::FIELD_MEDIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_PARTICIPANT, self::FIELD_MEDIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIA])) { + $errs[self::FIELD_MEDIA] = []; + } + $errs[self::FIELD_MEDIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_PARTICIPANT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_PARTICIPANT, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_PARTICIPANT, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTOR])) { + $v = $this->getRequestor(); + foreach($validationRules[self::FIELD_REQUESTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_PARTICIPANT, self::FIELD_REQUESTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTOR])) { + $errs[self::FIELD_REQUESTOR] = []; + } + $errs[self::FIELD_REQUESTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USER_ID])) { + $v = $this->getUserId(); + foreach($validationRules[self::FIELD_USER_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_PARTICIPANT, self::FIELD_USER_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USER_ID])) { + $errs[self::FIELD_USER_ID] = []; + } + $errs[self::FIELD_USER_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSource.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSource.php index 994b904487..7eb2a85149 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRSecurityEventSource extends FHIRBackboneElement * Validation map for fields in type SecurityEvent.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventSource Constructor @@ -352,11 +352,115 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_SOURCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_SOURCE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_DOT_SOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php index 1fec509441..ed14f902d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -181,7 +181,7 @@ class FHIRSpecimenCollection extends FHIRBackboneElement * Validation map for fields in type Specimen.Collection * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenCollection Constructor @@ -590,11 +590,183 @@ public function setSourceSite(FHIRCodeableConcept $sourceSite = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCollectedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollectedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollector())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_SITE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COLLECTED_DATE_TIME])) { + $v = $this->getCollectedDateTime(); + foreach($validationRules[self::FIELD_COLLECTED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTED_DATE_TIME])) { + $errs[self::FIELD_COLLECTED_DATE_TIME] = []; + } + $errs[self::FIELD_COLLECTED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTED_PERIOD])) { + $v = $this->getCollectedPeriod(); + foreach($validationRules[self::FIELD_COLLECTED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTED_PERIOD])) { + $errs[self::FIELD_COLLECTED_PERIOD] = []; + } + $errs[self::FIELD_COLLECTED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTOR])) { + $v = $this->getCollector(); + foreach($validationRules[self::FIELD_COLLECTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTOR])) { + $errs[self::FIELD_COLLECTOR] = []; + } + $errs[self::FIELD_COLLECTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_SITE])) { + $v = $this->getSourceSite(); + foreach($validationRules[self::FIELD_SOURCE_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_SOURCE_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_SITE])) { + $errs[self::FIELD_SOURCE_SITE] = []; + } + $errs[self::FIELD_SOURCE_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php index 78d09e5015..baba48507c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -164,7 +164,7 @@ class FHIRSpecimenContainer extends FHIRBackboneElement * Validation map for fields in type Specimen.Container * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenContainer Constructor @@ -504,11 +504,166 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCapacity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAPACITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecimenQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE])) { + $v = $this->getAdditive(); + foreach($validationRules[self::FIELD_ADDITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_ADDITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE])) { + $errs[self::FIELD_ADDITIVE] = []; + } + $errs[self::FIELD_ADDITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAPACITY])) { + $v = $this->getCapacity(); + foreach($validationRules[self::FIELD_CAPACITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_CAPACITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPACITY])) { + $errs[self::FIELD_CAPACITY] = []; + } + $errs[self::FIELD_CAPACITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN_QUANTITY])) { + $v = $this->getSpecimenQuantity(); + foreach($validationRules[self::FIELD_SPECIMEN_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_SPECIMEN_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN_QUANTITY])) { + $errs[self::FIELD_SPECIMEN_QUANTITY] = []; + } + $errs[self::FIELD_SPECIMEN_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSource.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSource.php index 76d85640b9..d871c436fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRSpecimenSource extends FHIRBackboneElement * Validation map for fields in type Specimen.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenSource Constructor @@ -271,11 +271,98 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_SOURCE, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_SOURCE, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php index ac3781d7ea..b1fd2f2a3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRSpecimenTreatment extends FHIRBackboneElement * Validation map for fields in type Specimen.Treatment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenTreatment Constructor @@ -332,11 +332,115 @@ public function setProcedure(FHIRCodeableConcept $procedure = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdditive())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIVE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE])) { + $v = $this->getAdditive(); + foreach($validationRules[self::FIELD_ADDITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_TREATMENT, self::FIELD_ADDITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE])) { + $errs[self::FIELD_ADDITIVE] = []; + } + $errs[self::FIELD_ADDITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_TREATMENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_TREATMENT, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php index cc0067ca45..497dddeb69 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRSubstanceIngredient extends FHIRBackboneElement * Validation map for fields in type Substance.Ingredient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceIngredient Constructor @@ -223,11 +223,96 @@ public function setSubstance(FHIRResourceReference $substance = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INGREDIENT, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INGREDIENT, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php index 517705e20e..13f2908a6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRSubstanceInstance extends FHIRBackboneElement * Validation map for fields in type Substance.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceInstance Constructor @@ -313,11 +313,113 @@ public function setQuantity(FHIRQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpiry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRY] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPIRY])) { + $v = $this->getExpiry(); + foreach($validationRules[self::FIELD_EXPIRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_EXPIRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRY])) { + $errs[self::FIELD_EXPIRY] = []; + } + $errs[self::FIELD_EXPIRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispense.php index eefb6d8c2c..b17c582242 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -213,7 +213,7 @@ class FHIRSupplyDispense extends FHIRBackboneElement * Validation map for fields in type Supply.Dispense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyDispense Constructor @@ -691,11 +691,234 @@ public function setWhenPrepared(FHIRPeriod $whenPrepared = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReceiver())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECEIVER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSuppliedItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLIED_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenHandedOver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_HANDED_OVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenPrepared())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_PREPARED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DOT_DISPENSE, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DOT_DISPENSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DOT_DISPENSE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DOT_DISPENSE, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DOT_DISPENSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIED_ITEM])) { + $v = $this->getSuppliedItem(); + foreach($validationRules[self::FIELD_SUPPLIED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DOT_DISPENSE, self::FIELD_SUPPLIED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIED_ITEM])) { + $errs[self::FIELD_SUPPLIED_ITEM] = []; + } + $errs[self::FIELD_SUPPLIED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIER])) { + $v = $this->getSupplier(); + foreach($validationRules[self::FIELD_SUPPLIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DOT_DISPENSE, self::FIELD_SUPPLIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIER])) { + $errs[self::FIELD_SUPPLIER] = []; + } + $errs[self::FIELD_SUPPLIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DOT_DISPENSE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_HANDED_OVER])) { + $v = $this->getWhenHandedOver(); + foreach($validationRules[self::FIELD_WHEN_HANDED_OVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DOT_DISPENSE, self::FIELD_WHEN_HANDED_OVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_HANDED_OVER])) { + $errs[self::FIELD_WHEN_HANDED_OVER] = []; + } + $errs[self::FIELD_WHEN_HANDED_OVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_PREPARED])) { + $v = $this->getWhenPrepared(); + foreach($validationRules[self::FIELD_WHEN_PREPARED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DOT_DISPENSE, self::FIELD_WHEN_PREPARED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_PREPARED])) { + $errs[self::FIELD_WHEN_PREPARED] = []; + } + $errs[self::FIELD_WHEN_PREPARED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php index 1b51661a6f..85bfc31c03 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRValueSetCompose extends FHIRBackboneElement * Validation map for fields in type ValueSet.Compose * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetCompose Constructor @@ -392,11 +392,119 @@ public function setInclude(array $include = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getExclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPORT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INCLUDE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPORT])) { + $v = $this->getImport(); + foreach($validationRules[self::FIELD_IMPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_IMPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPORT])) { + $errs[self::FIELD_IMPORT] = []; + } + $errs[self::FIELD_IMPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCLUDE])) { + $v = $this->getInclude(); + foreach($validationRules[self::FIELD_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCLUDE])) { + $errs[self::FIELD_INCLUDE] = []; + } + $errs[self::FIELD_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php index 7528b70227..7bec70494e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRValueSetConcept extends FHIRBackboneElement * Validation map for fields in type ValueSet.Concept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetConcept Constructor @@ -500,11 +500,149 @@ public function setDisplay($display = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbstract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABSTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABSTRACT])) { + $v = $this->getAbstract(); + foreach($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_ABSTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABSTRACT])) { + $errs[self::FIELD_ABSTRACT] = []; + } + $errs[self::FIELD_ABSTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php index b874d4b8c2..26a4ebaffc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRValueSetContains extends FHIRBackboneElement * Validation map for fields in type ValueSet.Contains * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetContains Constructor @@ -420,11 +420,132 @@ public function setSystem($system = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContains())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINS])) { + $v = $this->getContains(); + foreach($validationRules[self::FIELD_CONTAINS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_CONTAINS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINS])) { + $errs[self::FIELD_CONTAINS] = []; + } + $errs[self::FIELD_CONTAINS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefine.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefine.php index 438ba20540..dca47f85a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefine.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefine.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRValueSetDefine extends FHIRBackboneElement * Validation map for fields in type ValueSet.Define * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetDefine Constructor @@ -429,11 +429,132 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCaseSensitive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CASE_SENSITIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CASE_SENSITIVE])) { + $v = $this->getCaseSensitive(); + foreach($validationRules[self::FIELD_CASE_SENSITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DEFINE, self::FIELD_CASE_SENSITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CASE_SENSITIVE])) { + $errs[self::FIELD_CASE_SENSITIVE] = []; + } + $errs[self::FIELD_CASE_SENSITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DEFINE, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DEFINE, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DEFINE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php index afda2be5f9..7a9230317a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRValueSetExpansion extends FHIRBackboneElement * Validation map for fields in type ValueSet.Expansion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetExpansion Constructor @@ -326,11 +326,115 @@ public function setTimestamp($timestamp = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContains())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimestamp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMESTAMP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTAINS])) { + $v = $this->getContains(); + foreach($validationRules[self::FIELD_CONTAINS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_CONTAINS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINS])) { + $errs[self::FIELD_CONTAINS] = []; + } + $errs[self::FIELD_CONTAINS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMESTAMP])) { + $v = $this->getTimestamp(); + foreach($validationRules[self::FIELD_TIMESTAMP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_TIMESTAMP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMESTAMP])) { + $errs[self::FIELD_TIMESTAMP] = []; + } + $errs[self::FIELD_TIMESTAMP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php index 38cb5049ff..d5c43321b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRValueSetFilter extends FHIRBackboneElement * Validation map for fields in type ValueSet.Filter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetFilter Constructor @@ -342,11 +342,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OP] = $fieldErrs; + } + } + if (null !== ($v = $this->getProperty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROPERTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OP])) { + $v = $this->getOp(); + foreach($validationRules[self::FIELD_OP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_OP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OP])) { + $errs[self::FIELD_OP] = []; + } + $errs[self::FIELD_OP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php index c630c15d08..cac9a302ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRValueSetInclude extends FHIRBackboneElement * Validation map for fields in type ValueSet.Include * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetInclude Constructor @@ -474,11 +474,134 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FILTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FILTER])) { + $v = $this->getFilter(); + foreach($validationRules[self::FIELD_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FILTER])) { + $errs[self::FIELD_FILTER] = []; + } + $errs[self::FIELD_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBase64Binary.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBase64Binary.php index 6a1353e63e..94bb29aa9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBase64Binary.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBase64Binary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRBase64Binary extends FHIRElement * Validation map for fields in type base64Binary * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBase64Binary Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASE_64BINARY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBindingConformance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBindingConformance.php index c205b35254..ef045332ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBindingConformance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBindingConformance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRBindingConformance extends FHIRElement * Validation map for fields in type BindingConformance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBindingConformance Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINDING_CONFORMANCE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBoolean.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBoolean.php index c099cb2bcd..faa1e988c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBoolean.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBoolean.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRBoolean extends FHIRElement * Validation map for fields in type boolean * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBoolean Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BOOLEAN, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityCategory.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityCategory.php index ced2ad024c..128cfac094 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCarePlanActivityCategory extends FHIRElement * Validation map for fields in type CarePlanActivityCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanActivityCategory Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityStatus.php index fa5e831640..2e89fd8429 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCarePlanActivityStatus extends FHIRElement * Validation map for fields in type CarePlanActivityStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanActivityStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanGoalStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanGoalStatus.php index 77a5315562..6b7ca7a17f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanGoalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanGoalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCarePlanGoalStatus extends FHIRElement * Validation map for fields in type CarePlanGoalStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanGoalStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_GOAL_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanStatus.php index abe8569df2..9bb4ee5809 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRCarePlanStatus extends FHIRElement * Validation map for fields in type CarePlanStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanStatus Constructor @@ -162,11 +162,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCausalityExpectation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCausalityExpectation.php index 722255a5f9..46817d4e40 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCausalityExpectation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCausalityExpectation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCausalityExpectation extends FHIRElement * Validation map for fields in type CausalityExpectation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCausalityExpectation Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAUSALITY_EXPECTATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCode.php index 3ba849fc54..bff49aa22d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRCode extends FHIRElement * Validation map for fields in type code * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCode Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCodeableConcept.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCodeableConcept.php index 80ce24512a..fd0dc6335f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCodeableConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCodeableConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRCodeableConcept extends FHIRElement * Validation map for fields in type CodeableConcept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeableConcept Constructor @@ -286,11 +286,86 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCoding())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODING])) { + $v = $this->getCoding(); + foreach($validationRules[self::FIELD_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODEABLE_CONCEPT, self::FIELD_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODING])) { + $errs[self::FIELD_CODING] = []; + } + $errs[self::FIELD_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODEABLE_CONCEPT, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCoding.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCoding.php index 82c4a7cc16..0f5bd656b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCoding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCoding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -163,7 +163,7 @@ class FHIRCoding extends FHIRElement * Validation map for fields in type Coding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoding Constructor @@ -556,11 +556,152 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrimary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIMARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIMARY])) { + $v = $this->getPrimary(); + foreach($validationRules[self::FIELD_PRIMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_PRIMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIMARY])) { + $errs[self::FIELD_PRIMARY] = []; + } + $errs[self::FIELD_PRIMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET])) { + $v = $this->getValueSet(); + foreach($validationRules[self::FIELD_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET])) { + $errs[self::FIELD_VALUE_SET] = []; + } + $errs[self::FIELD_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionAttestationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionAttestationMode.php index 42dd81be80..9bf4e6c0a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionAttestationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionAttestationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCompositionAttestationMode extends FHIRElement * Validation map for fields in type CompositionAttestationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionAttestationMode Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionStatus.php index 3a251ef216..ec86521e07 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCompositionStatus extends FHIRElement * Validation map for fields in type CompositionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConceptMapEquivalence.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConceptMapEquivalence.php index 85cbde79f7..0b612fa1bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConceptMapEquivalence.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConceptMapEquivalence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRConceptMapEquivalence extends FHIRElement * Validation map for fields in type ConceptMapEquivalence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapEquivalence Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionRelationshipType.php index b9adaa1575..cbb7d1a526 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRConditionRelationshipType extends FHIRElement * Validation map for fields in type ConditionRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionRelationshipType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionStatus.php index eb0589cc5a..d6f3488b9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRConditionStatus extends FHIRElement * Validation map for fields in type ConditionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceEventMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceEventMode.php index dd4a0a7e22..7f6bb6ec57 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceEventMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceEventMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRConformanceEventMode extends FHIRElement * Validation map for fields in type ConformanceEventMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceEventMode Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_EVENT_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceStatementStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceStatementStatus.php index 53eee6ad3a..7c0434fb6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceStatementStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceStatementStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRConformanceStatementStatus extends FHIRElement * Validation map for fields in type ConformanceStatementStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceStatementStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_STATEMENT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConstraintSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConstraintSeverity.php index e65f8fa237..7e818afa49 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConstraintSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConstraintSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRConstraintSeverity extends FHIRElement * Validation map for fields in type ConstraintSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConstraintSeverity Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContact.php index 920898a351..d8ca33fe7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRContact extends FHIRElement * Validation map for fields in type Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContact Constructor @@ -375,11 +375,118 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactSystem.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactSystem.php index c90aceb0f9..ec75b8dd5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRContactSystem extends FHIRElement * Validation map for fields in type ContactSystem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactSystem Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_SYSTEM, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactUse.php index af67855e30..b8b2eff5c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRContactUse extends FHIRElement * Validation map for fields in type ContactUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactUse Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCriticality.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCriticality.php index 649f0cfd8a..e101354774 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCriticality.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCriticality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCriticality extends FHIRElement * Validation map for fields in type Criticality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCriticality Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CRITICALITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDate.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDate.php index 8bd03953d2..683ead2f9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDate.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRDate extends FHIRElement * Validation map for fields in type date * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDate Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDateTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDateTime.php index c4aba1927e..00edf73088 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDateTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDateTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRDateTime extends FHIRElement * Validation map for fields in type dateTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDateTime Constructor @@ -168,11 +168,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal.php index 7bc68b4e33..c0a3dc2186 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDecimal extends FHIRElement * Validation map for fields in type decimal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDecimal Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DECIMAL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal/FHIRScore.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal/FHIRScore.php index 01b507511b..7207f1f1a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal/FHIRScore.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal/FHIRScore.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRScore extends FHIRDecimal * Validation map for fields in type score * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRScore Constructor @@ -131,11 +131,62 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DECIMAL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderPriority.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderPriority.php index 1436665d46..d648edb2d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDiagnosticOrderPriority extends FHIRElement * Validation map for fields in type DiagnosticOrderPriority * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticOrderPriority Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_PRIORITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderStatus.php index edc0dc8af4..7e324ded04 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDiagnosticOrderStatus extends FHIRElement * Validation map for fields in type DiagnosticOrderStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticOrderStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticReportStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticReportStatus.php index 0f60bde0c8..6ed2e7cab5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDiagnosticReportStatus extends FHIRElement * Validation map for fields in type DiagnosticReportStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReportStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentMode.php index 092bfedef8..3b3431a7fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDocumentMode extends FHIRElement * Validation map for fields in type DocumentMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentMode Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentReferenceStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentReferenceStatus.php index 7161fd7549..b1dff90c02 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentReferenceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentReferenceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDocumentReferenceStatus extends FHIRElement * Validation map for fields in type DocumentReferenceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceStatus Constructor @@ -160,11 +160,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentRelationshipType.php index 4e95a8c895..0fab685bce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDocumentRelationshipType extends FHIRElement * Validation map for fields in type DocumentRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentRelationshipType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterClass.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterClass.php index 5861c4144e..e4b71cdd6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterClass.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterClass.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIREncounterClass extends FHIRElement * Validation map for fields in type EncounterClass * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterClass Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_CLASS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterState.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterState.php index a5d690be56..72c966d272 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterState.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIREncounterState extends FHIRElement * Validation map for fields in type EncounterState * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterState Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREventTiming.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREventTiming.php index 37c4b40d9a..df8e6f4bf5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREventTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREventTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIREventTiming extends FHIRElement * Validation map for fields in type EventTiming * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREventTiming Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_TIMING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExposureType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExposureType.php index b43f5f1c51..535ad3bf52 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExposureType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExposureType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRExposureType extends FHIRElement * Validation map for fields in type ExposureType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExposureType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPOSURE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtension.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtension.php index e2f3d8e80f..6c86c876a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtension.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtension.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -415,7 +415,7 @@ class FHIRExtension extends FHIRElement * Validation map for fields in type Extension * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExtension Constructor @@ -1671,11 +1671,475 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SCHEDULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT])) { + $v = $this->getValueContact(); + foreach($validationRules[self::FIELD_VALUE_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT])) { + $errs[self::FIELD_VALUE_CONTACT] = []; + } + $errs[self::FIELD_VALUE_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RESOURCE])) { + $v = $this->getValueResource(); + foreach($validationRules[self::FIELD_VALUE_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RESOURCE])) { + $errs[self::FIELD_VALUE_RESOURCE] = []; + } + $errs[self::FIELD_VALUE_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SCHEDULE])) { + $v = $this->getValueSchedule(); + foreach($validationRules[self::FIELD_VALUE_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SCHEDULE])) { + $errs[self::FIELD_VALUE_SCHEDULE] = []; + } + $errs[self::FIELD_VALUE_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtensionContext.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtensionContext.php index f8d5728164..f65866f707 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtensionContext.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtensionContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRExtensionContext extends FHIRElement * Validation map for fields in type ExtensionContext * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExtensionContext Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRFilterOperator.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRFilterOperator.php index bc9c8c2cf5..1af6e7e1ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRFilterOperator.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRFilterOperator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRFilterOperator extends FHIRElement * Validation map for fields in type FilterOperator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFilterOperator Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRGroupType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRGroupType.php index 077307de61..c218c39851 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRGroupType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRGroupType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRGroupType extends FHIRElement * Validation map for fields in type GroupType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHierarchicalRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHierarchicalRelationshipType.php index 3a213ca54e..4dc2ba7d19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHierarchicalRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHierarchicalRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRHierarchicalRelationshipType extends FHIRElement * Validation map for fields in type HierarchicalRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHierarchicalRelationshipType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HIERARCHICAL_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHumanName.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHumanName.php index 460b682c66..602f9ed457 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHumanName.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHumanName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRHumanName extends FHIRElement * Validation map for fields in type HumanName * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHumanName Constructor @@ -761,11 +761,177 @@ public function setUse(FHIRNameUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getFamily())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FAMILY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GIVEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrefix())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PREFIX, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSuffix())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUFFIX, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FAMILY])) { + $v = $this->getFamily(); + foreach($validationRules[self::FIELD_FAMILY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_FAMILY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FAMILY])) { + $errs[self::FIELD_FAMILY] = []; + } + $errs[self::FIELD_FAMILY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GIVEN])) { + $v = $this->getGiven(); + foreach($validationRules[self::FIELD_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GIVEN])) { + $errs[self::FIELD_GIVEN] = []; + } + $errs[self::FIELD_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFIX])) { + $v = $this->getPrefix(); + foreach($validationRules[self::FIELD_PREFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_PREFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFIX])) { + $errs[self::FIELD_PREFIX] = []; + } + $errs[self::FIELD_PREFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUFFIX])) { + $v = $this->getSuffix(); + foreach($validationRules[self::FIELD_SUFFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_SUFFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUFFIX])) { + $errs[self::FIELD_SUFFIX] = []; + } + $errs[self::FIELD_SUFFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRId.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRId.php index afe8eca017..11afe20671 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRId.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRId extends FHIRElement * Validation map for fields in type id * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRId Constructor @@ -168,11 +168,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifier.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifier.php index 68a2515f85..ddf61178b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRIdentifier extends FHIRElement * Validation map for fields in type Identifier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentifier Constructor @@ -502,11 +502,152 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssigner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSIGNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSIGNER])) { + $v = $this->getAssigner(); + foreach($validationRules[self::FIELD_ASSIGNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_ASSIGNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSIGNER])) { + $errs[self::FIELD_ASSIGNER] = []; + } + $errs[self::FIELD_ASSIGNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifierUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifierUse.php index 0c320ee571..c935211175 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifierUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifierUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRIdentifierUse extends FHIRElement * Validation map for fields in type IdentifierUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentifierUse Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRImagingModality.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRImagingModality.php index 9e73d5e29d..f56e8b9ee3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRImagingModality.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRImagingModality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRImagingModality extends FHIRElement * Validation map for fields in type ImagingModality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingModality Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MODALITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstanceAvailability.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstanceAvailability.php index 0c0ad8fe29..4c4e919231 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstanceAvailability.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstanceAvailability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRInstanceAvailability extends FHIRElement * Validation map for fields in type InstanceAvailability * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInstanceAvailability Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANCE_AVAILABILITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstant.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstant.php index c849e57795..471d400755 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRInstant extends FHIRElement * Validation map for fields in type instant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInstant Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger.php index 30712847e0..6dd3fdd334 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRInteger extends FHIRElement * Validation map for fields in type integer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInteger Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INTEGER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger/FHIRTotalResults.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger/FHIRTotalResults.php index 1d16ae0560..be62d108d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger/FHIRTotalResults.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger/FHIRTotalResults.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTotalResults extends FHIRInteger * Validation map for fields in type totalResults * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTotalResults Constructor @@ -125,11 +125,62 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INTEGER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIssueSeverity.php index d0a9ac3d19..9370440b3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRIssueSeverity extends FHIRElement * Validation map for fields in type IssueSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIssueSeverity Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLinkType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLinkType.php index 5350b41111..90501e63ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLinkType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLinkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRLinkType extends FHIRElement * Validation map for fields in type LinkType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLinkType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINK_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRListMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRListMode.php index 33095fb05c..0f312d5345 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRListMode extends FHIRElement * Validation map for fields in type ListMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListMode Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationMode.php index 20302a1e3c..36ef3900d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRLocationMode extends FHIRElement * Validation map for fields in type LocationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationMode Constructor @@ -162,11 +162,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationStatus.php index d5e5bb8a2d..5b8e3212ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRLocationStatus extends FHIRElement * Validation map for fields in type LocationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMediaType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMediaType.php index 9714dcefcf..87e6c8c8eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMediaType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMediaType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMediaType extends FHIRElement * Validation map for fields in type MediaType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMediaType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationAdministrationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationAdministrationStatus.php index a58e88a03e..577d131e8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationAdministrationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationAdministrationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMedicationAdministrationStatus extends FHIRElement * Validation map for fields in type MedicationAdministrationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministrationStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationDispenseStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationDispenseStatus.php index 7df0f02709..74a8df53b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationDispenseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationDispenseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMedicationDispenseStatus extends FHIRElement * Validation map for fields in type MedicationDispenseStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispenseStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationKind.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationKind.php index 7e672e980c..440b4919ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationKind.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMedicationKind extends FHIRElement * Validation map for fields in type MedicationKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKind Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationPrescriptionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationPrescriptionStatus.php index a4b0bdb55e..d0cd18e27c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationPrescriptionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationPrescriptionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRMedicationPrescriptionStatus extends FHIRElement * Validation map for fields in type MedicationPrescriptionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationPrescriptionStatus Constructor @@ -162,11 +162,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMessageSignificanceCategory.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMessageSignificanceCategory.php index 1f9f94a83d..7ead637a02 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMessageSignificanceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMessageSignificanceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMessageSignificanceCategory extends FHIRElement * Validation map for fields in type MessageSignificanceCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageSignificanceCategory Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRModality.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRModality.php index a1662533fb..53a13427b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRModality.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRModality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRModality extends FHIRElement * Validation map for fields in type Modality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRModality Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MODALITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNameUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNameUse.php index f88fa555b5..00c8feb758 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNameUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNameUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRNameUse extends FHIRElement * Validation map for fields in type NameUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNameUse Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAME_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrative.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrative.php index dcbee56afa..1684208871 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrative.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrative.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRNarrative extends FHIRElement * Validation map for fields in type Narrative * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNarrative Constructor @@ -233,11 +233,84 @@ public function setStatus(FHIRNarrativeStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiv())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIV] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DIV])) { + $v = $this->getDiv(); + foreach($validationRules[self::FIELD_DIV] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE, self::FIELD_DIV, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIV])) { + $errs[self::FIELD_DIV] = []; + } + $errs[self::FIELD_DIV][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrativeStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrativeStatus.php index 3d40897a4a..bad61f9301 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrativeStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrativeStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRNarrativeStatus extends FHIRElement * Validation map for fields in type NarrativeStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNarrativeStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationRelationshipType.php index edda5a429a..992d4f8018 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRObservationRelationshipType extends FHIRElement * Validation map for fields in type ObservationRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationRelationshipType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationReliability.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationReliability.php index 4491825f2e..0946363def 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationReliability.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationReliability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRObservationReliability extends FHIRElement * Validation map for fields in type ObservationReliability * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationReliability Constructor @@ -162,11 +162,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELIABILITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationStatus.php index e56d94607c..2d3d9743cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRObservationStatus extends FHIRElement * Validation map for fields in type ObservationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROid.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROid.php index f75b35f116..4bfd17a7cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROid.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIROid extends FHIRElement * Validation map for fields in type oid * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROid Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROrderOutcomeStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROrderOutcomeStatus.php index c7bbfc9753..9685a5b911 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROrderOutcomeStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROrderOutcomeStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIROrderOutcomeStatus extends FHIRElement * Validation map for fields in type OrderOutcomeStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrderOutcomeStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_OUTCOME_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPeriod.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPeriod.php index ad22a655d7..896595ce34 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPeriod.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPeriod.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRPeriod extends FHIRElement * Validation map for fields in type Period * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPeriod Constructor @@ -285,11 +285,84 @@ public function setStart($start = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERIOD, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERIOD, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProcedureRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProcedureRelationshipType.php index 0c36b25337..07c8bcc15a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProcedureRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProcedureRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRProcedureRelationshipType extends FHIRElement * Validation map for fields in type ProcedureRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureRelationshipType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPropertyRepresentation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPropertyRepresentation.php index dbd32651c7..a487571797 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPropertyRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPropertyRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRPropertyRepresentation extends FHIRElement * Validation map for fields in type PropertyRepresentation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPropertyRepresentation Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProvenanceEntityRole.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProvenanceEntityRole.php index 47e67417da..d3a8f921cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProvenanceEntityRole.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProvenanceEntityRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRProvenanceEntityRole extends FHIRElement * Validation map for fields in type ProvenanceEntityRole * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceEntityRole Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity.php index e0167fec15..36f2887248 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -148,7 +148,7 @@ class FHIRQuantity extends FHIRElement * Validation map for fields in type Quantity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuantity Constructor @@ -486,11 +486,135 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComparator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnits())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNITS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNITS])) { + $v = $this->getUnits(); + foreach($validationRules[self::FIELD_UNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNITS])) { + $errs[self::FIELD_UNITS] = []; + } + $errs[self::FIELD_UNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRAge.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRAge.php index fdc506d0d0..d5a324e3be 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRAge.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRAge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRAge extends FHIRQuantity * Validation map for fields in type Age * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAge Constructor @@ -118,11 +118,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNITS])) { + $v = $this->getUnits(); + foreach($validationRules[self::FIELD_UNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNITS])) { + $errs[self::FIELD_UNITS] = []; + } + $errs[self::FIELD_UNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRCount.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRCount.php index f63c5e1147..a15ef9bada 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRCount.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRCount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRCount extends FHIRQuantity * Validation map for fields in type Count * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCount Constructor @@ -118,11 +118,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNITS])) { + $v = $this->getUnits(); + foreach($validationRules[self::FIELD_UNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNITS])) { + $errs[self::FIELD_UNITS] = []; + } + $errs[self::FIELD_UNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDistance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDistance.php index 2b053ccb06..047deedb8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDistance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDistance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRDistance extends FHIRQuantity * Validation map for fields in type Distance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDistance Constructor @@ -118,11 +118,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNITS])) { + $v = $this->getUnits(); + foreach($validationRules[self::FIELD_UNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNITS])) { + $errs[self::FIELD_UNITS] = []; + } + $errs[self::FIELD_UNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDuration.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDuration.php index ff6e172cd3..5fa59e344d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDuration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDuration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRDuration extends FHIRQuantity * Validation map for fields in type Duration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDuration Constructor @@ -118,11 +118,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNITS])) { + $v = $this->getUnits(); + foreach($validationRules[self::FIELD_UNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNITS])) { + $errs[self::FIELD_UNITS] = []; + } + $errs[self::FIELD_UNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRMoney.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRMoney.php index 94c404e4b8..1b31be2186 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRMoney.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRMoney.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRMoney extends FHIRQuantity * Validation map for fields in type Money * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMoney Constructor @@ -118,11 +118,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNITS])) { + $v = $this->getUnits(); + foreach($validationRules[self::FIELD_UNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNITS])) { + $errs[self::FIELD_UNITS] = []; + } + $errs[self::FIELD_UNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantityCompararator.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantityCompararator.php index 6bd1bb7403..59d56d0a41 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantityCompararator.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantityCompararator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRQuantityCompararator extends FHIRElement * Validation map for fields in type QuantityCompararator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuantityCompararator Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARARATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQueryOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQueryOutcome.php index 677b9999c7..07a6fa31ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQueryOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQueryOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRQueryOutcome extends FHIRElement * Validation map for fields in type QueryOutcome * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQueryOutcome Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUERY_OUTCOME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuestionnaireStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuestionnaireStatus.php index 5aea21e7e8..022d3ac93f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuestionnaireStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuestionnaireStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRQuestionnaireStatus extends FHIRElement * Validation map for fields in type QuestionnaireStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRange.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRange.php index 049df6744b..81535e4774 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRange.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRRange extends FHIRElement * Validation map for fields in type Range * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRange Constructor @@ -232,11 +232,84 @@ public function setLow(FHIRQuantity $low = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHigh())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIGH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLow())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOW] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HIGH])) { + $v = $this->getHigh(); + foreach($validationRules[self::FIELD_HIGH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RANGE, self::FIELD_HIGH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIGH])) { + $errs[self::FIELD_HIGH] = []; + } + $errs[self::FIELD_HIGH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOW])) { + $v = $this->getLow(); + foreach($validationRules[self::FIELD_LOW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RANGE, self::FIELD_LOW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOW])) { + $errs[self::FIELD_LOW] = []; + } + $errs[self::FIELD_LOW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRatio.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRatio.php index 4421bb17e0..1edae9c570 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRatio.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRatio.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRRatio extends FHIRElement * Validation map for fields in type Ratio * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRatio Constructor @@ -233,11 +233,84 @@ public function setNumerator(FHIRQuantity $numerator = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDenominator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DENOMINATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumerator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMERATOR] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DENOMINATOR])) { + $v = $this->getDenominator(); + foreach($validationRules[self::FIELD_DENOMINATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RATIO, self::FIELD_DENOMINATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DENOMINATOR])) { + $errs[self::FIELD_DENOMINATOR] = []; + } + $errs[self::FIELD_DENOMINATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMERATOR])) { + $v = $this->getNumerator(); + foreach($validationRules[self::FIELD_NUMERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RATIO, self::FIELD_NUMERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMERATOR])) { + $errs[self::FIELD_NUMERATOR] = []; + } + $errs[self::FIELD_NUMERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRReactionSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRReactionSeverity.php index 7c207a3dcd..eeb3d70ad8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRReactionSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRReactionSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRReactionSeverity extends FHIRElement * Validation map for fields in type ReactionSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReactionSeverity Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REACTION_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceProfileStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceProfileStatus.php index 49c31682bc..a9e593c7a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceProfileStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceProfileStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRResourceProfileStatus extends FHIRElement * Validation map for fields in type ResourceProfileStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceProfileStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE_PROFILE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceReference.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceReference.php index 270c3a45c9..aaade551e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceReference.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRResourceReference extends FHIRElement * Validation map for fields in type ResourceReference * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceReference Constructor @@ -282,11 +282,84 @@ public function setReference($reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE_REFERENCE, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE_REFERENCE, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResponseType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResponseType.php index 9587de7ffa..f7bb04fa47 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResponseType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResponseType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRResponseType extends FHIRElement * Validation map for fields in type ResponseType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResponseType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulConformanceMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulConformanceMode.php index 5f65715e1f..e1659efe95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulConformanceMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulConformanceMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRRestfulConformanceMode extends FHIRElement * Validation map for fields in type RestfulConformanceMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRestfulConformanceMode Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESTFUL_CONFORMANCE_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationSystem.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationSystem.php index 86586fae24..dc84eb355f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRRestfulOperationSystem extends FHIRElement * Validation map for fields in type RestfulOperationSystem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRestfulOperationSystem Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESTFUL_OPERATION_SYSTEM, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationType.php index 7d623cb9c9..7a40bb0a62 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRRestfulOperationType extends FHIRElement * Validation map for fields in type RestfulOperationType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRestfulOperationType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESTFUL_OPERATION_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledData.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledData.php index 08d65038cd..d5449eaa77 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledData.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -173,7 +173,7 @@ class FHIRSampledData extends FHIRElement * Validation map for fields in type SampledData * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSampledData Constructor @@ -619,11 +619,169 @@ public function setUpperLimit($upperLimit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDimensions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIMENSIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getLowerLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOWER_LIMIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getUpperLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UPPER_LIMIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIMENSIONS])) { + $v = $this->getDimensions(); + foreach($validationRules[self::FIELD_DIMENSIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_DIMENSIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIMENSIONS])) { + $errs[self::FIELD_DIMENSIONS] = []; + } + $errs[self::FIELD_DIMENSIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOWER_LIMIT])) { + $v = $this->getLowerLimit(); + foreach($validationRules[self::FIELD_LOWER_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_LOWER_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOWER_LIMIT])) { + $errs[self::FIELD_LOWER_LIMIT] = []; + } + $errs[self::FIELD_LOWER_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UPPER_LIMIT])) { + $v = $this->getUpperLimit(); + foreach($validationRules[self::FIELD_UPPER_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_UPPER_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UPPER_LIMIT])) { + $errs[self::FIELD_UPPER_LIMIT] = []; + } + $errs[self::FIELD_UPPER_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledDataDataType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledDataDataType.php index d50abd182f..484472baa8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledDataDataType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledDataDataType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSampledDataDataType extends FHIRElement * Validation map for fields in type SampledDataDataType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSampledDataDataType Constructor @@ -162,11 +162,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule.php index 1e9135a639..c8d5401321 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRSchedule extends FHIRElement * Validation map for fields in type Schedule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSchedule Constructor @@ -262,11 +262,86 @@ public function setRepeat(FHIRScheduleRepeat $repeat = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRepeat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPEAT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEAT])) { + $v = $this->getRepeat(); + foreach($validationRules[self::FIELD_REPEAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_REPEAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEAT])) { + $errs[self::FIELD_REPEAT] = []; + } + $errs[self::FIELD_REPEAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule/FHIRScheduleRepeat.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule/FHIRScheduleRepeat.php index 4d0d365c78..0f673365f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule/FHIRScheduleRepeat.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule/FHIRScheduleRepeat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -162,7 +162,7 @@ class FHIRScheduleRepeat extends FHIRElement * Validation map for fields in type Schedule.Repeat * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRScheduleRepeat Constructor @@ -547,11 +547,152 @@ public function setWhen(FHIREventTiming $when = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrequency())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FREQUENCY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnits())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNITS] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COUNT])) { + $v = $this->getCount(); + foreach($validationRules[self::FIELD_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE_DOT_REPEAT, self::FIELD_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT])) { + $errs[self::FIELD_COUNT] = []; + } + $errs[self::FIELD_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE_DOT_REPEAT, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE_DOT_REPEAT, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FREQUENCY])) { + $v = $this->getFrequency(); + foreach($validationRules[self::FIELD_FREQUENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE_DOT_REPEAT, self::FIELD_FREQUENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FREQUENCY])) { + $errs[self::FIELD_FREQUENCY] = []; + } + $errs[self::FIELD_FREQUENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNITS])) { + $v = $this->getUnits(); + foreach($validationRules[self::FIELD_UNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE_DOT_REPEAT, self::FIELD_UNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNITS])) { + $errs[self::FIELD_UNITS] = []; + } + $errs[self::FIELD_UNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN])) { + $v = $this->getWhen(); + foreach($validationRules[self::FIELD_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE_DOT_REPEAT, self::FIELD_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN])) { + $errs[self::FIELD_WHEN] = []; + } + $errs[self::FIELD_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSearchParamType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSearchParamType.php index 56b2ec766a..561790c128 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSearchParamType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSearchParamType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRSearchParamType extends FHIRElement * Validation map for fields in type SearchParamType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchParamType Constructor @@ -160,11 +160,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventAction.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventAction.php index 20ff3637ec..4db3ee5baa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventAction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRSecurityEventAction extends FHIRElement * Validation map for fields in type SecurityEventAction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventAction Constructor @@ -162,11 +162,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_ACTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectLifecycle.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectLifecycle.php index 8062bd2046..ca3ee76416 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectLifecycle.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectLifecycle.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSecurityEventObjectLifecycle extends FHIRElement * Validation map for fields in type SecurityEventObjectLifecycle * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventObjectLifecycle Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OBJECT_LIFECYCLE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectRole.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectRole.php index 5dc2f9410f..d05b73928a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectRole.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRSecurityEventObjectRole extends FHIRElement * Validation map for fields in type SecurityEventObjectRole * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventObjectRole Constructor @@ -162,11 +162,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OBJECT_ROLE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectType.php index 8a1d9e0081..e62324ae77 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSecurityEventObjectType extends FHIRElement * Validation map for fields in type SecurityEventObjectType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventObjectType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OBJECT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventOutcome.php index 84b18ceed4..d7460f3d5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSecurityEventOutcome extends FHIRElement * Validation map for fields in type SecurityEventOutcome * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventOutcome Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OUTCOME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventParticipantNetworkType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventParticipantNetworkType.php index c5b9969c3d..e3c274845c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventParticipantNetworkType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventParticipantNetworkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSecurityEventParticipantNetworkType extends FHIRElement * Validation map for fields in type SecurityEventParticipantNetworkType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSecurityEventParticipantNetworkType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_PARTICIPANT_NETWORK_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityStatus.php index ea67c6d2f1..696947877f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSensitivityStatus extends FHIRElement * Validation map for fields in type SensitivityStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSensitivityStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SENSITIVITY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityType.php index c3c8a536d7..6975607dc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSensitivityType extends FHIRElement * Validation map for fields in type SensitivityType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSensitivityType Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SENSITIVITY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSlicingRules.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSlicingRules.php index 7ae1d258c9..6a8e6a3a1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSlicingRules.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSlicingRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSlicingRules extends FHIRElement * Validation map for fields in type SlicingRules * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSlicingRules Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLICING_RULES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRString.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRString.php index cadbdd8bef..0a7846d3d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRString.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRString.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRString extends FHIRElement * Validation map for fields in type string * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRString Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyDispenseStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyDispenseStatus.php index 115fc6ddd2..7ae74eb3de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyDispenseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyDispenseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSupplyDispenseStatus extends FHIRElement * Validation map for fields in type SupplyDispenseStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyDispenseStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DISPENSE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyStatus.php index 822cc1e7b9..70c62b9295 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSupplyStatus extends FHIRElement * Validation map for fields in type SupplyStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyStatus Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUnitsOfTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUnitsOfTime.php index 45450e3e1d..e44704f6ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUnitsOfTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUnitsOfTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRUnitsOfTime extends FHIRElement * Validation map for fields in type UnitsOfTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUnitsOfTime Constructor @@ -161,11 +161,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUri.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUri.php index fa47b498f5..f0f3ca7ec6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUri.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUri.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRUri extends FHIRElement * Validation map for fields in type uri * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUri Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_URI, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUuid.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUuid.php index 9758089770..b2fcd1b9c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUuid.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUuid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRUuid extends FHIRElement * Validation map for fields in type uuid * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUuid Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UUID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRValueSetStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRValueSetStatus.php index d2d1726ff2..f5e9e67de7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRValueSetStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRValueSetStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRValueSetStatus extends FHIRElement * Validation map for fields in type ValueSetStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetStatus Constructor @@ -160,11 +160,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive.php index 677b2559a6..f4a6e7278d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRIdPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRIdPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type id-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[a-z0-9\\-\\.]{1,36}$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -164,11 +166,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive/FHIRXmlIdRef.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive/FHIRXmlIdRef.php index f2683d670d..7537406403 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive/FHIRXmlIdRef.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive/FHIRXmlIdRef.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRXmlIdRef extends FHIRIdPrimitive * Validation map for fields in type xmlIdRef * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[a-z0-9\\-\\.]{1,36}$/', ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRInstantPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRInstantPrimitive.php index f1beaa6224..67cf154c42 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRInstantPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRInstantPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRInstantPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANT_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRInstantPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type instant-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInstantPrimitive Constructor @@ -168,7 +170,7 @@ public function _getDateTime() if (null === $v) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -179,11 +181,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANT_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIntegerPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIntegerPrimitive.php index 68ce281997..9134420a4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIntegerPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIntegerPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INTEGER_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type integer-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIntegerPrimitive Constructor @@ -172,11 +174,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INTEGER_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIROidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIROidPrimitive.php index c51155f2a2..695545bfd8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIROidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIROidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIROidPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIROidPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type oid-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^urn:oid:(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))*$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -164,11 +166,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRResourceInline.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRResourceInline.php index 1333d7648b..a66fce84be 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRResourceInline.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRResourceInline.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -113,6 +113,7 @@ class FHIRResourceInline implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_DOT_INLINE; @@ -628,7 +629,7 @@ class FHIRResourceInline implements PHPFHIRCommentContainerInterface, PHPFHIRTyp * Validation map for fields in type Resource.Inline * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceInline Constructor @@ -2342,11 +2343,271 @@ public function setValueSet(FHIRValueSet $ValueSet = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdverseReaction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADVERSE_REACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getAlert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllergyIntolerance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLERGY_INTOLERANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBinary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCarePlan())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARE_PLAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getComposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getConceptMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCEPT_MAP] = $fieldErrs; + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getConformance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFORMANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceObservationReport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_OBSERVATION_REPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosticOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTIC_ORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosticReport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTIC_REPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentManifest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT_MANIFEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFamilyHistory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FAMILY_HISTORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getImagingStudy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMAGING_STUDY] = $fieldErrs; + } + } + if (null !== ($v = $this->getImmunization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUNIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getImmunizationRecommendation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUNIZATION_RECOMMENDATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getList())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIST] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedia())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationAdministration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_ADMINISTRATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationDispense())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_DISPENSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMessageHeader())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE_HEADER] = $fieldErrs; + } + } + if (null !== ($v = $this->getObservation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDER_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOther())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OTHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPractitioner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTITIONER] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvenance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVENANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuery())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUERY] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuestionnaire())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTIONNAIRE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelatedPerson())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATED_PERSON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSecurityEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SECURITY_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecimen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupply())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET] = $fieldErrs; + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRSampledDataDataTypePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRSampledDataDataTypePrimitive.php index d396d41dcb..6e7f91142c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRSampledDataDataTypePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRSampledDataDataTypePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type SampledDataDataType-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^((-{0,1}\\d*\\.{0,1}\\d+)|[EUL])( ((-{0,1}\\d*\\.{0,1}\\d+)|[EUL]))*$/', ], @@ -163,11 +165,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive.php index 4184956b66..96011eb829 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRStringPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRStringPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type string-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, ], @@ -163,11 +165,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAddressUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAddressUseList.php index 6e65c77df6..1181b83b82 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAddressUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAddressUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRAddressUseList extends FHIRStringPrimitive * Validation map for fields in type AddressUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['home','work','temp','old',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAggregationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAggregationModeList.php index 7b6b5fab30..c1aa299661 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAggregationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAggregationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRAggregationModeList extends FHIRStringPrimitive * Validation map for fields in type AggregationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['contained','referenced','bundled',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAlertStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAlertStatusList.php index e7a8a04b42..31a5fb6ca6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAlertStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAlertStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRAlertStatusList extends FHIRStringPrimitive * Validation map for fields in type AlertStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered in error',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRBindingConformanceList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRBindingConformanceList.php index a33fc90098..18426ffe1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRBindingConformanceList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRBindingConformanceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRBindingConformanceList extends FHIRStringPrimitive * Validation map for fields in type BindingConformance-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['required','preferred','example',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityCategoryList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityCategoryList.php index 276106a33a..8d13dd17fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRCarePlanActivityCategoryList extends FHIRStringPrimitive * Validation map for fields in type CarePlanActivityCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['diet','drug','encounter','observation','procedure','supply','other',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php index b7efd8b7ec..01f845d216 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRCarePlanActivityStatusList extends FHIRStringPrimitive * Validation map for fields in type CarePlanActivityStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not started','scheduled','in progress','on hold','completed','cancelled',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanGoalStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanGoalStatusList.php index ff947cd4c4..28d0d6b52a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanGoalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanGoalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRCarePlanGoalStatusList extends FHIRStringPrimitive * Validation map for fields in type CarePlanGoalStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in progress','achieved','sustaining','cancelled',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanStatusList.php index 6d3482881b..cac681738e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRCarePlanStatusList extends FHIRStringPrimitive * Validation map for fields in type CarePlanStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','active','completed',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCausalityExpectationList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCausalityExpectationList.php index 3b70a473c2..ff6a375c6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCausalityExpectationList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCausalityExpectationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRCausalityExpectationList extends FHIRStringPrimitive * Validation map for fields in type CausalityExpectation-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['likely','unlikely','confirmed','unknown',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php index ba7fff1473..4454091594 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRCompositionAttestationModeList extends FHIRStringPrimitive * Validation map for fields in type CompositionAttestationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['personal','professional','legal','official',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionStatusList.php index 1faa5b2997..b4461e6f83 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRCompositionStatusList extends FHIRStringPrimitive * Validation map for fields in type CompositionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['preliminary','final','appended','amended','entered in error',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php index cc32725e6b..ee6c52b979 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRConceptMapEquivalenceList extends FHIRStringPrimitive * Validation map for fields in type ConceptMapEquivalence-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['equal','equivalent','wider','subsumes','narrower','specialises','inexact','unmatched','disjoint',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionRelationshipTypeList.php index 12e524a2b1..1599ac931a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRConditionRelationshipTypeList extends FHIRStringPrimitive * Validation map for fields in type ConditionRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['due-to','following',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionStatusList.php index 0081101eed..ca59052055 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRConditionStatusList extends FHIRStringPrimitive * Validation map for fields in type ConditionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['provisional','working','confirmed','refuted',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceEventModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceEventModeList.php index c23b510538..c290a38426 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceEventModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceEventModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRConformanceEventModeList extends FHIRStringPrimitive * Validation map for fields in type ConformanceEventMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['sender','receiver',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceStatementStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceStatementStatusList.php index f3447f414a..e26c50c185 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceStatementStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceStatementStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRConformanceStatementStatusList extends FHIRStringPrimitive * Validation map for fields in type ConformanceStatementStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','retired',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConstraintSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConstraintSeverityList.php index 10ea734e03..764db47192 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConstraintSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConstraintSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRConstraintSeverityList extends FHIRStringPrimitive * Validation map for fields in type ConstraintSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['error','warning',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactSystemList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactSystemList.php index 8a893c6d1e..8be5e57c53 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactSystemList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactSystemList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRContactSystemList extends FHIRStringPrimitive * Validation map for fields in type ContactSystem-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['phone','fax','email','url',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactUseList.php index c3e20de810..13dd18039b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRContactUseList extends FHIRStringPrimitive * Validation map for fields in type ContactUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['home','work','temp','old','mobile',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCriticalityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCriticalityList.php index 5910c9fd6a..6c79161ce0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCriticalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCriticalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRCriticalityList extends FHIRStringPrimitive * Validation map for fields in type Criticality-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['fatal','high','medium','low',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php index 32c677c73e..bc6e8be835 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRDiagnosticOrderPriorityList extends FHIRStringPrimitive * Validation map for fields in type DiagnosticOrderPriority-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['routine','urgent','stat','asap',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php index fadaddf576..ff022f1a94 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRDiagnosticOrderStatusList extends FHIRStringPrimitive * Validation map for fields in type DiagnosticOrderStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['requested','received','accepted','in progress','review','completed','suspended','rejected','failed',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php index f7d1b82be5..e09057cfd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRDiagnosticReportStatusList extends FHIRStringPrimitive * Validation map for fields in type DiagnosticReportStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['registered','partial','final','corrected','amended','appended','cancelled','entered in error',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentModeList.php index d0b4b2c8f1..3d72c62301 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRDocumentModeList extends FHIRStringPrimitive * Validation map for fields in type DocumentMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['producer','consumer',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php index 5401f953f5..62799ccfa6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRDocumentReferenceStatusList extends FHIRStringPrimitive * Validation map for fields in type DocumentReferenceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['current','superceded','entered in error',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php index d7c42a18fd..de31dfa67e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRDocumentRelationshipTypeList extends FHIRStringPrimitive * Validation map for fields in type DocumentRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['replaces','transforms','signs','appends',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterClassList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterClassList.php index b504353be4..c9dbd77e27 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterClassList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterClassList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIREncounterClassList extends FHIRStringPrimitive * Validation map for fields in type EncounterClass-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['inpatient','outpatient','ambulatory','emergency','home','field','daytime','virtual',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterStateList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterStateList.php index 4608ae156a..502aff01de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIREncounterStateList extends FHIRStringPrimitive * Validation map for fields in type EncounterState-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','in progress','onleave','finished','cancelled',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREventTimingList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREventTimingList.php index ef5ef48334..bb71335dc0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREventTimingList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREventTimingList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIREventTimingList extends FHIRStringPrimitive * Validation map for fields in type EventTiming-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['HS','WAKE','AC','ACM','ACD','ACV','PC','PCM','PCD','PCV',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExposureTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExposureTypeList.php index 7192cceccf..140c88ac0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExposureTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExposureTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRExposureTypeList extends FHIRStringPrimitive * Validation map for fields in type ExposureType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['drugadmin','immuniz','coincidental',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExtensionContextList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExtensionContextList.php index 2af1bfc724..ab396dde5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExtensionContextList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExtensionContextList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRExtensionContextList extends FHIRStringPrimitive * Validation map for fields in type ExtensionContext-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['resource','datatype','mapping','extension',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRFilterOperatorList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRFilterOperatorList.php index 17f79e91b2..1286b4da0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRFilterOperatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRFilterOperatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRFilterOperatorList extends FHIRStringPrimitive * Validation map for fields in type FilterOperator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['=','is-a','is-not-a','regex','in','not in',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRGroupTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRGroupTypeList.php index e724cdb749..19a8d4a2ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRGroupTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRGroupTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRGroupTypeList extends FHIRStringPrimitive * Validation map for fields in type GroupType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['person','animal','practitioner','device','medication','substance',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeList.php index 1ec353a2a1..52959822f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRHierarchicalRelationshipTypeList extends FHIRStringPrimitive * Validation map for fields in type HierarchicalRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['parent','child',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIdentifierUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIdentifierUseList.php index 6984b7a0a3..c31df3593e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIdentifierUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIdentifierUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRIdentifierUseList extends FHIRStringPrimitive * Validation map for fields in type IdentifierUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['usual','official','temp','secondary',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRImagingModalityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRImagingModalityList.php index 2598f2fab2..c178f41585 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRImagingModalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRImagingModalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRImagingModalityList extends FHIRStringPrimitive * Validation map for fields in type ImagingModality-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['AR','BMD','BDUS','EPS','CR','CT','DX','ECG','ES','XC','GM','HD','IO','IVOCT','IVUS','KER','LEN','MR','MG','NM','OAM','OCT','OPM','OP','OPR','OPT','OPV','PX','PT','RF','RG','SM','SRF','US','VA','XA',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php index 56e357772f..cf9eb3f217 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRInstanceAvailabilityList extends FHIRStringPrimitive * Validation map for fields in type InstanceAvailability-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['ONLINE','OFFLINE','NEARLINE','UNAVAILABLE',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIssueSeverityList.php index 4d119b96d5..b770c759a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRIssueSeverityList extends FHIRStringPrimitive * Validation map for fields in type IssueSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['fatal','error','warning','information',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLinkTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLinkTypeList.php index f7384329d1..85648768b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLinkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLinkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRLinkTypeList extends FHIRStringPrimitive * Validation map for fields in type LinkType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['replace','refer','seealso',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRListModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRListModeList.php index 92e04b671a..97f37045ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRListModeList extends FHIRStringPrimitive * Validation map for fields in type ListMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['working','snapshot','changes',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationModeList.php index cd6378c4b0..0f923f0c52 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRLocationModeList extends FHIRStringPrimitive * Validation map for fields in type LocationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['instance','kind',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationStatusList.php index 711b9ace1e..3aaee9f6c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRLocationStatusList extends FHIRStringPrimitive * Validation map for fields in type LocationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','suspended','inactive',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMediaTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMediaTypeList.php index 0015fe0bc6..f1431cf9f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMediaTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMediaTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRMediaTypeList extends FHIRStringPrimitive * Validation map for fields in type MediaType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['photo','video','audio',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php index 1c30b87377..36bd69e88f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRMedicationAdministrationStatusList extends FHIRStringPrimitive * Validation map for fields in type MedicationAdministrationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in progress','on hold','completed','entered in error','stopped',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php index 25905f96e9..0fa9a194a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRMedicationDispenseStatusList extends FHIRStringPrimitive * Validation map for fields in type MedicationDispenseStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in progress','on hold','completed','entered in error','stopped',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationKindList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationKindList.php index 7e9a6f0049..97259a0e0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRMedicationKindList extends FHIRStringPrimitive * Validation map for fields in type MedicationKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['product','package',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusList.php index 4c9fda17ed..18bcf09acb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRMedicationPrescriptionStatusList extends FHIRStringPrimitive * Validation map for fields in type MedicationPrescriptionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','on hold','completed','entered in error','stopped','superceded',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php index 31bd8a1b36..b33a36a404 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRMessageSignificanceCategoryList extends FHIRStringPrimitive * Validation map for fields in type MessageSignificanceCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Consequence','Currency','Notification',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRModalityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRModalityList.php index 5a83c341ad..687a7bc385 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRModalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRModalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRModalityList extends FHIRStringPrimitive * Validation map for fields in type Modality-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['AR','AU','BDUS','BI','BMD','CR','CT','DG','DX','ECG','EPS','ES','GM','HC','HD','IO','IVOCT','IVUS','KER','KO','LEN','LS','MG','MR','NM','OAM','OCT','OP','OPM','OPT','OPV','OT','PR','PT','PX','REG','RF','RG','RTDOSE','RTIMAGE','RTPLAN','RTRECORD','RTSTRUCT','SEG','SM','SMR','SR','SRF','TG','US','VA','XA','XC',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNameUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNameUseList.php index 742712bc96..1fc778dabb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNameUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNameUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRNameUseList extends FHIRStringPrimitive * Validation map for fields in type NameUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['usual','official','temp','nickname','anonymous','old','maiden',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNarrativeStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNarrativeStatusList.php index 073a6240f3..e9612c9bbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNarrativeStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNarrativeStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRNarrativeStatusList extends FHIRStringPrimitive * Validation map for fields in type NarrativeStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['generated','extensions','additional','empty',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php index 0ae92961af..6bc09e9fa7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRObservationRelationshipTypeList extends FHIRStringPrimitive * Validation map for fields in type ObservationRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['has-component','has-member','derived-from','sequel-to','replaces','qualified-by','interfered-by',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationReliabilityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationReliabilityList.php index 59273a513a..202de54088 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationReliabilityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationReliabilityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRObservationReliabilityList extends FHIRStringPrimitive * Validation map for fields in type ObservationReliability-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['ok','ongoing','early','questionable','calibrating','error','unknown',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationStatusList.php index 94d361716b..4101a2a93b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRObservationStatusList extends FHIRStringPrimitive * Validation map for fields in type ObservationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['registered','preliminary','final','amended','cancelled','entered in error',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIROrderOutcomeStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIROrderOutcomeStatusList.php index af65cb3c62..d3ee942fc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIROrderOutcomeStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIROrderOutcomeStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIROrderOutcomeStatusList extends FHIRStringPrimitive * Validation map for fields in type OrderOutcomeStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['pending','review','rejected','error','accepted','cancelled','replaced','aborted','complete',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProcedureRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProcedureRelationshipTypeList.php index 9481ce0e43..b9d0cb611b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProcedureRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProcedureRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRProcedureRelationshipTypeList extends FHIRStringPrimitive * Validation map for fields in type ProcedureRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['caused-by','because-of',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRPropertyRepresentationList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRPropertyRepresentationList.php index 212a81a406..e6fec6a249 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRPropertyRepresentationList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRPropertyRepresentationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRPropertyRepresentationList extends FHIRStringPrimitive * Validation map for fields in type PropertyRepresentation-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['xmlAttr',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php index b299938ca1..24613aeb17 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRProvenanceEntityRoleList extends FHIRStringPrimitive * Validation map for fields in type ProvenanceEntityRole-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['derivation','revision','quotation','source',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuantityCompararatorList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuantityCompararatorList.php index fb16e28871..520f3b33e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuantityCompararatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuantityCompararatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRQuantityCompararatorList extends FHIRStringPrimitive * Validation map for fields in type QuantityCompararator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['<','<=','>=','>',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQueryOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQueryOutcomeList.php index ddbef8eb54..2475f5f200 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQueryOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQueryOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRQueryOutcomeList extends FHIRStringPrimitive * Validation map for fields in type QueryOutcome-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['ok','limited','refused','error',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php index b4cc04d50a..cae853f7dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRQuestionnaireStatusList extends FHIRStringPrimitive * Validation map for fields in type QuestionnaireStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','published','retired','in progress','completed','amended',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRReactionSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRReactionSeverityList.php index e1e27c113f..8db0641aa6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRReactionSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRReactionSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRReactionSeverityList extends FHIRStringPrimitive * Validation map for fields in type ReactionSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['severe','serious','moderate','minor',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceProfileStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceProfileStatusList.php index 6d43b4d4f4..1a31b7fd75 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceProfileStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceProfileStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRResourceProfileStatusList extends FHIRStringPrimitive * Validation map for fields in type ResourceProfileStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','retired',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType.php index 5eb4044cef..2df171e009 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRResourceType extends FHIRStringPrimitive * Validation map for fields in type ResourceType * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Provenance','Condition','CarePlan','Supply','Device','Query','Order','Organization','Procedure','Substance','DiagnosticReport','Group','ValueSet','Medication','MessageHeader','ImmunizationRecommendation','DocumentManifest','MedicationDispense','MedicationPrescription','MedicationAdministration','Encounter','SecurityEvent','MedicationStatement','List','Questionnaire','Composition','DeviceObservationReport','OperationOutcome','Conformance','Media','FamilyHistory','Other','Profile','Location','Observation','AllergyIntolerance','DocumentReference','Immunization','RelatedPerson','Specimen','OrderResponse','Alert','ConceptMap','Patient','Practitioner','AdverseReaction','ImagingStudy','DiagnosticOrder',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinary.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinary.php index 4abd3f6544..fa8c70260b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinary.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRResourceNamesPlusBinary extends FHIRResourceType * Validation map for fields in type ResourceNamesPlusBinary * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Binary',], ], @@ -114,11 +114,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResponseTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResponseTypeList.php index 3a180c6386..ece1bf3d7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResponseTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResponseTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRResponseTypeList extends FHIRStringPrimitive * Validation map for fields in type ResponseType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['ok','transient-error','fatal-error',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php index be71074c8e..70e0c9e7b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRRestfulConformanceModeList extends FHIRStringPrimitive * Validation map for fields in type RestfulConformanceMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['client','server',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationSystemList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationSystemList.php index a3bc693d32..030d910c95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationSystemList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationSystemList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRRestfulOperationSystemList extends FHIRStringPrimitive * Validation map for fields in type RestfulOperationSystem-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['transaction','search-system','history-system',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationTypeList.php index 34311e42a6..bbabc5402a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRRestfulOperationTypeList extends FHIRStringPrimitive * Validation map for fields in type RestfulOperationType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['read','vread','update','delete','history-instance','validate','history-type','create','search-type',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSearchParamTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSearchParamTypeList.php index 2a4141a081..174e0d2daa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSearchParamTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSearchParamTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSearchParamTypeList extends FHIRStringPrimitive * Validation map for fields in type SearchParamType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['number','date','string','token','reference','composite','quantity',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventActionList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventActionList.php index 4659cbe6d6..f784716b2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSecurityEventActionList extends FHIRStringPrimitive * Validation map for fields in type SecurityEventAction-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['C','R','U','D','E',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleList.php index 1645e31410..3407c7f6f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSecurityEventObjectLifecycleList extends FHIRStringPrimitive * Validation map for fields in type SecurityEventObjectLifecycle-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectRoleList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectRoleList.php index 8ca011c2cf..efb6493ae1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectRoleList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectRoleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSecurityEventObjectRoleList extends FHIRStringPrimitive * Validation map for fields in type SecurityEventObjectRole-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectTypeList.php index bd6c624410..261c8552bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSecurityEventObjectTypeList extends FHIRStringPrimitive * Validation map for fields in type SecurityEventObjectType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['1','2','3','4',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventOutcomeList.php index e505ebec5d..1543e04d27 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSecurityEventOutcomeList extends FHIRStringPrimitive * Validation map for fields in type SecurityEventOutcome-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['0','4','8','12',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeList.php index 5a40d7025b..7ddd7a2a82 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSecurityEventParticipantNetworkTypeList extends FHIRStringPrimitive * Validation map for fields in type SecurityEventParticipantNetworkType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['1','2','3','4','5',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityStatusList.php index 3765fd5777..80ba85e91f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSensitivityStatusList extends FHIRStringPrimitive * Validation map for fields in type SensitivityStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['suspected','confirmed','refuted','resolved',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityTypeList.php index fb72c08812..e673bce13b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSensitivityTypeList extends FHIRStringPrimitive * Validation map for fields in type SensitivityType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['allergy','intolerance','unknown',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSlicingRulesList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSlicingRulesList.php index 6a19a6cfb8..24264af56b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSlicingRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSlicingRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSlicingRulesList extends FHIRStringPrimitive * Validation map for fields in type SlicingRules-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['closed','open','openAtEnd',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyDispenseStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyDispenseStatusList.php index 3155dee8b9..a17971cce9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyDispenseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyDispenseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSupplyDispenseStatusList extends FHIRStringPrimitive * Validation map for fields in type SupplyDispenseStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in progress','dispensed','abandoned',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyStatusList.php index e1ebbdeca5..55ad2d1eb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSupplyStatusList extends FHIRStringPrimitive * Validation map for fields in type SupplyStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['requested','dispensed','received','failed','cancelled',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRUnitsOfTimeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRUnitsOfTimeList.php index f44a97b00b..3bbd984ac6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRUnitsOfTimeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRUnitsOfTimeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRUnitsOfTimeList extends FHIRStringPrimitive * Validation map for fields in type UnitsOfTime-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['s','min','h','d','wk','mo','a',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRValueSetStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRValueSetStatusList.php index c0846a0869..919be1d8aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRValueSetStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRValueSetStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRValueSetStatusList extends FHIRStringPrimitive * Validation map for fields in type ValueSetStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','retired',], ], @@ -113,11 +113,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUriPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUriPrimitive.php index f82bb75bab..b05a789406 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUriPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUriPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRUriPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_URI_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRUriPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type uri-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUriPrimitive Constructor @@ -159,11 +161,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_URI_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUuidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUuidPrimitive.php index 46b1fb866e..c203a020cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUuidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUuidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -63,6 +63,8 @@ */ class FHIRUuidPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UUID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -79,7 +81,7 @@ class FHIRUuidPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type uuid-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -164,11 +166,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UUID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRAutoloader.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRAutoloader.php index a152a265af..99e6761412 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRAutoloader.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRAutoloader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -74,6 +74,9 @@ if (!trait_exists('\DCarbone\PHPFHIRGenerated\DSTU1\PHPFHIRCommentContainerTrait', false)) { require __DIR__ . DIRECTORY_SEPARATOR . 'PHPFHIRCommentContainerTrait.php'; } +if (!trait_exists('\DCarbone\PHPFHIRGenerated\DSTU1\PHPFHIRValidationAssertionsTrait', false)) { + require __DIR__ . DIRECTORY_SEPARATOR . 'PHPFHIRValidationAssertionsTrait.php'; +} // common classes if (!class_exists('\DCarbone\PHPFHIRGenerated\DSTU1\PHPFHIRConstants', false)) { diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerInterface.php index eed398cd6b..1d8a7df4cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerTrait.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerTrait.php index 68c6544332..95d3323815 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerTrait.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerTrait.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRConstants.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRConstants.php index 39474c012d..06458f09ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRConstants.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRConstants.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ abstract class PHPFHIRConstants const SOURCE_GENERATION_DATE = 'Tue, Sep 30, 2014 18:08+1000'; // PHPFHIR - const CODE_GENERATION_DATE = 'December 7th, 2019 16:36+0000'; + const CODE_GENERATION_DATE = 'December 22nd, 2019 07:24+0000'; // Common const JSON_FIELD_RESOURCE_TYPE = 'resourceType'; @@ -87,6 +87,8 @@ abstract class PHPFHIRConstants const INT_MAX = 2147483648; const INT_MIN = -2147483648; + const UNLIMITED = -1; + // Validation const VALIDATE_ENUM = 0x1; const VALIDATE_MIN_LENGTH = 0x2; diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRContainedTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRContainedTypeInterface.php index 16714dfe2c..39c6cd2225 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRContainedTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRContainedTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParser.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParser.php index 0fc0116250..fe90639a50 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParser.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParser.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParserConfig.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParserConfig.php index e0565b7d0e..5522b0b7b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParserConfig.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParserConfig.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php index 72329c09b3..981dc02c78 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBinaryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBinaryTest.php index f1f030b4a3..35b230f143 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBooleanPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBooleanPrimitiveTest.php index b8e69ed746..73f96e273b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBooleanPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBooleanPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRCodePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRCodePrimitiveTest.php index 02b74e2a50..0803614019 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRCodePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRCodePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDatePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDatePrimitiveTest.php index 0e4c19bee6..54a2a0d54b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDatePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDatePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDateTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDateTimePrimitiveTest.php index 648c40bde6..18d84ae8bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDateTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDateTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDecimalPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDecimalPrimitiveTest.php index 0e7f32a0dc..2d0bc1e2ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDecimalPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDecimalPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressTest.php index 685fa1e995..12c4488328 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php index a17a5d7818..0ee4a051f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php index d4a7307e6a..209c9dbe5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAlertStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAlertStatusTest.php index 5d05d3aff7..66c8056d69 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAlertStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAlertStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php index b99bd46122..d9ab1073a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposureTest.php index 0e49637ca9..4a899429b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptomTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptomTest.php index 8cc386fbf1..97be57c8e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptomTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptomTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php index 72c704dda1..66edbc0683 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoalTest.php index 6bb47615b1..b298a25a41 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php index 76e0a7214a..e1d499bd69 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimpleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimpleTest.php index f29cdbcc64..d81680e49e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimpleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimpleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php index e1329b8d1a..232472e611 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php index b1682ddac7..cd709d76b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php index 4af014370d..8442f146ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConceptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConceptTest.php index 499c9ce1a8..231a520432 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php index e727f97156..6b865c0802 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMapTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMapTest.php index a98fb476b8..01279b0803 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php index c3685ea3f7..06b3e6dd90 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocationTest.php index c2e81e7920..6ad62ab1a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItemTest.php index d77e9c004f..56b4553c63 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php index 8e9c43db30..2ce755cc58 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php index 9adb78709b..2d729ea433 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php index 9ede82ee14..3c95ab7c6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php index 4ef9646983..46081269d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php index aed027acd4..8d4cb3e441 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php index 1fcbb3e4c6..9fcf20c971 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1Test.php index 7282dbdb2c..874f9f0d72 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php index 7c2afecc2a..25fe19d4d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQueryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQueryTest.php index 67860fc645..e2b7827d38 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQueryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQueryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php index 45fa50faef..ef17e7bd89 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php index 17f3858157..72fe1e8196 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php index 814e63b431..44dd35d5ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php index 73f4cac171..c80d65974f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php index 8826e600e4..ef0d9f7b52 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannelTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannelTest.php index 138efbb22a..cf2ab142ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetricTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetricTest.php index 2542fe0919..92eb634b2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetricTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetricTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDeviceTest.php index 3e2cb3afce..6ee107606f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php index 3b4a398e1a..97284253f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php index 70edf6b69d..01c4d8fcba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php index 5bb1d963e3..ce9afd11d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php index 1bcc6cac5b..9f07e45b31 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameterTest.php index f7a31ca61a..0378e492ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php index 7163b0bce2..6cf4e94fab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceServiceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceServiceTest.php index 8c85641615..b435fd3f87 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceServiceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceServiceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodationTest.php index bd83643ca8..e47922942b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php index d878527e44..752e4c1a68 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php index 4865e251d4..5f999ac018 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php index 9c8b874381..90b4e03ebd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryConditionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryConditionTest.php index 1784b0e2a5..f38cc127d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelationTest.php index 974f66d7f7..e6420635f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php index 903547a3de..edd9a3500e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php index 3270fed4bc..1f7b0ba9e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php index f98292f3ea..16b8747c80 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php index 80115bfd95..7852ea3f99 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php index 915d920c30..40c952137f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php index 3f46c4872d..e7da8313b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php index f05feb919d..9bd838cd6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php index b11ee68353..64907e6800 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php index fa02fb8a82..4713ca5c1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php index 0a56098e0c..bd54eddc02 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php index 834182935e..5e2eba6993 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php index 67db66c836..ff2a543455 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php index 8b1d82e9de..bd596789bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php index 95e4708c56..f436566e28 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php index 0d0eb2342d..7de77377c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php index da6c428fdf..608aa3c220 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispenseTest.php index 4a2827b0fb..ed62ed5650 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageTest.php index 3902381d93..1cbdb2c0c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php index fa1245e6d8..a1e9841247 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispenseTest.php index 9f6eae0bc6..3a6ac1d6a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstructionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstructionTest.php index 2275d29b5c..191cb37d90 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstructionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstructionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitutionTest.php index 91ff15226b..4d74475ce2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php index 5975a5e741..c98b21dcba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php index 239713caf7..c6d83615de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php index 24bcd46100..48a567374b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php index c34327afa5..4d7022acaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php index 6acdcb5c2f..477555657b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php index de2fa09ff2..2ec872ec15 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php index 16df8489cd..90736c6d86 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php index b0bfebcd2d..38181efed7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php index ffc5e3b622..7db9c354fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php index 64a0ad19c8..c999302fbd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php index 1111d8c5bc..e9f48c9841 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php index ee52a7c9f4..2861b9a4f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php index c565d58044..dc2e9c63f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php index 080acc2479..6a8a3ebcd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItemTest.php index 3581152026..1559398142 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBindingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBindingTest.php index ea02087a1a..8b1da3f0fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraintTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraintTest.php index 22f3de8adc..96dc09b59d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraintTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraintTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinitionTest.php index 791088d211..19d6c6cdbd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElementTest.php index 171d709c42..d00b7a2144 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefnTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefnTest.php index a342532dc2..1c84e0d058 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1Test.php index c2587c9dd0..9fd3a378aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMappingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMappingTest.php index 4d49c8da33..7092a53b88 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQueryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQueryTest.php index 8c2e23114d..59b8c339e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQueryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQueryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParamTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParamTest.php index afcb7cc2e0..bd3d9f595d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicingTest.php index 28bb3271a3..82a1c49839 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructureTest.php index 44b562a634..c1d81e3d05 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileTypeTest.php index 03cea82a30..9dc340a725 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php index 95ae1261cc..a6edd988c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php index 87337f696a..f85b70ab8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponseTest.php index 5a56551af2..7ac39c813a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php index 0bea5f512e..a644f422e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php index 4a79da952c..13f9badcb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReactionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReactionTest.php index c5af915252..c176a20381 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlertTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlertTest.php index aac8598bb0..06339e37e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntoleranceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntoleranceTest.php index 3d36560ff6..a786ecb1b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntoleranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntoleranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlanTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlanTest.php index 98b15e3caa..2c25cdb93d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCompositionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCompositionTest.php index e589f13841..fedee6206d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCompositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCompositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMapTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMapTest.php index c73279ebbe..4dba92cf63 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConditionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConditionTest.php index d9f0f25fc5..ab51d267c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformanceTest.php index c32be1a182..37f2e50175 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReportTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReportTest.php index fa93ab41ac..b94ffd64b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceTest.php index 56d3ad8195..66e3dd9d9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrderTest.php index 9a474d8d9c..1dae1b1f59 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReportTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReportTest.php index ba5e026dee..b15a8d751b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifestTest.php index 9b7686ab8d..f639b99def 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReferenceTest.php index f030925445..d7c5c544f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounterTest.php index 507f527ce5..9993f665e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistoryTest.php index 1816bfa8e8..28075dad1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroupTest.php index e58b475842..f16441b739 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudyTest.php index cb0e41c2d6..fb3cd21029 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendationTest.php index eb5c56e3fd..bc534ffebc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationTest.php index 1a96daf8d5..420cc92628 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRListTest.php index 57a1fc8ceb..84ba295f82 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocationTest.php index 1d31554909..f1bc46cd45 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMediaTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMediaTest.php index c31cbe9a4d..fa3c8a9a64 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMediaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMediaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministrationTest.php index 1fd417459a..9bef08e321 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispenseTest.php index 83670881e4..9414443670 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescriptionTest.php index d67b04c582..6c91fcb11f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatementTest.php index 37191cd771..e6a0fc8c79 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationTest.php index 9af9b18b26..d1670b27b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeaderTest.php index 5e590ce05d..70444a6e44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservationTest.php index ed03db2d55..e52bcadbd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcomeTest.php index 4f4d7fc841..1c09dbfed1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponseTest.php index 9dc70bdaa7..4d685c5f4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderTest.php index 46d19a0feb..a943b1233a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganizationTest.php index 3ae20888a9..855167e308 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROtherTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROtherTest.php index c1296d0e09..44432f4bd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROtherTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROtherTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatientTest.php index c1ea41d737..0e6b78224b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitionerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitionerTest.php index 7c51e9b438..708f2a2724 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitionerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitionerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedureTest.php index 7edcdbd81e..dcbdb86b60 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfileTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfileTest.php index 730488f048..13538abdde 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfileTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfileTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenanceTest.php index 0fc337b7a9..356266fd44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQueryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQueryTest.php index 5199c646dd..8af6a9de0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQueryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQueryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaireTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaireTest.php index 260ff65e13..1ad757986a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaireTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaireTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPersonTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPersonTest.php index ee8bd3a087..a0de640907 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEventTest.php index c570b2117a..1ca1d958a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimenTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimenTest.php index 06ba93e366..d0f6e9388b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstanceTest.php index fc0cafeb5c..ad6629c63d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupplyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupplyTest.php index 40c684610d..6c9e06afe8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupplyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupplyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSetTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSetTest.php index 0013ea643b..7765e38b7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResourceTest.php index f990ed74c9..09d2b5edc0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetailTest.php index a940ceace7..8021afce5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEventTest.php index 20cc3c5605..1f3a726fb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetworkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetworkTest.php index dcb1ddd55d..a06afeff91 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetworkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetworkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObjectTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObjectTest.php index 7163e2eb6f..3efab7b7de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObjectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObjectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipantTest.php index a62b3e233f..d66210fc9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSourceTest.php index 2c2a8ed1cf..167b0439c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php index 198f07e157..eef7abe32c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php index 654a6fa317..82bde6ac0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSourceTest.php index bd4b22163a..c83913c3c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php index 59840182e2..42ac5279dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php index 51eacefb99..328581ed1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php index b419a14893..6facf3263d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispenseTest.php index b058386be6..2e6bdffd20 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php index 1ee8358116..e504519835 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php index c40b2b1a99..b0dca87547 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php index c87c383b18..db7c72e9cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefineTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefineTest.php index 0418151691..c8935a8819 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefineTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefineTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php index 65831556fe..b60a331e74 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php index 7bde1e042c..eb74ff1284 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php index 6e35a59600..c3cecc1685 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php index 23b26529a5..63908796b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php index 7470d3f284..7aaf989c3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBindingConformanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBindingConformanceTest.php index 03353eaa13..f4da0c21ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBindingConformanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBindingConformanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php index f02ee68e8e..8e2d9917df 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityCategoryTest.php index 6524687262..50d21a0713 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php index 452dc344c8..b2f618547d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanGoalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanGoalStatusTest.php index e0b171f1e2..a40b19463c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanGoalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanGoalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php index 6cfcfc3190..b3d124f0ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCausalityExpectationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCausalityExpectationTest.php index 5fea45fc59..c30d726dbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCausalityExpectationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCausalityExpectationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeTest.php index a22a2dfc11..193fc24249 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php index a952724c95..827d8b7d30 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodingTest.php index 713f8891f1..e32f79e1c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php index b69a16e2ac..552f2319b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php index 625eccebe3..84a976d590 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php index 692c972900..98fb66fbd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionRelationshipTypeTest.php index af301058dc..21575f2969 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionStatusTest.php index c47d74dd63..9a6b3c7f4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php index 08f2b30cde..c77301ccd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceStatementStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceStatementStatusTest.php index 861adb9d34..117def8668 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceStatementStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceStatementStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php index 57d2453dc5..bb71425d3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactSystemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactSystemTest.php index bb5117898a..7e003f0126 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactTest.php index 5f02d44ab3..7c76c76c95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactUseTest.php index d9571f8fb2..2d77c5e845 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCriticalityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCriticalityTest.php index bcd5655dff..5434c06cd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCriticalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCriticalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTest.php index 34d050077c..01c02b1e8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php index 10b2624628..500fdbd499 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimal/FHIRScoreTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimal/FHIRScoreTest.php index 3cb70c6daf..8bdfd49485 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimal/FHIRScoreTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimal/FHIRScoreTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php index 64d9d02f93..8760321caa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php index c8f31223fb..f6a683857c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php index f87f34eaa6..20e83df52d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php index bb73af4f9c..d3a5bf4d8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php index 4ed67ab8eb..44a89fa8d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php index 0c2ab4a8ba..045dfa6363 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php index aebf0a7e6a..c6b7bf47dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php index 40cfddbf53..168b37a7a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php index 1ffa4f489c..ca16afae18 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php index 5064ea00a6..b5999ee9ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExposureTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExposureTypeTest.php index a435bef43e..b991c3eb2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExposureTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExposureTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php index cacee5e7c5..06bd46ebf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php index 041f6e4745..ac50372790 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php index f047815cad..887d83bb2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php index 0f99e05f54..6e0c205093 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHierarchicalRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHierarchicalRelationshipTypeTest.php index 44fcee8e2e..04042b0dac 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHierarchicalRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHierarchicalRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php index 5cf60f0ed1..cdfd6670bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdTest.php index 37fce48d63..539fc91ed4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php index 6a94caf06a..bb581e098f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php index eb4485cb51..a028adf2aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRImagingModalityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRImagingModalityTest.php index a775a6516b..a2a2f8b180 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRImagingModalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRImagingModalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php index e56c3909e6..a5b9f38934 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstantTest.php index a6d0e77815..49ca9ae313 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInteger/FHIRTotalResultsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInteger/FHIRTotalResultsTest.php index c5ae93ea3f..f016271de1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInteger/FHIRTotalResultsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInteger/FHIRTotalResultsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php index 17552a98c1..950b7eb603 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php index 7c0800d498..cc67f89efa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php index b051408d62..42728e6432 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRListModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRListModeTest.php index d9fe1599e0..6bf6fe8843 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php index 53dcfd8841..3e19b0dd97 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php index 977a676f01..92d7a5b0ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMediaTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMediaTypeTest.php index 24b4c2f968..84a97318f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMediaTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMediaTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php index 2e1eff2c01..edf56d9fe2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php index a1a7a20510..2748ecf958 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationKindTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationKindTest.php index 132bfcc8ef..4f51db7042 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationPrescriptionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationPrescriptionStatusTest.php index 363ba579c3..8166e260d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationPrescriptionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationPrescriptionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php index bb8e67ca7a..df5622451a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRModalityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRModalityTest.php index 0605d89483..b241ea07f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRModalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRModalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php index dcc634b7fc..e14e762742 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php index 8d80be7c06..fdd0f56e51 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php index 6a548fbec6..82c7abb5f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php index 1fba4eac0c..caee3440c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationReliabilityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationReliabilityTest.php index 03126bc3bb..13ab61cc8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationReliabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationReliabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php index 8d449f917c..64a5f2e39a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROidTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROidTest.php index 551c7447be..74b37b6369 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROrderOutcomeStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROrderOutcomeStatusTest.php index 4d6a13ec2e..60b1cd1d60 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROrderOutcomeStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROrderOutcomeStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php index ad33e3d766..ae61aa63ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProcedureRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProcedureRelationshipTypeTest.php index 057623b471..b1e07720ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProcedureRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProcedureRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php index c492342784..fda73e4cb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php index 0cc99b2986..2345b8fad4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php index fcd369c7fa..44d49814bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php index feb632096c..10b33e6cab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php index 8988c43c0f..d4fee26677 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php index 5088af9737..c80601c03d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php index e43bc913cd..f463348d78 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityCompararatorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityCompararatorTest.php index ca5d1fc5af..55ca8d4d01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityCompararatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityCompararatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php index 710f85bd8c..070ca3e80e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQueryOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQueryOutcomeTest.php index fb4a5fc454..2b0a863d10 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQueryOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQueryOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php index 194d32f1f1..d34b82a2b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRangeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRangeTest.php index bd4a40b5ca..493d9073f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRatioTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRatioTest.php index 98b4457a13..0383a8eb49 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRatioTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRatioTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRReactionSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRReactionSeverityTest.php index 1aca898a84..d1516d1fce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRReactionSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRReactionSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceProfileStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceProfileStatusTest.php index 3fa973ef12..4f69331b09 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceProfileStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceProfileStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceReferenceTest.php index 78cef15198..4f05fa2576 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php index 72e3448ec9..dd6deba5c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php index c4c440b3dc..f0d07599c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationSystemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationSystemTest.php index d0422b0b2a..610fb01457 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationTypeTest.php index 373142a98c..c753080041 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php index f816fbc3dc..e48f58c100 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php index e07596f63a..5345e6f5e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSchedule/FHIRScheduleRepeatTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSchedule/FHIRScheduleRepeatTest.php index 1394f08667..5ee1a67fd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSchedule/FHIRScheduleRepeatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSchedule/FHIRScheduleRepeatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRScheduleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRScheduleTest.php index f5374405ad..25c334c46c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRScheduleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRScheduleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php index 3ab8a67e65..a4b90addd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventActionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventActionTest.php index 9ddea1c4c3..7e35149305 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectLifecycleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectLifecycleTest.php index 65519fb282..25faf2f6f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectLifecycleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectLifecycleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectRoleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectRoleTest.php index f49cb8bd43..1ea4be2ab3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectTypeTest.php index 86cb51265d..a4bedfd314 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventOutcomeTest.php index 412ff1bee0..70ae3c2c08 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventParticipantNetworkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventParticipantNetworkTypeTest.php index 848a05cf4b..b9d5b1c606 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventParticipantNetworkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventParticipantNetworkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityStatusTest.php index 63c7a735ea..722397823e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityTypeTest.php index 0872e75522..3f3ed093f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php index a99f85b3e9..8f62719eba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRStringTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRStringTest.php index 094795c3bf..628c0f7df1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRStringTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRStringTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyDispenseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyDispenseStatusTest.php index 99b64afa49..434919c2aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyDispenseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyDispenseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyStatusTest.php index 7579bc9ff3..e55a4fd79a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php index b7f6f56e3b..0dcd8772af 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUriTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUriTest.php index ed1df1bd88..6aa4cc5d5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUriTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUriTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUuidTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUuidTest.php index f305124e9a..062ecf19cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUuidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUuidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRValueSetStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRValueSetStatusTest.php index fc03e3af74..55b6172535 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRValueSetStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRValueSetStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElementTest.php index 551ffd12c9..f72c3e831b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitive/FHIRXmlIdRefTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitive/FHIRXmlIdRefTest.php index f10cacb80c..a77fd4f3b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitive/FHIRXmlIdRefTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitive/FHIRXmlIdRefTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitiveTest.php index 73d73391c5..e51f8fb4b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRInstantPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRInstantPrimitiveTest.php index 059ce8506e..bec0643704 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRInstantPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRInstantPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIntegerPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIntegerPrimitiveTest.php index 1b9b9b1c8e..97fbcfec62 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIntegerPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIntegerPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIROidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIROidPrimitiveTest.php index 636ec4520e..800900487e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIROidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIROidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRResourceInlineTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRResourceInlineTest.php index 2b7453f920..3031adbcab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRResourceInlineTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRResourceInlineTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php index e6595158de..bcb3f408ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php index 05f017b911..87748949b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php index b9345f3c1b..ea2d4a323d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAlertStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAlertStatusListTest.php index 5ceb3ac9f3..fb9707ca01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAlertStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAlertStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingConformanceListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingConformanceListTest.php index 286a173b24..70a2d7e2ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingConformanceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingConformanceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityCategoryListTest.php index 1e6e95fd2e..df954523d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php index d3bf2648c8..ede77dd738 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanGoalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanGoalStatusListTest.php index bdf1c974e0..4f10bab6b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanGoalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanGoalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php index 47b9b24d94..ebc13f0efc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCausalityExpectationListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCausalityExpectationListTest.php index b802a5b36f..78d1e03ba5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCausalityExpectationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCausalityExpectationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php index fc5c609811..692c91611c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php index c2e1cea911..c94b925d58 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php index 39aeb7a2d4..a31518832e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionRelationshipTypeListTest.php index e4d0aa52ad..8217a4819d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionStatusListTest.php index 4a3ef9d531..9bfa7fdb6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php index edb734d333..dda467a4b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementStatusListTest.php index 91a4e3ca56..c201a183db 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php index 401199b476..9811a19580 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactSystemListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactSystemListTest.php index 5e402d4bc2..f1860b1b5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactSystemListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactSystemListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactUseListTest.php index 19e80c839a..79934391ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCriticalityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCriticalityListTest.php index 5085443db2..85688ebea5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCriticalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCriticalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php index d6e9ffc632..220895c851 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php index f3f19a55db..b0afdad60b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php index 1070509a2a..dcd275562c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php index 63b7364a36..97788411cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php index 4ada51c388..22ab828fd3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php index 1fc94e0b9e..64ddb24a3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php index 0e6a895605..42c1aa5a70 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php index c9267a342d..5704044e6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php index caef72aceb..8be4d866a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExposureTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExposureTypeListTest.php index d7701a7edf..43dda615cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExposureTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExposureTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php index 545f5be3c3..be82c6795b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php index 23c351df28..9803b3cf2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php index 87e7a4405c..1e1b1ddfb9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeListTest.php index 1368e41ad8..1589b22ccd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php index 412bf09b59..54d5b24b86 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRImagingModalityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRImagingModalityListTest.php index 2396eed7e8..91e11aeff7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRImagingModalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRImagingModalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php index 62d8be41a9..abb7b52d36 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php index 4ecf7b9e5a..2483e6c141 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php index 143a6a997a..3ceaf65b43 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php index 9076a73812..6b75fe6e1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php index 08041391b8..9767985fcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php index 74b59eef4e..6876c37171 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMediaTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMediaTypeListTest.php index 315ad46bcb..7a644603c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMediaTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMediaTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php index 998a572e07..fe7e418b37 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php index 6dc5d03147..1353a239ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationKindListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationKindListTest.php index 00e8e0f490..d8af7b9d8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusListTest.php index 34cee68265..e3ef75a509 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php index 96bbcba3c8..82ab9b5f37 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRModalityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRModalityListTest.php index 049f0ffb3d..63ddcaeaf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRModalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRModalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php index 5ca58cbc2b..4ea1c58eda 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php index cc2a259f24..cb0f5db6e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php index 473ee2265f..6b396293fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationReliabilityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationReliabilityListTest.php index dd30f690f6..e76743f0f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationReliabilityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationReliabilityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php index 767ad503cb..1ebae33f53 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIROrderOutcomeStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIROrderOutcomeStatusListTest.php index 429ddc9192..3aad20916d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIROrderOutcomeStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIROrderOutcomeStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRelationshipTypeListTest.php index 534ef9b8ba..221035ff40 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php index 487d5ee9b9..d9da1d88e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php index 6c8c86a6b1..47c119e38c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityCompararatorListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityCompararatorListTest.php index c8c8b687ba..c5e1b63003 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityCompararatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityCompararatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQueryOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQueryOutcomeListTest.php index 0f799dd692..1ba5333945 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQueryOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQueryOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php index 1f2bf59628..86d4531fe6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRReactionSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRReactionSeverityListTest.php index c489b9c101..8b3d0472d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRReactionSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRReactionSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceProfileStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceProfileStatusListTest.php index 611a0e0eeb..ff23a2b73c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceProfileStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceProfileStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinaryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinaryTest.php index 12bd25785a..b3901a1caa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceTypeTest.php index 76dc2a2fc3..e729c82513 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php index 892d7b1899..6894d67a01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php index a25425c4d9..8de00a6722 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationSystemListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationSystemListTest.php index c23746039e..6ffdc06f61 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationSystemListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationSystemListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationTypeListTest.php index fa018b5aa7..56299b4a99 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php index 0c38054f89..e5ef8eada9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventActionListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventActionListTest.php index 9536e1fb47..af2d24d79d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleListTest.php index 49559a01e2..dcd4726a9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectRoleListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectRoleListTest.php index 24e393302e..58d5716479 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectRoleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectRoleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectTypeListTest.php index 2ef8d62c4d..3e72438f23 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventOutcomeListTest.php index 7a30b1a07d..eb68658886 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeListTest.php index 9466c7d616..80e4921d38 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityStatusListTest.php index e2a20e799c..f7de096c92 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityTypeListTest.php index 8ea5cdc240..cd85bc04ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php index e2844fcaa9..0c98f66968 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDispenseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDispenseStatusListTest.php index 1a73554950..0427955e2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDispenseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDispenseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyStatusListTest.php index 2053078045..66e3f60ac9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php index 1a15be09d5..ae33e87f27 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRValueSetStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRValueSetStatusListTest.php index e35286c353..9d07fad39f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRValueSetStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRValueSetStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitiveTest.php index 05ae88eb55..6f103c1b72 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUriPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUriPrimitiveTest.php index c075837351..3816daa614 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUriPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUriPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUuidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUuidPrimitiveTest.php index b5fe8abb0a..18a459ace7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUuidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUuidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRConstantsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRConstantsTest.php index da8c2f4209..ea3c2a10c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRConstantsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRConstantsTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRTypeMapTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRTypeMapTest.php index cc711f2b43..ac3560e293 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRTypeMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRTypeMapTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeInterface.php index 0dd91d7f24..2b9370b88d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * @@ -92,12 +92,18 @@ public function _setFHIRXMLNamespace($xmlNamespace); */ public function _getFHIRXMLElementDefinition(); + /** + * Must return an associative array in structure ["field" => ["rule" => {constraint}]] to be used during validation + * @return array + */ + public function _getValidationRules(); + /** * Must return associative array where, if there are validation errors, the keys are the names of fields within the * type that failed validation. The value must be a string message describing the manner of error * @return array */ - public function _validationErrors(); + public function _getValidationErrors(); /** * @param \SimpleXMLElement|string|null $sxe diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeMap.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeMap.php index df81717471..dfd00c3b36 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeMap.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:24+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRValidationAssertionsTrait.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRValidationAssertionsTrait.php new file mode 100644 index 0000000000..89b113029f --- /dev/null +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRValidationAssertionsTrait.php @@ -0,0 +1,214 @@ += $expected) { + return null; + } + if (null === $value || !is_array($value) || [] === $value) { + return sprintf('Field "%s" on type "%s" must have at least %d elements, but it is empty', $fieldName, $typeName, $expected); + } + if ($expected > ($cnt = count($value))) { + return sprintf('Field "%s" on type "%s" must have at least %d elements, %d seen.', $fieldName, $typeName, $expected, $cnt); + } + return null; + } + + /** + * Asserts that a given collection field has no more than the specified number of elements + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|array $value + * @return null|string + */ + protected function _assertMaxOccurs($typeName, $fieldName, $expected, $value) + { + if (PHPFHIRConstants::UNLIMITED === $expected || null === $value || !is_array($value) || [] === $value || $expected >= ($cnt = count($value))) { + return null; + } + return sprintf('Field "%s" on type "%s" must have no more than %d elements, %d seen', $fieldName, $typeName, $expected, $cnt); + } + + /** + * Asserts that a given string value is at least x characters long + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|string $value + * @return null|string + */ + protected function _assertMinLength($typeName, $fieldName, $expected, $value) + { + if (0 === $expected) { + return null; + } + if (null === $value || !is_string($value) || '' === $value) { + return sprintf('Field "%s" on type "%s" must be at least %d characters long, but it is empty', $fieldName, $typeName, $expected); + } + if ($expected > ($cnt = strlen($value))) { + return sprintf('Field "%s" on type "%s" must be at least %d characters long, %d seen.', $fieldName, $typeName, $expected, $cnt); + } + return null; + } + + /** + * Asserts that a given string value is no more than x characters long + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|string $value + * @return null|string + */ + protected function _assertMaxLength($typeName, $fieldName, $expected, $value) + { + if (PHPFHIRConstants::UNLIMITED === $expected || null === $value || !is_string($value) || '' === $value || $expected <= ($cnt = strlen($value))) { + return null; + } + return sprintf('Field "%s" on type "%s" must be no more than %d characters long, %d seen', $fieldName, $typeName, $expected, $cnt); + } + + /** + * Asserts that a given value is within the expected list of values + * @param string $typeName + * @param string $fieldName + * @param array $expected + * @param mixed $value + * @return null|string + */ + protected function _assertValueInEnum($typeName, $fieldName, array $expected, $value) + { + if ([] === $expected || in_array($value, $expected, true)) { + return null; + } + return sprintf( + 'Field "%s" on type "%s" value "%s" not in allowed list: [%s]', + $fieldName, + $typeName, + var_export($value, true), + implode( + ', ', + array_map( + function($v) { return var_export($v, true); }, + $expected + ) + ) + ); + } + + /** + * Asserts that a given string value matches the specified pattern + * @param string $typeName + * @param string $fieldName + * @param string $pattern + * @param null|string $value + * @return null|string + */ + protected function _assertPatternMatch($typeName, $fieldName, $pattern, $value) + { + if (null === $value || !is_string($pattern) || '' === $pattern || (bool)preg_match($pattern, $value)) { + return null; + } + return sprintf('Field "%s" on type "%s" value of "%s" does not match pattern: %s', $fieldName, $typeName, $value, $pattern); + } + + /** + * @param string $typeName + * @param string $fieldName + * @param string $ruleName + * @param mixed $constraint + * @param mixed $value + * @return null|string + */ + protected function _performValidation($typeName, $fieldName, $ruleName, $constraint, $value) + { + switch($ruleName) { + case PHPFHIRConstants::VALIDATE_ENUM: + return $this->_assertValueInEnum($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MIN_LENGTH: + return $this->_assertMinLength($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MAX_LENGTH: + return $this->_assertMaxLength($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MIN_OCCURS: + return $this->_assertMinOccurs($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MAX_OCCURS: + return $this->_assertMaxOccurs($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_PATTERN: + return $this->_assertPatternMatch($typeName, $fieldName, $constraint, $value); + + default: + return sprintf('Type "%s" specifies unknown validation for field "%s": Name "%s"; Constraint "%s"', $typeName, $fieldName, $ruleName, var_export($constraint, true)); + } + } +} diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBase64BinaryPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBase64BinaryPrimitive.php index 8869c758ac..f704db7591 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBase64BinaryPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBase64BinaryPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BASE_64BINARY_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type base64Binary-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBase64BinaryPrimitive Constructor @@ -178,11 +180,37 @@ public function _writeToFile($fileHandle) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASE_64BINARY_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBooleanPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBooleanPrimitive.php index ada5ee3838..00bcef5ea0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBooleanPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBooleanPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BOOLEAN_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type boolean-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBooleanPrimitive Constructor @@ -164,11 +166,37 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BOOLEAN_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRCodePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRCodePrimitive.php index 1244b4afdc..a20344a805 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRCodePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRCodePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRCodePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRCodePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type code-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[^\\s]+([\\s][^\\s]+)*$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,11 +171,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDatePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDatePrimitive.php index 5d2214fdb8..bfa0c65b2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDatePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDatePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRDatePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRDatePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type date-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?$/', ], @@ -177,7 +179,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -197,11 +199,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDateTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDateTimePrimitive.php index 6c199247b7..ad5ead213c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDateTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDateTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_TIME_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type dateTime-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?$/', ], @@ -177,7 +179,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -198,11 +200,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_TIME_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDecimalPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDecimalPrimitive.php index a041498a7d..102173a88a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDecimalPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDecimalPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DECIMAL_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type decimal-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^-?([0]|([1-9][0-9]*))(\\.[0-9]+)?$/', ], @@ -168,11 +170,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DECIMAL_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement.php index f3ed089964..1e35a7fc75 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -75,6 +75,7 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ELEMENT; @@ -110,7 +111,7 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterf * Validation map for fields in type Element * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElement Constructor @@ -299,11 +300,38 @@ public function setId($id = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ID] = $fieldErrs; + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAccountStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAccountStatus.php index 8d58e4f25f..2403c194c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAccountStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAccountStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAccountStatus extends FHIRElement * Validation map for fields in type AccountStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAccountStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRActionList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRActionList.php index c4e7dcd9e5..79054bc950 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionList extends FHIRElement * Validation map for fields in type ActionList * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionList Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_LIST, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddress.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddress.php index c1c0c484de..3ed3a24949 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddress.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddress.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -217,7 +217,7 @@ class FHIRAddress extends FHIRElement * Validation map for fields in type Address * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddress Constructor @@ -872,11 +872,222 @@ public function setUse(FHIRAddressUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCountry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNTRY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDistrict())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISTRICT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLine())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPostalCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POSTAL_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CITY])) { + $v = $this->getCity(); + foreach($validationRules[self::FIELD_CITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_CITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CITY])) { + $errs[self::FIELD_CITY] = []; + } + $errs[self::FIELD_CITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNTRY])) { + $v = $this->getCountry(); + foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_COUNTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY])) { + $errs[self::FIELD_COUNTRY] = []; + } + $errs[self::FIELD_COUNTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISTRICT])) { + $v = $this->getDistrict(); + foreach($validationRules[self::FIELD_DISTRICT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_DISTRICT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISTRICT])) { + $errs[self::FIELD_DISTRICT] = []; + } + $errs[self::FIELD_DISTRICT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINE])) { + $v = $this->getLine(); + foreach($validationRules[self::FIELD_LINE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_LINE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINE])) { + $errs[self::FIELD_LINE] = []; + } + $errs[self::FIELD_LINE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POSTAL_CODE])) { + $v = $this->getPostalCode(); + foreach($validationRules[self::FIELD_POSTAL_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_POSTAL_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POSTAL_CODE])) { + $errs[self::FIELD_POSTAL_CODE] = []; + } + $errs[self::FIELD_POSTAL_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATE])) { + $v = $this->getState(); + foreach($validationRules[self::FIELD_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATE])) { + $errs[self::FIELD_STATE] = []; + } + $errs[self::FIELD_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressType.php index 066219f887..1a2e2f28f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAddressType extends FHIRElement * Validation map for fields in type AddressType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddressType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressUse.php index 28f656a6bf..108cf1d258 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAddressUse extends FHIRElement * Validation map for fields in type AddressUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddressUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAdministrativeGender.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAdministrativeGender.php index 7269feb53a..7437cdf749 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAdministrativeGender.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAdministrativeGender.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRAdministrativeGender extends FHIRElement * Validation map for fields in type AdministrativeGender * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdministrativeGender Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADMINISTRATIVE_GENDER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAggregationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAggregationMode.php index bcd1e61d9e..138bc68e77 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAggregationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAggregationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAggregationMode extends FHIRElement * Validation map for fields in type AggregationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAggregationMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCategory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCategory.php index 7e26c35198..a85ad21a43 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAllergyIntoleranceCategory extends FHIRElement * Validation map for fields in type AllergyIntoleranceCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceCategory Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCertainty.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCertainty.php index 5046fc1f9d..e513dd8a64 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCertainty.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCertainty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAllergyIntoleranceCertainty extends FHIRElement * Validation map for fields in type AllergyIntoleranceCertainty * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceCertainty Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CERTAINTY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCriticality.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCriticality.php index 802062f939..5936f702cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCriticality.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCriticality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAllergyIntoleranceCriticality extends FHIRElement * Validation map for fields in type AllergyIntoleranceCriticality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceCriticality Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CRITICALITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceSeverity.php index 055f66fe3f..9b5ca66a54 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAllergyIntoleranceSeverity extends FHIRElement * Validation map for fields in type AllergyIntoleranceSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceSeverity Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceStatus.php index 59e7e3d74a..59010257c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAllergyIntoleranceStatus extends FHIRElement * Validation map for fields in type AllergyIntoleranceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceType.php index f6da2dd765..a4ae0ee588 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAllergyIntoleranceType extends FHIRElement * Validation map for fields in type AllergyIntoleranceType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnnotation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnnotation.php index c5e958157e..b2d18791d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnnotation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnnotation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRAnnotation extends FHIRElement * Validation map for fields in type Annotation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAnnotation Constructor @@ -408,11 +408,118 @@ public function setTime($time = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthorReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthorString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR_REFERENCE])) { + $v = $this->getAuthorReference(); + foreach($validationRules[self::FIELD_AUTHOR_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_AUTHOR_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR_REFERENCE])) { + $errs[self::FIELD_AUTHOR_REFERENCE] = []; + } + $errs[self::FIELD_AUTHOR_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR_STRING])) { + $v = $this->getAuthorString(); + foreach($validationRules[self::FIELD_AUTHOR_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_AUTHOR_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR_STRING])) { + $errs[self::FIELD_AUTHOR_STRING] = []; + } + $errs[self::FIELD_AUTHOR_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnswerFormat.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnswerFormat.php index 18bbc035f4..19e5f86d4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnswerFormat.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnswerFormat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAnswerFormat extends FHIRElement * Validation map for fields in type AnswerFormat * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAnswerFormat Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANSWER_FORMAT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAppointmentStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAppointmentStatus.php index 19fb357784..09b41061a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAppointmentStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAppointmentStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAppointmentStatus extends FHIRElement * Validation map for fields in type AppointmentStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAppointmentStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionDirectionType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionDirectionType.php index 08329b5dd1..a00d9138b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionDirectionType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionDirectionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAssertionDirectionType extends FHIRElement * Validation map for fields in type AssertionDirectionType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAssertionDirectionType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ASSERTION_DIRECTION_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionOperatorType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionOperatorType.php index 907422fa56..bfc469182c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionOperatorType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionOperatorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAssertionOperatorType extends FHIRElement * Validation map for fields in type AssertionOperatorType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAssertionOperatorType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ASSERTION_OPERATOR_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionResponseTypes.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionResponseTypes.php index 7383539177..bbc8a4630f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionResponseTypes.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionResponseTypes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAssertionResponseTypes extends FHIRElement * Validation map for fields in type AssertionResponseTypes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAssertionResponseTypes Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ASSERTION_RESPONSE_TYPES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAttachment.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAttachment.php index e224122607..6d5acfef79 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAttachment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAttachment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -199,7 +199,7 @@ class FHIRAttachment extends FHIRElement * Validation map for fields in type Attachment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAttachment Constructor @@ -746,11 +746,186 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getHash())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HASH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSize())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIZE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATION])) { + $v = $this->getCreation(); + foreach($validationRules[self::FIELD_CREATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_CREATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATION])) { + $errs[self::FIELD_CREATION] = []; + } + $errs[self::FIELD_CREATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HASH])) { + $v = $this->getHash(); + foreach($validationRules[self::FIELD_HASH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_HASH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HASH])) { + $errs[self::FIELD_HASH] = []; + } + $errs[self::FIELD_HASH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIZE])) { + $v = $this->getSize(); + foreach($validationRules[self::FIELD_SIZE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_SIZE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIZE])) { + $errs[self::FIELD_SIZE] = []; + } + $errs[self::FIELD_SIZE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventAction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventAction.php index 1e2b1c85e8..2851d1c16d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventAction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAuditEventAction extends FHIRElement * Validation map for fields in type AuditEventAction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventAction Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_ACTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventOutcome.php index a243de7e0b..cc94228555 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAuditEventOutcome extends FHIRElement * Validation map for fields in type AuditEventOutcome * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventOutcome Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_OUTCOME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventParticipantNetworkType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventParticipantNetworkType.php index 3f1c2f5895..0916fb8773 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventParticipantNetworkType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventParticipantNetworkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAuditEventParticipantNetworkType extends FHIRElement * Validation map for fields in type AuditEventParticipantNetworkType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventParticipantNetworkType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_PARTICIPANT_NETWORK_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement.php index ce25f09aec..7892cec296 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRBackboneElement extends FHIRElement * Validation map for fields in type BackboneElement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBackboneElement Constructor @@ -242,11 +242,69 @@ public function setModifierExtension(array $modifierExtension = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getModifierExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php index eda2ba041c..7f71e50071 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -208,7 +208,7 @@ class FHIRAllergyIntoleranceReaction extends FHIRBackboneElement * Validation map for fields in type AllergyIntolerance.Reaction * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_MANIFESTATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -702,11 +702,200 @@ public function setSubstance(FHIRCodeableConcept $substance = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCertainty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CERTAINTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExposureRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPOSURE_ROUTE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getManifestation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANIFESTATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CERTAINTY])) { + $v = $this->getCertainty(); + foreach($validationRules[self::FIELD_CERTAINTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_CERTAINTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CERTAINTY])) { + $errs[self::FIELD_CERTAINTY] = []; + } + $errs[self::FIELD_CERTAINTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE_ROUTE])) { + $v = $this->getExposureRoute(); + foreach($validationRules[self::FIELD_EXPOSURE_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_EXPOSURE_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE_ROUTE])) { + $errs[self::FIELD_EXPOSURE_ROUTE] = []; + } + $errs[self::FIELD_EXPOSURE_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANIFESTATION])) { + $v = $this->getManifestation(); + foreach($validationRules[self::FIELD_MANIFESTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_MANIFESTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANIFESTATION])) { + $errs[self::FIELD_MANIFESTATION] = []; + } + $errs[self::FIELD_MANIFESTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET])) { + $v = $this->getOnset(); + foreach($validationRules[self::FIELD_ONSET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_ONSET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET])) { + $errs[self::FIELD_ONSET] = []; + } + $errs[self::FIELD_ONSET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php index f25a21da05..42011dd23a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRAppointmentParticipant extends FHIRBackboneElement * Validation map for fields in type Appointment.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAppointmentParticipant Constructor @@ -405,11 +405,132 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED])) { + $v = $this->getRequired(); + foreach($validationRules[self::FIELD_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED])) { + $errs[self::FIELD_REQUIRED] = []; + } + $errs[self::FIELD_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php index 08b54d16ab..85fbb62c96 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRAuditEventDetail extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventDetail Constructor @@ -277,11 +277,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_DETAIL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEvent.php index 2b9cca16e7..462b755a0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -183,7 +183,7 @@ class FHIRAuditEventEvent extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventEvent Constructor @@ -645,11 +645,185 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcomeDesc())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME_DESC] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPurposeOfEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE_OF_EVENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubtype())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBTYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_EVENT, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_EVENT, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_EVENT, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_DESC])) { + $v = $this->getOutcomeDesc(); + foreach($validationRules[self::FIELD_OUTCOME_DESC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_EVENT, self::FIELD_OUTCOME_DESC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_DESC])) { + $errs[self::FIELD_OUTCOME_DESC] = []; + } + $errs[self::FIELD_OUTCOME_DESC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE_OF_EVENT])) { + $v = $this->getPurposeOfEvent(); + foreach($validationRules[self::FIELD_PURPOSE_OF_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_EVENT, self::FIELD_PURPOSE_OF_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE_OF_EVENT])) { + $errs[self::FIELD_PURPOSE_OF_EVENT] = []; + } + $errs[self::FIELD_PURPOSE_OF_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTYPE])) { + $v = $this->getSubtype(); + foreach($validationRules[self::FIELD_SUBTYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_EVENT, self::FIELD_SUBTYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTYPE])) { + $errs[self::FIELD_SUBTYPE] = []; + } + $errs[self::FIELD_SUBTYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_EVENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php index 63c32fa973..4248c55b54 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRAuditEventNetwork extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Network * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventNetwork Constructor @@ -272,11 +272,96 @@ public function setType(FHIRAuditEventParticipantNetworkType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_NETWORK, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_NETWORK, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObject.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObject.php index 6ac7157a4b..356d4b4597 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObject.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObject.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -218,7 +218,7 @@ class FHIRAuditEventObject extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Object * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventObject Constructor @@ -783,11 +783,236 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getLifecycle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIFECYCLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuery())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUERY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_OBJECT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_OBJECT, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_OBJECT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIFECYCLE])) { + $v = $this->getLifecycle(); + foreach($validationRules[self::FIELD_LIFECYCLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_OBJECT, self::FIELD_LIFECYCLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIFECYCLE])) { + $errs[self::FIELD_LIFECYCLE] = []; + } + $errs[self::FIELD_LIFECYCLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_OBJECT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUERY])) { + $v = $this->getQuery(); + foreach($validationRules[self::FIELD_QUERY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_OBJECT, self::FIELD_QUERY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUERY])) { + $errs[self::FIELD_QUERY] = []; + } + $errs[self::FIELD_QUERY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_OBJECT, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_OBJECT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_OBJECT, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_OBJECT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipant.php index 10f14ea02c..9b45945eae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -239,7 +239,7 @@ class FHIRAuditEventParticipant extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventParticipant Constructor @@ -924,11 +924,255 @@ public function setUserId(FHIRIdentifier $userId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAltId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALT_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedia())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POLICY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPurposeOfUse())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE_OF_USE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUserId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USER_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALT_ID])) { + $v = $this->getAltId(); + foreach($validationRules[self::FIELD_ALT_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_ALT_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALT_ID])) { + $errs[self::FIELD_ALT_ID] = []; + } + $errs[self::FIELD_ALT_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIA])) { + $v = $this->getMedia(); + foreach($validationRules[self::FIELD_MEDIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_MEDIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIA])) { + $errs[self::FIELD_MEDIA] = []; + } + $errs[self::FIELD_MEDIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY])) { + $v = $this->getPolicy(); + foreach($validationRules[self::FIELD_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY])) { + $errs[self::FIELD_POLICY] = []; + } + $errs[self::FIELD_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE_OF_USE])) { + $v = $this->getPurposeOfUse(); + foreach($validationRules[self::FIELD_PURPOSE_OF_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_PURPOSE_OF_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE_OF_USE])) { + $errs[self::FIELD_PURPOSE_OF_USE] = []; + } + $errs[self::FIELD_PURPOSE_OF_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTOR])) { + $v = $this->getRequestor(); + foreach($validationRules[self::FIELD_REQUESTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_REQUESTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTOR])) { + $errs[self::FIELD_REQUESTOR] = []; + } + $errs[self::FIELD_REQUESTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USER_ID])) { + $v = $this->getUserId(); + foreach($validationRules[self::FIELD_USER_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_PARTICIPANT, self::FIELD_USER_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USER_ID])) { + $errs[self::FIELD_USER_ID] = []; + } + $errs[self::FIELD_USER_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php index 7985fce112..2d1c7f48f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRAuditEventSource extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventSource Constructor @@ -342,11 +342,115 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_SOURCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_SOURCE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_SOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php index 328805a9f4..abd343f4ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRBundleEntry extends FHIRBackboneElement * Validation map for fields in type Bundle.Entry * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleEntry Constructor @@ -477,11 +477,166 @@ public function setSearch(FHIRBundleSearch $search = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFullUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FULL_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSearch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FULL_URL])) { + $v = $this->getFullUrl(); + foreach($validationRules[self::FIELD_FULL_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_FULL_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FULL_URL])) { + $errs[self::FIELD_FULL_URL] = []; + } + $errs[self::FIELD_FULL_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH])) { + $v = $this->getSearch(); + foreach($validationRules[self::FIELD_SEARCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_SEARCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH])) { + $errs[self::FIELD_SEARCH] = []; + } + $errs[self::FIELD_SEARCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php index a3e4eca42c..934d6f7323 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRBundleLink extends FHIRBackboneElement * Validation map for fields in type Bundle.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleLink Constructor @@ -278,11 +278,96 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getRelation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_RELATION])) { + $v = $this->getRelation(); + foreach($validationRules[self::FIELD_RELATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_LINK, self::FIELD_RELATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATION])) { + $errs[self::FIELD_RELATION] = []; + } + $errs[self::FIELD_RELATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_LINK, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php index 6c08fec47e..8324d80cc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -175,7 +175,7 @@ class FHIRBundleRequest extends FHIRBackboneElement * Validation map for fields in type Bundle.Request * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleRequest Constructor @@ -592,11 +592,164 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIfMatch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_MATCH] = $fieldErrs; + } + } + if (null !== ($v = $this->getIfModifiedSince())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_MODIFIED_SINCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIfNoneExist())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_NONE_EXIST] = $fieldErrs; + } + } + if (null !== ($v = $this->getIfNoneMatch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_NONE_MATCH] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IF_MATCH])) { + $v = $this->getIfMatch(); + foreach($validationRules[self::FIELD_IF_MATCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_MATCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_MATCH])) { + $errs[self::FIELD_IF_MATCH] = []; + } + $errs[self::FIELD_IF_MATCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IF_MODIFIED_SINCE])) { + $v = $this->getIfModifiedSince(); + foreach($validationRules[self::FIELD_IF_MODIFIED_SINCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_MODIFIED_SINCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_MODIFIED_SINCE])) { + $errs[self::FIELD_IF_MODIFIED_SINCE] = []; + } + $errs[self::FIELD_IF_MODIFIED_SINCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IF_NONE_EXIST])) { + $v = $this->getIfNoneExist(); + foreach($validationRules[self::FIELD_IF_NONE_EXIST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_NONE_EXIST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_NONE_EXIST])) { + $errs[self::FIELD_IF_NONE_EXIST] = []; + } + $errs[self::FIELD_IF_NONE_EXIST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IF_NONE_MATCH])) { + $v = $this->getIfNoneMatch(); + foreach($validationRules[self::FIELD_IF_NONE_MATCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_NONE_MATCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_NONE_MATCH])) { + $errs[self::FIELD_IF_NONE_MATCH] = []; + } + $errs[self::FIELD_IF_NONE_MATCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php index e5decdc8f9..49354dec57 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRBundleResponse extends FHIRBackboneElement * Validation map for fields in type Bundle.Response * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleResponse Constructor @@ -433,11 +433,130 @@ public function setStatus($status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEtag())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ETAG] = $fieldErrs; + } + } + if (null !== ($v = $this->getLastModified())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_MODIFIED] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ETAG])) { + $v = $this->getEtag(); + foreach($validationRules[self::FIELD_ETAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_ETAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ETAG])) { + $errs[self::FIELD_ETAG] = []; + } + $errs[self::FIELD_ETAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_MODIFIED])) { + $v = $this->getLastModified(); + foreach($validationRules[self::FIELD_LAST_MODIFIED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_LAST_MODIFIED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_MODIFIED])) { + $errs[self::FIELD_LAST_MODIFIED] = []; + } + $errs[self::FIELD_LAST_MODIFIED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php index b23508ce3a..cb6ca07a84 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRBundleSearch extends FHIRBackboneElement * Validation map for fields in type Bundle.Search * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleSearch Constructor @@ -273,11 +273,96 @@ public function setScore($score = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCORE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_SEARCH, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORE])) { + $v = $this->getScore(); + foreach($validationRules[self::FIELD_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_SEARCH, self::FIELD_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORE])) { + $errs[self::FIELD_SCORE] = []; + } + $errs[self::FIELD_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php index a51cd792a9..7753a881c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRCarePlanActivity extends FHIRBackboneElement * Validation map for fields in type CarePlan.Activity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanActivity Constructor @@ -413,11 +413,134 @@ public function setReference(FHIRReference $reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getActionResulting())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION_RESULTING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION_RESULTING])) { + $v = $this->getActionResulting(); + foreach($validationRules[self::FIELD_ACTION_RESULTING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_ACTION_RESULTING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION_RESULTING])) { + $errs[self::FIELD_ACTION_RESULTING] = []; + } + $errs[self::FIELD_ACTION_RESULTING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRESS])) { + $v = $this->getProgress(); + foreach($validationRules[self::FIELD_PROGRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_PROGRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRESS])) { + $errs[self::FIELD_PROGRESS] = []; + } + $errs[self::FIELD_PROGRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php index ebbdb083b3..fa15cc5b19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -325,7 +325,7 @@ class FHIRCarePlanDetail extends FHIRBackboneElement * Validation map for fields in type CarePlan.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanDetail Constructor @@ -1294,11 +1294,376 @@ public function setStatusReason(FHIRCodeableConcept $statusReason = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDailyAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DAILY_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGoal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProhibited())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROHIBITED] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getScheduledPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAILY_AMOUNT])) { + $v = $this->getDailyAmount(); + foreach($validationRules[self::FIELD_DAILY_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_DAILY_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAILY_AMOUNT])) { + $errs[self::FIELD_DAILY_AMOUNT] = []; + } + $errs[self::FIELD_DAILY_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL])) { + $v = $this->getGoal(); + foreach($validationRules[self::FIELD_GOAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_GOAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL])) { + $errs[self::FIELD_GOAL] = []; + } + $errs[self::FIELD_GOAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $v = $this->getProductCodeableConcept(); + foreach($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PRODUCT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_REFERENCE])) { + $v = $this->getProductReference(); + foreach($validationRules[self::FIELD_PRODUCT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PRODUCT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_REFERENCE])) { + $errs[self::FIELD_PRODUCT_REFERENCE] = []; + } + $errs[self::FIELD_PRODUCT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROHIBITED])) { + $v = $this->getProhibited(); + foreach($validationRules[self::FIELD_PROHIBITED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PROHIBITED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROHIBITED])) { + $errs[self::FIELD_PROHIBITED] = []; + } + $errs[self::FIELD_PROHIBITED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_PERIOD])) { + $v = $this->getScheduledPeriod(); + foreach($validationRules[self::FIELD_SCHEDULED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_SCHEDULED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_PERIOD])) { + $errs[self::FIELD_SCHEDULED_PERIOD] = []; + } + $errs[self::FIELD_SCHEDULED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_STRING])) { + $v = $this->getScheduledString(); + foreach($validationRules[self::FIELD_SCHEDULED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_SCHEDULED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_STRING])) { + $errs[self::FIELD_SCHEDULED_STRING] = []; + } + $errs[self::FIELD_SCHEDULED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_TIMING])) { + $v = $this->getScheduledTiming(); + foreach($validationRules[self::FIELD_SCHEDULED_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_SCHEDULED_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_TIMING])) { + $errs[self::FIELD_SCHEDULED_TIMING] = []; + } + $errs[self::FIELD_SCHEDULED_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php index af2221d49d..7648c4f0eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRCarePlanParticipant extends FHIRBackboneElement * Validation map for fields in type CarePlan.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanParticipant Constructor @@ -236,11 +236,96 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMember())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MEMBER])) { + $v = $this->getMember(); + foreach($validationRules[self::FIELD_MEMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_PARTICIPANT, self::FIELD_MEMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEMBER])) { + $errs[self::FIELD_MEMBER] = []; + } + $errs[self::FIELD_MEMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlan.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlan.php index 7f1bf6f923..2eeea6e691 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlan.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRCarePlanRelatedPlan extends FHIRBackboneElement * Validation map for fields in type CarePlan.RelatedPlan * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanRelatedPlan Constructor @@ -241,11 +241,96 @@ public function setPlan(FHIRReference $plan = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPlan())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PLAN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_RELATED_PLAN, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PLAN])) { + $v = $this->getPlan(); + foreach($validationRules[self::FIELD_PLAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_RELATED_PLAN, self::FIELD_PLAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PLAN])) { + $errs[self::FIELD_PLAN] = []; + } + $errs[self::FIELD_PLAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverage.php index 0bb3fc5c62..813ec67937 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -192,7 +192,7 @@ class FHIRClaimCoverage extends FHIRBackboneElement * Validation map for fields in type Claim.Coverage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimCoverage Constructor @@ -670,11 +670,200 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBusinessArrangement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPreAuthRef())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRE_AUTH_REF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BUSINESS_ARRANGEMENT])) { + $v = $this->getBusinessArrangement(); + foreach($validationRules[self::FIELD_BUSINESS_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_COVERAGE, self::FIELD_BUSINESS_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BUSINESS_ARRANGEMENT])) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = []; + } + $errs[self::FIELD_BUSINESS_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLAIM_RESPONSE])) { + $v = $this->getClaimResponse(); + foreach($validationRules[self::FIELD_CLAIM_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_COVERAGE, self::FIELD_CLAIM_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM_RESPONSE])) { + $errs[self::FIELD_CLAIM_RESPONSE] = []; + } + $errs[self::FIELD_CLAIM_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_COVERAGE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL])) { + $v = $this->getFocal(); + foreach($validationRules[self::FIELD_FOCAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_COVERAGE, self::FIELD_FOCAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL])) { + $errs[self::FIELD_FOCAL] = []; + } + $errs[self::FIELD_FOCAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_COVERAGE, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF])) { + $v = $this->getPreAuthRef(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_COVERAGE, self::FIELD_PRE_AUTH_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF])) { + $errs[self::FIELD_PRE_AUTH_REF] = []; + } + $errs[self::FIELD_PRE_AUTH_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_COVERAGE, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_COVERAGE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php index 6d75e38a27..3f90947f63 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -212,7 +212,7 @@ class FHIRClaimDetail extends FHIRBackboneElement * Validation map for fields in type Claim.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimDetail Constructor @@ -729,11 +729,234 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPoints())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POINTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUdi())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UDI] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POINTS])) { + $v = $this->getPoints(); + foreach($validationRules[self::FIELD_POINTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_POINTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POINTS])) { + $errs[self::FIELD_POINTS] = []; + } + $errs[self::FIELD_POINTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL])) { + $v = $this->getSubDetail(); + foreach($validationRules[self::FIELD_SUB_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_SUB_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL])) { + $errs[self::FIELD_SUB_DETAIL] = []; + } + $errs[self::FIELD_SUB_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php index 9514a7dfc1..c03080cabd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRClaimDiagnosis extends FHIRBackboneElement * Validation map for fields in type Claim.Diagnosis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimDiagnosis Constructor @@ -251,11 +251,96 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiagnosis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php index 109a687856..8c3d86ca3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -301,7 +301,7 @@ class FHIRClaimItem extends FHIRBackboneElement * Validation map for fields in type Claim.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimItem Constructor @@ -1243,11 +1243,359 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDiagnosisLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPoints())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POINTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProsthesis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROSTHESIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServiceDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubSite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUdi())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UDI] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_LINK_ID])) { + $v = $this->getDiagnosisLinkId(); + foreach($validationRules[self::FIELD_DIAGNOSIS_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_DIAGNOSIS_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_LINK_ID])) { + $errs[self::FIELD_DIAGNOSIS_LINK_ID] = []; + } + $errs[self::FIELD_DIAGNOSIS_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POINTS])) { + $v = $this->getPoints(); + foreach($validationRules[self::FIELD_POINTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_POINTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POINTS])) { + $errs[self::FIELD_POINTS] = []; + } + $errs[self::FIELD_POINTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROSTHESIS])) { + $v = $this->getProsthesis(); + foreach($validationRules[self::FIELD_PROSTHESIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_PROSTHESIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROSTHESIS])) { + $errs[self::FIELD_PROSTHESIS] = []; + } + $errs[self::FIELD_PROSTHESIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_DATE])) { + $v = $this->getServiceDate(); + foreach($validationRules[self::FIELD_SERVICE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SERVICE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_DATE])) { + $errs[self::FIELD_SERVICE_DATE] = []; + } + $errs[self::FIELD_SERVICE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_SITE])) { + $v = $this->getSubSite(); + foreach($validationRules[self::FIELD_SUB_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SUB_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_SITE])) { + $errs[self::FIELD_SUB_SITE] = []; + } + $errs[self::FIELD_SUB_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeeth.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeeth.php index 5bfa88130c..c848bcd34c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeeth.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeeth.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRClaimMissingTeeth extends FHIRBackboneElement * Validation map for fields in type Claim.MissingTeeth * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimMissingTeeth Constructor @@ -306,11 +306,113 @@ public function setTooth(FHIRCoding $tooth = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExtractionDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXTRACTION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getTooth())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOOTH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXTRACTION_DATE])) { + $v = $this->getExtractionDate(); + foreach($validationRules[self::FIELD_EXTRACTION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_MISSING_TEETH, self::FIELD_EXTRACTION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTRACTION_DATE])) { + $errs[self::FIELD_EXTRACTION_DATE] = []; + } + $errs[self::FIELD_EXTRACTION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_MISSING_TEETH, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOOTH])) { + $v = $this->getTooth(); + foreach($validationRules[self::FIELD_TOOTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_MISSING_TEETH, self::FIELD_TOOTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOOTH])) { + $errs[self::FIELD_TOOTH] = []; + } + $errs[self::FIELD_TOOTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php index 41c2c102e5..60bbd454ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRClaimPayee extends FHIRBackboneElement * Validation map for fields in type Claim.Payee * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimPayee Constructor @@ -333,11 +333,130 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerson())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERSON] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PAYEE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERSON])) { + $v = $this->getPerson(); + foreach($validationRules[self::FIELD_PERSON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PAYEE, self::FIELD_PERSON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERSON])) { + $errs[self::FIELD_PERSON] = []; + } + $errs[self::FIELD_PERSON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PAYEE, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PAYEE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesis.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesis.php index ce7d9c8d2a..6020227d9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesis.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRClaimProsthesis extends FHIRBackboneElement * Validation map for fields in type Claim.Prosthesis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimProsthesis Constructor @@ -326,11 +326,113 @@ public function setPriorMaterial(FHIRCoding $priorMaterial = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getInitial())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriorDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIOR_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriorMaterial())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIOR_MATERIAL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INITIAL])) { + $v = $this->getInitial(); + foreach($validationRules[self::FIELD_INITIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROSTHESIS, self::FIELD_INITIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL])) { + $errs[self::FIELD_INITIAL] = []; + } + $errs[self::FIELD_INITIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIOR_DATE])) { + $v = $this->getPriorDate(); + foreach($validationRules[self::FIELD_PRIOR_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROSTHESIS, self::FIELD_PRIOR_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIOR_DATE])) { + $errs[self::FIELD_PRIOR_DATE] = []; + } + $errs[self::FIELD_PRIOR_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIOR_MATERIAL])) { + $v = $this->getPriorMaterial(); + foreach($validationRules[self::FIELD_PRIOR_MATERIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROSTHESIS, self::FIELD_PRIOR_MATERIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIOR_MATERIAL])) { + $errs[self::FIELD_PRIOR_MATERIAL] = []; + } + $errs[self::FIELD_PRIOR_MATERIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php index b84ef0d591..1c93a5db96 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -199,7 +199,7 @@ class FHIRClaimSubDetail extends FHIRBackboneElement * Validation map for fields in type Claim.SubDetail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimSubDetail Constructor @@ -641,11 +641,215 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPoints())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POINTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUdi())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UDI] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POINTS])) { + $v = $this->getPoints(); + foreach($validationRules[self::FIELD_POINTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_POINTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POINTS])) { + $errs[self::FIELD_POINTS] = []; + } + $errs[self::FIELD_POINTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php index 0378992c1b..20d5202f01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -156,7 +156,7 @@ class FHIRClaimResponseAddItem extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.AddItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseAddItem Constructor @@ -609,11 +609,172 @@ public function setService(FHIRCoding $service = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FEE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumberLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER_LINK_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSequenceLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEQUENCE_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FEE])) { + $v = $this->getFee(); + foreach($validationRules[self::FIELD_FEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_FEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FEE])) { + $errs[self::FIELD_FEE] = []; + } + $errs[self::FIELD_FEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER_LINK_ID])) { + $v = $this->getNoteNumberLinkId(); + foreach($validationRules[self::FIELD_NOTE_NUMBER_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_NOTE_NUMBER_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER_LINK_ID])) { + $errs[self::FIELD_NOTE_NUMBER_LINK_ID] = []; + } + $errs[self::FIELD_NOTE_NUMBER_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php index 7aea4e317f..2f5aedacdb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRClaimResponseAdjudication extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Adjudication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseAdjudication Constructor @@ -295,11 +295,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1.php index 3c8bb5ecc4..19facf62fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRClaimResponseAdjudication1 extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Adjudication1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseAdjudication1 Constructor @@ -295,11 +295,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_1, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_1, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_1, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2.php index ff3c74b647..12db456675 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRClaimResponseAdjudication2 extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Adjudication2 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseAdjudication2 Constructor @@ -295,11 +295,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_2, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_2, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_2, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3.php index 73b5292c7d..174afd0ac1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRClaimResponseAdjudication3 extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Adjudication3 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseAdjudication3 Constructor @@ -295,11 +295,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_3, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_3, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_3, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4.php index 66addaa48a..f9f6ec13cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRClaimResponseAdjudication4 extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Adjudication4 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseAdjudication4 Constructor @@ -295,11 +295,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_4, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_4, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION_4, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverage.php index 09f544bd9e..cc407d4fd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -192,7 +192,7 @@ class FHIRClaimResponseCoverage extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Coverage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseCoverage Constructor @@ -670,11 +670,200 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBusinessArrangement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPreAuthRef())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRE_AUTH_REF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BUSINESS_ARRANGEMENT])) { + $v = $this->getBusinessArrangement(); + foreach($validationRules[self::FIELD_BUSINESS_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_COVERAGE, self::FIELD_BUSINESS_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BUSINESS_ARRANGEMENT])) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = []; + } + $errs[self::FIELD_BUSINESS_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLAIM_RESPONSE])) { + $v = $this->getClaimResponse(); + foreach($validationRules[self::FIELD_CLAIM_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_COVERAGE, self::FIELD_CLAIM_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM_RESPONSE])) { + $errs[self::FIELD_CLAIM_RESPONSE] = []; + } + $errs[self::FIELD_CLAIM_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_COVERAGE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL])) { + $v = $this->getFocal(); + foreach($validationRules[self::FIELD_FOCAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_COVERAGE, self::FIELD_FOCAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL])) { + $errs[self::FIELD_FOCAL] = []; + } + $errs[self::FIELD_FOCAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_COVERAGE, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF])) { + $v = $this->getPreAuthRef(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_COVERAGE, self::FIELD_PRE_AUTH_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF])) { + $errs[self::FIELD_PRE_AUTH_REF] = []; + } + $errs[self::FIELD_PRE_AUTH_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_COVERAGE, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_COVERAGE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php index 373828b2a4..fa0c75e310 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRClaimResponseDetail extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseDetail Constructor @@ -365,11 +365,117 @@ public function setSubDetail(array $subDetail = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL])) { + $v = $this->getSubDetail(); + foreach($validationRules[self::FIELD_SUB_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_SUB_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL])) { + $errs[self::FIELD_SUB_DETAIL] = []; + } + $errs[self::FIELD_SUB_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php index 337b508de6..4ebfda7065 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRClaimResponseDetail1 extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Detail1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseDetail1 Constructor @@ -296,11 +296,115 @@ public function setService(FHIRCoding $service = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FEE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FEE])) { + $v = $this->getFee(); + foreach($validationRules[self::FIELD_FEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_FEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FEE])) { + $errs[self::FIELD_FEE] = []; + } + $errs[self::FIELD_FEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php index 748ba93497..1d5b52aede 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRClaimResponseError extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Error * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseError Constructor @@ -417,11 +417,130 @@ public function setSubdetailSequenceLinkId($subdetailSequenceLinkId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubdetailSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { + $v = $this->getDetailSequenceLinkId(); + foreach($validationRules[self::FIELD_DETAIL_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_DETAIL_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_DETAIL_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_DETAIL_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { + $v = $this->getSubdetailSequenceLinkId(); + foreach($validationRules[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php index e341650919..e48aead723 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRClaimResponseItem extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseItem Constructor @@ -480,11 +480,136 @@ public function setSequenceLinkId($sequenceLinkId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNote.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNote.php index 2b79fa6af2..a441fa363b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNote.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRClaimResponseNote extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Note * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseNote Constructor @@ -329,11 +329,113 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_NOTE, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_NOTE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_NOTE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php index d93725f5c0..d34d6c8a79 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRClaimResponseSubDetail extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.SubDetail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseSubDetail Constructor @@ -283,11 +283,98 @@ public function setSequenceLinkId($sequenceLinkId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php index 83cd314ec3..3eff8e70f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRClinicalImpressionFinding extends FHIRBackboneElement * Validation map for fields in type ClinicalImpression.Finding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpressionFinding Constructor @@ -259,11 +259,96 @@ public function setItem(FHIRCodeableConcept $item = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCause())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAUSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CAUSE])) { + $v = $this->getCause(); + foreach($validationRules[self::FIELD_CAUSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_FINDING, self::FIELD_CAUSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAUSE])) { + $errs[self::FIELD_CAUSE] = []; + } + $errs[self::FIELD_CAUSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_FINDING, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigations.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigations.php index f6ffbee74a..6ead81ab90 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigations.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigations.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRClinicalImpressionInvestigations extends FHIRBackboneElement * Validation map for fields in type ClinicalImpression.Investigations * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpressionInvestigations Constructor @@ -280,11 +280,98 @@ public function setItem(array $item = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_INVESTIGATIONS, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_INVESTIGATIONS, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOut.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOut.php index 0172fdffcc..a4cc8bfab2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOut.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOut.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRClinicalImpressionRuledOut extends FHIRBackboneElement * Validation map for fields in type ClinicalImpression.RuledOut * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpressionRuledOut Constructor @@ -259,11 +259,96 @@ public function setReason($reason = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_RULED_OUT, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_RULED_OUT, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php index b2595d817a..0c4c0a41b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRCommunicationPayload extends FHIRBackboneElement * Validation map for fields in type Communication.Payload * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationPayload Constructor @@ -311,11 +311,113 @@ public function setContentString($contentString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_DOT_PAYLOAD, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_DOT_PAYLOAD, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_STRING])) { + $v = $this->getContentString(); + foreach($validationRules[self::FIELD_CONTENT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_DOT_PAYLOAD, self::FIELD_CONTENT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_STRING])) { + $errs[self::FIELD_CONTENT_STRING] = []; + } + $errs[self::FIELD_CONTENT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php index 83f9b72f14..22a867afce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRCommunicationRequestPayload extends FHIRBackboneElement * Validation map for fields in type CommunicationRequest.Payload * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationRequestPayload Constructor @@ -311,11 +311,113 @@ public function setContentString($contentString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_PAYLOAD, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_PAYLOAD, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_STRING])) { + $v = $this->getContentString(); + foreach($validationRules[self::FIELD_CONTENT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_PAYLOAD, self::FIELD_CONTENT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_STRING])) { + $errs[self::FIELD_CONTENT_STRING] = []; + } + $errs[self::FIELD_CONTENT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php index 18442d7f00..5012f3ae2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRCompositionAttester extends FHIRBackboneElement * Validation map for fields in type Composition.Attester * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_MODE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -372,11 +372,115 @@ public function setTime($time = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getMode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php index 14585fe1f1..312b50d18a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRCompositionEvent extends FHIRBackboneElement * Validation map for fields in type Composition.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionEvent Constructor @@ -380,11 +380,117 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php index c4f3c03bf1..93d5f2cee9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -209,7 +209,7 @@ class FHIRCompositionSection extends FHIRBackboneElement * Validation map for fields in type Composition.Section * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionSection Constructor @@ -706,11 +706,202 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEmptyReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EMPTY_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTRY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_BY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSection())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EMPTY_REASON])) { + $v = $this->getEmptyReason(); + foreach($validationRules[self::FIELD_EMPTY_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_EMPTY_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EMPTY_REASON])) { + $errs[self::FIELD_EMPTY_REASON] = []; + } + $errs[self::FIELD_EMPTY_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTRY])) { + $v = $this->getEntry(); + foreach($validationRules[self::FIELD_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY])) { + $errs[self::FIELD_ENTRY] = []; + } + $errs[self::FIELD_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_BY])) { + $v = $this->getOrderedBy(); + foreach($validationRules[self::FIELD_ORDERED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_ORDERED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_BY])) { + $errs[self::FIELD_ORDERED_BY] = []; + } + $errs[self::FIELD_ORDERED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECTION])) { + $v = $this->getSection(); + foreach($validationRules[self::FIELD_SECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_SECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECTION])) { + $errs[self::FIELD_SECTION] = []; + } + $errs[self::FIELD_SECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContact.php index a6fe7167ca..d1ee21c90a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRConceptMapContact extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapContact Constructor @@ -292,11 +292,98 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php index 2df7d92015..47ec7f878d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRConceptMapDependsOn extends FHIRBackboneElement * Validation map for fields in type ConceptMap.DependsOn * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapDependsOn Constructor @@ -365,11 +365,113 @@ public function setElement($element = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCodeSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getElement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELEMENT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE_SYSTEM])) { + $v = $this->getCodeSystem(); + foreach($validationRules[self::FIELD_CODE_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_CODE_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_SYSTEM])) { + $errs[self::FIELD_CODE_SYSTEM] = []; + } + $errs[self::FIELD_CODE_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php index 05354d1555..423909ec19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRConceptMapElement extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Element * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapElement Constructor @@ -364,11 +364,115 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCodeSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_SYSTEM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_ELEMENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE_SYSTEM])) { + $v = $this->getCodeSystem(); + foreach($validationRules[self::FIELD_CODE_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_ELEMENT, self::FIELD_CODE_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_SYSTEM])) { + $errs[self::FIELD_CODE_SYSTEM] = []; + } + $errs[self::FIELD_CODE_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_ELEMENT, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php index 4f74c67c54..6fe4f22655 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -173,7 +173,7 @@ class FHIRConceptMapTarget extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapTarget Constructor @@ -627,11 +627,168 @@ public function setProduct(array $product = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCodeSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getComments())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENTS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDependsOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEPENDS_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEquivalence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EQUIVALENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProduct())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRODUCT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE_SYSTEM])) { + $v = $this->getCodeSystem(); + foreach($validationRules[self::FIELD_CODE_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_CODE_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_SYSTEM])) { + $errs[self::FIELD_CODE_SYSTEM] = []; + } + $errs[self::FIELD_CODE_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENTS])) { + $v = $this->getComments(); + foreach($validationRules[self::FIELD_COMMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_COMMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENTS])) { + $errs[self::FIELD_COMMENTS] = []; + } + $errs[self::FIELD_COMMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDS_ON])) { + $v = $this->getDependsOn(); + foreach($validationRules[self::FIELD_DEPENDS_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_DEPENDS_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDS_ON])) { + $errs[self::FIELD_DEPENDS_ON] = []; + } + $errs[self::FIELD_DEPENDS_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EQUIVALENCE])) { + $v = $this->getEquivalence(); + foreach($validationRules[self::FIELD_EQUIVALENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_EQUIVALENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EQUIVALENCE])) { + $errs[self::FIELD_EQUIVALENCE] = []; + } + $errs[self::FIELD_EQUIVALENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT])) { + $v = $this->getProduct(); + foreach($validationRules[self::FIELD_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT])) { + $errs[self::FIELD_PRODUCT] = []; + } + $errs[self::FIELD_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php index d94bfaa103..1bebe24af4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRConditionEvidence extends FHIRBackboneElement * Validation map for fields in type Condition.Evidence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionEvidence Constructor @@ -268,11 +268,98 @@ public function setDetail(array $detail = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_EVIDENCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_EVIDENCE, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php index 3d6b1778fd..a575a705a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRConditionStage extends FHIRBackboneElement * Validation map for fields in type Condition.Stage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionStage Constructor @@ -275,11 +275,98 @@ public function setSummary(FHIRCodeableConcept $summary = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAssessment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ASSESSMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSummary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUMMARY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSESSMENT])) { + $v = $this->getAssessment(); + foreach($validationRules[self::FIELD_ASSESSMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_STAGE, self::FIELD_ASSESSMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSESSMENT])) { + $errs[self::FIELD_ASSESSMENT] = []; + } + $errs[self::FIELD_ASSESSMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUMMARY])) { + $v = $this->getSummary(); + foreach($validationRules[self::FIELD_SUMMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_STAGE, self::FIELD_SUMMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUMMARY])) { + $errs[self::FIELD_SUMMARY] = []; + } + $errs[self::FIELD_SUMMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php index e22e1c2367..86327ad9cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRConformanceCertificate extends FHIRBackboneElement * Validation map for fields in type Conformance.Certificate * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceCertificate Constructor @@ -280,11 +280,96 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBlob())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BLOB] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BLOB])) { + $v = $this->getBlob(); + foreach($validationRules[self::FIELD_BLOB] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_CERTIFICATE, self::FIELD_BLOB, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BLOB])) { + $errs[self::FIELD_BLOB] = []; + } + $errs[self::FIELD_BLOB][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_CERTIFICATE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContact.php index 0c39e5f94a..0434e2dc80 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRConformanceContact extends FHIRBackboneElement * Validation map for fields in type Conformance.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceContact Constructor @@ -293,11 +293,98 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php index 9eba3159e4..23dbf1a902 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRConformanceDocument extends FHIRBackboneElement * Validation map for fields in type Conformance.Document * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceDocument Constructor @@ -322,11 +322,113 @@ public function setProfile(FHIRReference $profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_DOCUMENT, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_DOCUMENT, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_DOCUMENT, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpoint.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpoint.php index 9226e9447f..7aa9623b7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpoint.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRConformanceEndpoint extends FHIRBackboneElement * Validation map for fields in type Conformance.Endpoint * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceEndpoint Constructor @@ -258,11 +258,96 @@ public function setProtocol(FHIRCoding $protocol = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProtocol())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROTOCOL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_ENDPOINT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_ENDPOINT, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php index 62c70e827e..99819dac9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -181,7 +181,7 @@ class FHIRConformanceEvent extends FHIRBackboneElement * Validation map for fields in type Conformance.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceEvent Constructor @@ -563,11 +563,181 @@ public function setResponse(FHIRReference $response = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_EVENT, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php index 5c38e71cb2..6bf630ccd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRConformanceImplementation extends FHIRBackboneElement * Validation map for fields in type Conformance.Implementation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceImplementation Constructor @@ -283,11 +283,96 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_IMPLEMENTATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_IMPLEMENTATION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction.php index ad79895aba..abba7ba645 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRConformanceInteraction extends FHIRBackboneElement * Validation map for fields in type Conformance.Interaction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceInteraction Constructor @@ -272,11 +272,96 @@ public function setDocumentation($documentation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_INTERACTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_INTERACTION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1.php index 9d8e47cfb0..f47301fd97 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRConformanceInteraction1 extends FHIRBackboneElement * Validation map for fields in type Conformance.Interaction1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceInteraction1 Constructor @@ -272,11 +272,96 @@ public function setDocumentation($documentation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_INTERACTION_1, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_INTERACTION_1, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php index 932d1d9db0..80dcfef528 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRConformanceMessaging extends FHIRBackboneElement * Validation map for fields in type Conformance.Messaging * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_EVENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -466,11 +466,134 @@ public function setReliableCache($reliableCache = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReliableCache())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELIABLE_CACHE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_MESSAGING, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_MESSAGING, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_MESSAGING, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELIABLE_CACHE])) { + $v = $this->getReliableCache(); + foreach($validationRules[self::FIELD_RELIABLE_CACHE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_MESSAGING, self::FIELD_RELIABLE_CACHE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELIABLE_CACHE])) { + $errs[self::FIELD_RELIABLE_CACHE] = []; + } + $errs[self::FIELD_RELIABLE_CACHE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php index 3bcb1d3c31..b0576c8184 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRConformanceOperation extends FHIRBackboneElement * Validation map for fields in type Conformance.Operation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceOperation Constructor @@ -255,11 +255,96 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_OPERATION, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_OPERATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php index 690f39e3ae..73b2639d13 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -254,7 +254,7 @@ class FHIRConformanceResource extends FHIRBackboneElement * Validation map for fields in type Conformance.Resource * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INTERACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1119,11 +1119,274 @@ public function setVersioning(FHIRResourceVersionPolicy $versioning = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getConditionalCreate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_CREATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getConditionalDelete())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_DELETE] = $fieldErrs; + } + } + if (null !== ($v = $this->getConditionalUpdate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_UPDATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInteraction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReadHistory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_READ_HISTORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSearchInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_INCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_PARAM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchRevInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_REV_INCLUDE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUpdateCreate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UPDATE_CREATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersioning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSIONING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_CREATE])) { + $v = $this->getConditionalCreate(); + foreach($validationRules[self::FIELD_CONDITIONAL_CREATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_CONDITIONAL_CREATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_CREATE])) { + $errs[self::FIELD_CONDITIONAL_CREATE] = []; + } + $errs[self::FIELD_CONDITIONAL_CREATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_DELETE])) { + $v = $this->getConditionalDelete(); + foreach($validationRules[self::FIELD_CONDITIONAL_DELETE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_CONDITIONAL_DELETE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_DELETE])) { + $errs[self::FIELD_CONDITIONAL_DELETE] = []; + } + $errs[self::FIELD_CONDITIONAL_DELETE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_UPDATE])) { + $v = $this->getConditionalUpdate(); + foreach($validationRules[self::FIELD_CONDITIONAL_UPDATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_CONDITIONAL_UPDATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_UPDATE])) { + $errs[self::FIELD_CONDITIONAL_UPDATE] = []; + } + $errs[self::FIELD_CONDITIONAL_UPDATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERACTION])) { + $v = $this->getInteraction(); + foreach($validationRules[self::FIELD_INTERACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_INTERACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERACTION])) { + $errs[self::FIELD_INTERACTION] = []; + } + $errs[self::FIELD_INTERACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_READ_HISTORY])) { + $v = $this->getReadHistory(); + foreach($validationRules[self::FIELD_READ_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_READ_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_READ_HISTORY])) { + $errs[self::FIELD_READ_HISTORY] = []; + } + $errs[self::FIELD_READ_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_INCLUDE])) { + $v = $this->getSearchInclude(); + foreach($validationRules[self::FIELD_SEARCH_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_SEARCH_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_INCLUDE])) { + $errs[self::FIELD_SEARCH_INCLUDE] = []; + } + $errs[self::FIELD_SEARCH_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_PARAM])) { + $v = $this->getSearchParam(); + foreach($validationRules[self::FIELD_SEARCH_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_SEARCH_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_PARAM])) { + $errs[self::FIELD_SEARCH_PARAM] = []; + } + $errs[self::FIELD_SEARCH_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_REV_INCLUDE])) { + $v = $this->getSearchRevInclude(); + foreach($validationRules[self::FIELD_SEARCH_REV_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_SEARCH_REV_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_REV_INCLUDE])) { + $errs[self::FIELD_SEARCH_REV_INCLUDE] = []; + } + $errs[self::FIELD_SEARCH_REV_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UPDATE_CREATE])) { + $v = $this->getUpdateCreate(); + foreach($validationRules[self::FIELD_UPDATE_CREATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_UPDATE_CREATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UPDATE_CREATE])) { + $errs[self::FIELD_UPDATE_CREATE] = []; + } + $errs[self::FIELD_UPDATE_CREATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSIONING])) { + $v = $this->getVersioning(); + foreach($validationRules[self::FIELD_VERSIONING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_RESOURCE, self::FIELD_VERSIONING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSIONING])) { + $errs[self::FIELD_VERSIONING] = []; + } + $errs[self::FIELD_VERSIONING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php index 17c0387e2d..d8a08e3cfe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -209,7 +209,7 @@ class FHIRConformanceRest extends FHIRBackboneElement * Validation map for fields in type Conformance.Rest * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RESOURCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -876,11 +876,225 @@ public function setTransactionMode(FHIRTransactionMode $transactionMode = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCompartment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPARTMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInteraction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOperation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPERATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_PARAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSecurity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SECURITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getTransactionMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRANSACTION_MODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPARTMENT])) { + $v = $this->getCompartment(); + foreach($validationRules[self::FIELD_COMPARTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_COMPARTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARTMENT])) { + $errs[self::FIELD_COMPARTMENT] = []; + } + $errs[self::FIELD_COMPARTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERACTION])) { + $v = $this->getInteraction(); + foreach($validationRules[self::FIELD_INTERACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_INTERACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERACTION])) { + $errs[self::FIELD_INTERACTION] = []; + } + $errs[self::FIELD_INTERACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_PARAM])) { + $v = $this->getSearchParam(); + foreach($validationRules[self::FIELD_SEARCH_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_SEARCH_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_PARAM])) { + $errs[self::FIELD_SEARCH_PARAM] = []; + } + $errs[self::FIELD_SEARCH_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY])) { + $v = $this->getSecurity(); + foreach($validationRules[self::FIELD_SECURITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_SECURITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY])) { + $errs[self::FIELD_SECURITY] = []; + } + $errs[self::FIELD_SECURITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRANSACTION_MODE])) { + $v = $this->getTransactionMode(); + foreach($validationRules[self::FIELD_TRANSACTION_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_REST, self::FIELD_TRANSACTION_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSACTION_MODE])) { + $errs[self::FIELD_TRANSACTION_MODE] = []; + } + $errs[self::FIELD_TRANSACTION_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php index f329612f2b..7f733989e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -191,7 +191,7 @@ class FHIRConformanceSearchParam extends FHIRBackboneElement * Validation map for fields in type Conformance.SearchParam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceSearchParam Constructor @@ -799,11 +799,187 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getChain())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHAIN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CHAIN])) { + $v = $this->getChain(); + foreach($validationRules[self::FIELD_CHAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_CHAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHAIN])) { + $errs[self::FIELD_CHAIN] = []; + } + $errs[self::FIELD_CHAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SEARCH_PARAM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php index b4d29e9d8e..bf0db415a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRConformanceSecurity extends FHIRBackboneElement * Validation map for fields in type Conformance.Security * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceSecurity Constructor @@ -454,11 +454,134 @@ public function setService(array $service = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCertificate())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CERTIFICATE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCors())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CORS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getService())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CERTIFICATE])) { + $v = $this->getCertificate(); + foreach($validationRules[self::FIELD_CERTIFICATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SECURITY, self::FIELD_CERTIFICATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CERTIFICATE])) { + $errs[self::FIELD_CERTIFICATE] = []; + } + $errs[self::FIELD_CERTIFICATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CORS])) { + $v = $this->getCors(); + foreach($validationRules[self::FIELD_CORS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SECURITY, self::FIELD_CORS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CORS])) { + $errs[self::FIELD_CORS] = []; + } + $errs[self::FIELD_CORS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SECURITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SECURITY, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php index 5dc4880988..833c5217ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRConformanceSoftware extends FHIRBackboneElement * Validation map for fields in type Conformance.Software * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceSoftware Constructor @@ -360,11 +360,113 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getReleaseDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELEASE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SOFTWARE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEASE_DATE])) { + $v = $this->getReleaseDate(); + foreach($validationRules[self::FIELD_RELEASE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SOFTWARE, self::FIELD_RELEASE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEASE_DATE])) { + $errs[self::FIELD_RELEASE_DATE] = []; + } + $errs[self::FIELD_RELEASE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_DOT_SOFTWARE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor.php index 91fe9b4560..84ed7ab6f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRContractActor extends FHIRBackboneElement * Validation map for fields in type Contract.Actor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractActor Constructor @@ -267,11 +267,98 @@ public function setRole(array $role = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEntity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTOR, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTOR, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1.php index cc3fab230a..749ca885ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRContractActor1 extends FHIRBackboneElement * Validation map for fields in type Contract.Actor1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractActor1 Constructor @@ -267,11 +267,98 @@ public function setRole(array $role = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEntity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTOR_1, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTOR_1, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php index 5dbe38b4ec..6d920dbea5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRContractFriendly extends FHIRBackboneElement * Validation map for fields in type Contract.Friendly * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractFriendly Constructor @@ -232,11 +232,96 @@ public function setContentReference(FHIRReference $contentReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_FRIENDLY, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_FRIENDLY, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php index 17e6649b3a..25cd180d4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRContractLegal extends FHIRBackboneElement * Validation map for fields in type Contract.Legal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractLegal Constructor @@ -226,11 +226,96 @@ public function setContentReference(FHIRReference $contentReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_LEGAL, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_LEGAL, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php index 338f4f282a..be82c0094a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRContractRule extends FHIRBackboneElement * Validation map for fields in type Contract.Rule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractRule Constructor @@ -232,11 +232,96 @@ public function setContentReference(FHIRReference $contentReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_RULE, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_RULE, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php index f4e01e975c..1ad1085e99 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRContractSigner extends FHIRBackboneElement * Validation map for fields in type Contract.Signer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractSigner Constructor @@ -301,11 +301,113 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SIGNER, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNATURE])) { + $v = $this->getSignature(); + foreach($validationRules[self::FIELD_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SIGNER, self::FIELD_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNATURE])) { + $errs[self::FIELD_SIGNATURE] = []; + } + $errs[self::FIELD_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SIGNER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php index 966bd1edc5..ebad876729 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -243,7 +243,7 @@ class FHIRContractTerm extends FHIRBackboneElement * Validation map for fields in type Contract.Term * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractTerm Constructor @@ -972,11 +972,276 @@ public function setValuedItem(array $valuedItem = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getActionReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getActor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getApplies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPLIES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValuedItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUED_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTION_REASON])) { + $v = $this->getActionReason(); + foreach($validationRules[self::FIELD_ACTION_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_ACTION_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION_REASON])) { + $errs[self::FIELD_ACTION_REASON] = []; + } + $errs[self::FIELD_ACTION_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPLIES])) { + $v = $this->getApplies(); + foreach($validationRules[self::FIELD_APPLIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_APPLIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES])) { + $errs[self::FIELD_APPLIES] = []; + } + $errs[self::FIELD_APPLIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUED_ITEM])) { + $v = $this->getValuedItem(); + foreach($validationRules[self::FIELD_VALUED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_VALUED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUED_ITEM])) { + $errs[self::FIELD_VALUED_ITEM] = []; + } + $errs[self::FIELD_VALUED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php index 3ea7c8d878..4af930be48 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -207,7 +207,7 @@ class FHIRContractValuedItem extends FHIRBackboneElement * Validation map for fields in type Contract.ValuedItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractValuedItem Constructor @@ -661,11 +661,215 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEffectiveTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntityCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntityReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPoints())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POINTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_TIME])) { + $v = $this->getEffectiveTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_EFFECTIVE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_TIME])) { + $errs[self::FIELD_EFFECTIVE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { + $v = $this->getEntityCodeableConcept(); + foreach($validationRules[self::FIELD_ENTITY_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_ENTITY_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY_REFERENCE])) { + $v = $this->getEntityReference(); + foreach($validationRules[self::FIELD_ENTITY_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_ENTITY_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY_REFERENCE])) { + $errs[self::FIELD_ENTITY_REFERENCE] = []; + } + $errs[self::FIELD_ENTITY_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POINTS])) { + $v = $this->getPoints(); + foreach($validationRules[self::FIELD_POINTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_POINTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POINTS])) { + $errs[self::FIELD_POINTS] = []; + } + $errs[self::FIELD_POINTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php index 33c290f4f4..839dbe2c16 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -209,7 +209,7 @@ class FHIRContractValuedItem1 extends FHIRBackboneElement * Validation map for fields in type Contract.ValuedItem1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractValuedItem1 Constructor @@ -667,11 +667,215 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEffectiveTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntityCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntityReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPoints())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POINTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_TIME])) { + $v = $this->getEffectiveTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_EFFECTIVE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_TIME])) { + $errs[self::FIELD_EFFECTIVE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { + $v = $this->getEntityCodeableConcept(); + foreach($validationRules[self::FIELD_ENTITY_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_ENTITY_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY_REFERENCE])) { + $v = $this->getEntityReference(); + foreach($validationRules[self::FIELD_ENTITY_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_ENTITY_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY_REFERENCE])) { + $errs[self::FIELD_ENTITY_REFERENCE] = []; + } + $errs[self::FIELD_ENTITY_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POINTS])) { + $v = $this->getPoints(); + foreach($validationRules[self::FIELD_POINTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_POINTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POINTS])) { + $errs[self::FIELD_POINTS] = []; + } + $errs[self::FIELD_POINTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContact.php index 0909e29f2b..ece94367a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRDataElementContact extends FHIRBackboneElement * Validation map for fields in type DataElement.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataElementContact Constructor @@ -292,11 +292,98 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php index 0562ee1399..3bc12c5bed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRDataElementMapping extends FHIRBackboneElement * Validation map for fields in type DataElement.Mapping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataElementMapping Constructor @@ -443,11 +443,130 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComments())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENTS])) { + $v = $this->getComments(); + foreach($validationRules[self::FIELD_COMMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_DOT_MAPPING, self::FIELD_COMMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENTS])) { + $errs[self::FIELD_COMMENTS] = []; + } + $errs[self::FIELD_COMMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTITY])) { + $v = $this->getIdentity(); + foreach($validationRules[self::FIELD_IDENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_DOT_MAPPING, self::FIELD_IDENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY])) { + $errs[self::FIELD_IDENTITY] = []; + } + $errs[self::FIELD_IDENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_DOT_MAPPING, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_DOT_MAPPING, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php index 3cfa65ac4c..db8af2a698 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRDetectedIssueMitigation extends FHIRBackboneElement * Validation map for fields in type DetectedIssue.Mitigation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDetectedIssueMitigation Constructor @@ -320,11 +320,113 @@ public function setDate($date = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_MITIGATION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_MITIGATION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_MITIGATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php index 96bf5f791e..33a5e26da3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRDeviceComponentProductionSpecification extends FHIRBackboneElement * Validation map for fields in type DeviceComponent.ProductionSpecification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceComponentProductionSpecification Constructor @@ -313,11 +313,113 @@ public function setSpecType(FHIRCodeableConcept $specType = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComponentId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPONENT_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductionSpec())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCTION_SPEC] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPEC_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPONENT_ID])) { + $v = $this->getComponentId(); + foreach($validationRules[self::FIELD_COMPONENT_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT_DOT_PRODUCTION_SPECIFICATION, self::FIELD_COMPONENT_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPONENT_ID])) { + $errs[self::FIELD_COMPONENT_ID] = []; + } + $errs[self::FIELD_COMPONENT_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCTION_SPEC])) { + $v = $this->getProductionSpec(); + foreach($validationRules[self::FIELD_PRODUCTION_SPEC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT_DOT_PRODUCTION_SPECIFICATION, self::FIELD_PRODUCTION_SPEC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCTION_SPEC])) { + $errs[self::FIELD_PRODUCTION_SPEC] = []; + } + $errs[self::FIELD_PRODUCTION_SPEC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPEC_TYPE])) { + $v = $this->getSpecType(); + foreach($validationRules[self::FIELD_SPEC_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT_DOT_PRODUCTION_SPECIFICATION, self::FIELD_SPEC_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPEC_TYPE])) { + $errs[self::FIELD_SPEC_TYPE] = []; + } + $errs[self::FIELD_SPEC_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php index f1c920ffc1..99093efd2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRDeviceMetricCalibration extends FHIRBackboneElement * Validation map for fields in type DeviceMetric.Calibration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCalibration Constructor @@ -334,11 +334,113 @@ public function setType(FHIRDeviceMetricCalibrationType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_STATE])) { + $v = $this->getState(); + foreach($validationRules[self::FIELD_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_DOT_CALIBRATION, self::FIELD_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATE])) { + $errs[self::FIELD_STATE] = []; + } + $errs[self::FIELD_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_DOT_CALIBRATION, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_DOT_CALIBRATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php index 283eba48c2..af23d85266 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRDiagnosticOrderEvent extends FHIRBackboneElement * Validation map for fields in type DiagnosticOrder.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticOrderEvent Constructor @@ -379,11 +379,130 @@ public function setStatus(FHIRDiagnosticOrderStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_EVENT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_EVENT, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_EVENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_EVENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php index 948561cc35..dc174d2f95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -150,7 +150,7 @@ class FHIRDiagnosticOrderItem extends FHIRBackboneElement * Validation map for fields in type DiagnosticOrder.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticOrderItem Constructor @@ -469,11 +469,151 @@ public function setStatus(FHIRDiagnosticOrderStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_ITEM, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_ITEM, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_ITEM, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_ITEM, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_DOT_ITEM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php index 4f9556dfd4..51ae3b2a0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRDiagnosticReportImage extends FHIRBackboneElement * Validation map for fields in type DiagnosticReport.Image * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReportImage Constructor @@ -260,11 +260,96 @@ public function setLink(FHIRReference $link = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLink())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_DOT_IMAGE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_DOT_IMAGE, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php index aa78fb6b3e..2978bb5455 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRDocumentManifestContent extends FHIRBackboneElement * Validation map for fields in type DocumentManifest.Content * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentManifestContent Constructor @@ -237,11 +237,96 @@ public function setPReference(FHIRReference $pReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_P_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_P_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_P_ATTACHMENT])) { + $v = $this->getPAttachment(); + foreach($validationRules[self::FIELD_P_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST_DOT_CONTENT, self::FIELD_P_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_P_ATTACHMENT])) { + $errs[self::FIELD_P_ATTACHMENT] = []; + } + $errs[self::FIELD_P_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_P_REFERENCE])) { + $v = $this->getPReference(); + foreach($validationRules[self::FIELD_P_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST_DOT_CONTENT, self::FIELD_P_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_P_REFERENCE])) { + $errs[self::FIELD_P_REFERENCE] = []; + } + $errs[self::FIELD_P_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php index 8f4c104cda..daa12593a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRDocumentManifestRelated extends FHIRBackboneElement * Validation map for fields in type DocumentManifest.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentManifestRelated Constructor @@ -231,11 +231,96 @@ public function setRef(FHIRReference $ref = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRef())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST_DOT_RELATED, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REF])) { + $v = $this->getRef(); + foreach($validationRules[self::FIELD_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST_DOT_RELATED, self::FIELD_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REF])) { + $errs[self::FIELD_REF] = []; + } + $errs[self::FIELD_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php index f20e46e8c7..debf8f23fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRDocumentReferenceContent extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Content * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceContent Constructor @@ -269,11 +269,98 @@ public function setFormat(array $format = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ATTACHMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFormat())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FORMAT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ATTACHMENT])) { + $v = $this->getAttachment(); + foreach($validationRules[self::FIELD_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTENT, self::FIELD_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTACHMENT])) { + $errs[self::FIELD_ATTACHMENT] = []; + } + $errs[self::FIELD_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORMAT])) { + $v = $this->getFormat(); + foreach($validationRules[self::FIELD_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTENT, self::FIELD_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAT])) { + $errs[self::FIELD_FORMAT] = []; + } + $errs[self::FIELD_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php index 65748701df..4c53346b45 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -179,7 +179,7 @@ class FHIRDocumentReferenceContext extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Context * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceContext Constructor @@ -571,11 +571,185 @@ public function setSourcePatientInfo(FHIRReference $sourcePatientInfo = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFacilityType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPracticeSetting())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTICE_SETTING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSourcePatientInfo())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_PATIENT_INFO] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY_TYPE])) { + $v = $this->getFacilityType(); + foreach($validationRules[self::FIELD_FACILITY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_FACILITY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY_TYPE])) { + $errs[self::FIELD_FACILITY_TYPE] = []; + } + $errs[self::FIELD_FACILITY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRACTICE_SETTING])) { + $v = $this->getPracticeSetting(); + foreach($validationRules[self::FIELD_PRACTICE_SETTING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_PRACTICE_SETTING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRACTICE_SETTING])) { + $errs[self::FIELD_PRACTICE_SETTING] = []; + } + $errs[self::FIELD_PRACTICE_SETTING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_PATIENT_INFO])) { + $v = $this->getSourcePatientInfo(); + foreach($validationRules[self::FIELD_SOURCE_PATIENT_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_SOURCE_PATIENT_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_PATIENT_INFO])) { + $errs[self::FIELD_SOURCE_PATIENT_INFO] = []; + } + $errs[self::FIELD_SOURCE_PATIENT_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php index a96689d6a5..fab0225318 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRDocumentReferenceRelated extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceRelated Constructor @@ -231,11 +231,96 @@ public function setRef(FHIRReference $ref = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRef())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATED, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REF])) { + $v = $this->getRef(); + foreach($validationRules[self::FIELD_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATED, self::FIELD_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REF])) { + $errs[self::FIELD_REF] = []; + } + $errs[self::FIELD_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php index 65f3b6028e..b48240cb6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRDocumentReferenceRelatesTo extends FHIRBackboneElement * Validation map for fields in type DocumentReference.RelatesTo * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceRelatesTo Constructor @@ -239,11 +239,96 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATES_TO, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATES_TO, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php index 0b608259de..91304a6c33 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -229,7 +229,7 @@ class FHIREncounterHospitalization extends FHIRBackboneElement * Validation map for fields in type Encounter.Hospitalization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterHospitalization Constructor @@ -886,11 +886,259 @@ public function setSpecialCourtesy(array $specialCourtesy = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdmitSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADMIT_SOURCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAdmittingDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADMITTING_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDietPreference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIET_PREFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDischargeDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DISCHARGE_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDischargeDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISCHARGE_DISPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreAdmissionIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReAdmission())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RE_ADMISSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecialArrangement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_ARRANGEMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialCourtesy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_COURTESY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADMIT_SOURCE])) { + $v = $this->getAdmitSource(); + foreach($validationRules[self::FIELD_ADMIT_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_ADMIT_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMIT_SOURCE])) { + $errs[self::FIELD_ADMIT_SOURCE] = []; + } + $errs[self::FIELD_ADMIT_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADMITTING_DIAGNOSIS])) { + $v = $this->getAdmittingDiagnosis(); + foreach($validationRules[self::FIELD_ADMITTING_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_ADMITTING_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMITTING_DIAGNOSIS])) { + $errs[self::FIELD_ADMITTING_DIAGNOSIS] = []; + } + $errs[self::FIELD_ADMITTING_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIET_PREFERENCE])) { + $v = $this->getDietPreference(); + foreach($validationRules[self::FIELD_DIET_PREFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DIET_PREFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIET_PREFERENCE])) { + $errs[self::FIELD_DIET_PREFERENCE] = []; + } + $errs[self::FIELD_DIET_PREFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCHARGE_DIAGNOSIS])) { + $v = $this->getDischargeDiagnosis(); + foreach($validationRules[self::FIELD_DISCHARGE_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DISCHARGE_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCHARGE_DIAGNOSIS])) { + $errs[self::FIELD_DISCHARGE_DIAGNOSIS] = []; + } + $errs[self::FIELD_DISCHARGE_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCHARGE_DISPOSITION])) { + $v = $this->getDischargeDisposition(); + foreach($validationRules[self::FIELD_DISCHARGE_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DISCHARGE_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCHARGE_DISPOSITION])) { + $errs[self::FIELD_DISCHARGE_DISPOSITION] = []; + } + $errs[self::FIELD_DISCHARGE_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_ADMISSION_IDENTIFIER])) { + $v = $this->getPreAdmissionIdentifier(); + foreach($validationRules[self::FIELD_PRE_ADMISSION_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_PRE_ADMISSION_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_ADMISSION_IDENTIFIER])) { + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER] = []; + } + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RE_ADMISSION])) { + $v = $this->getReAdmission(); + foreach($validationRules[self::FIELD_RE_ADMISSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_RE_ADMISSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RE_ADMISSION])) { + $errs[self::FIELD_RE_ADMISSION] = []; + } + $errs[self::FIELD_RE_ADMISSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_ARRANGEMENT])) { + $v = $this->getSpecialArrangement(); + foreach($validationRules[self::FIELD_SPECIAL_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_SPECIAL_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_ARRANGEMENT])) { + $errs[self::FIELD_SPECIAL_ARRANGEMENT] = []; + } + $errs[self::FIELD_SPECIAL_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_COURTESY])) { + $v = $this->getSpecialCourtesy(); + foreach($validationRules[self::FIELD_SPECIAL_COURTESY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_SPECIAL_COURTESY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_COURTESY])) { + $errs[self::FIELD_SPECIAL_COURTESY] = []; + } + $errs[self::FIELD_SPECIAL_COURTESY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php index bf55913637..eacb3e91b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIREncounterLocation extends FHIRBackboneElement * Validation map for fields in type Encounter.Location * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterLocation Constructor @@ -296,11 +296,113 @@ public function setStatus(FHIREncounterLocationStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php index d3e78e944b..c070c522dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIREncounterParticipant extends FHIRBackboneElement * Validation map for fields in type Encounter.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterParticipant Constructor @@ -320,11 +320,115 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIndividual())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDIVIDUAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_INDIVIDUAL])) { + $v = $this->getIndividual(); + foreach($validationRules[self::FIELD_INDIVIDUAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_INDIVIDUAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDIVIDUAL])) { + $errs[self::FIELD_INDIVIDUAL] = []; + } + $errs[self::FIELD_INDIVIDUAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php index a31374009e..2435e46e1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIREncounterStatusHistory extends FHIRBackboneElement * Validation map for fields in type Encounter.StatusHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterStatusHistory Constructor @@ -240,11 +240,96 @@ public function setStatus(FHIREncounterState $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_STATUS_HISTORY, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_STATUS_HISTORY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeam.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeam.php index 89d2a3dee9..7b38aea546 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIREpisodeOfCareCareTeam extends FHIRBackboneElement * Validation map for fields in type EpisodeOfCare.CareTeam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCareCareTeam Constructor @@ -321,11 +321,115 @@ public function setRole(array $role = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMember())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_MEMBER])) { + $v = $this->getMember(); + foreach($validationRules[self::FIELD_MEMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_CARE_TEAM, self::FIELD_MEMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEMBER])) { + $errs[self::FIELD_MEMBER] = []; + } + $errs[self::FIELD_MEMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_CARE_TEAM, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_CARE_TEAM, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php index 176b93a99a..b8f05d9c55 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIREpisodeOfCareStatusHistory extends FHIRBackboneElement * Validation map for fields in type EpisodeOfCare.StatusHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCareStatusHistory Constructor @@ -241,11 +241,96 @@ public function setStatus(FHIREpisodeOfCareStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_STATUS_HISTORY, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_STATUS_HISTORY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php index 71369fd1c0..18c5f9eb17 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -186,7 +186,7 @@ class FHIRFamilyMemberHistoryCondition extends FHIRBackboneElement * Validation map for fields in type FamilyMemberHistory.Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyMemberHistoryCondition Constructor @@ -530,11 +530,181 @@ public function setOutcome(FHIRCodeableConcept $outcome = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_PERIOD])) { + $v = $this->getOnsetPeriod(); + foreach($validationRules[self::FIELD_ONSET_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_PERIOD])) { + $errs[self::FIELD_ONSET_PERIOD] = []; + } + $errs[self::FIELD_ONSET_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_QUANTITY])) { + $v = $this->getOnsetQuantity(); + foreach($validationRules[self::FIELD_ONSET_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_QUANTITY])) { + $errs[self::FIELD_ONSET_QUANTITY] = []; + } + $errs[self::FIELD_ONSET_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_RANGE])) { + $v = $this->getOnsetRange(); + foreach($validationRules[self::FIELD_ONSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_RANGE])) { + $errs[self::FIELD_ONSET_RANGE] = []; + } + $errs[self::FIELD_ONSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_STRING])) { + $v = $this->getOnsetString(); + foreach($validationRules[self::FIELD_ONSET_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_STRING])) { + $errs[self::FIELD_ONSET_STRING] = []; + } + $errs[self::FIELD_ONSET_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcome.php index dd919a15ed..849baa5a26 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRGoalOutcome extends FHIRBackboneElement * Validation map for fields in type Goal.Outcome * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGoalOutcome Constructor @@ -230,11 +230,96 @@ public function setResultReference(FHIRReference $resultReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getResultCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESULT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getResultReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESULT_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_RESULT_CODEABLE_CONCEPT])) { + $v = $this->getResultCodeableConcept(); + foreach($validationRules[self::FIELD_RESULT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_OUTCOME, self::FIELD_RESULT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_RESULT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_RESULT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT_REFERENCE])) { + $v = $this->getResultReference(); + foreach($validationRules[self::FIELD_RESULT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_OUTCOME, self::FIELD_RESULT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT_REFERENCE])) { + $errs[self::FIELD_RESULT_REFERENCE] = []; + } + $errs[self::FIELD_RESULT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php index 3b59654ab6..baf8323cbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -185,7 +185,7 @@ class FHIRGroupCharacteristic extends FHIRBackboneElement * Validation map for fields in type Group.Characteristic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupCharacteristic Constructor @@ -549,11 +549,181 @@ public function setValueRange(FHIRRange $valueRange = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExclude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php index a0fe960931..e9bfbbae6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRGroupMember extends FHIRBackboneElement * Validation map for fields in type Group.Member * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupMember Constructor @@ -305,11 +305,113 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEntity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getInactive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_MEMBER, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INACTIVE])) { + $v = $this->getInactive(); + foreach($validationRules[self::FIELD_INACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_MEMBER, self::FIELD_INACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INACTIVE])) { + $errs[self::FIELD_INACTIVE] = []; + } + $errs[self::FIELD_INACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_MEMBER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php index aea34813a1..864e259ed9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRHealthcareServiceAvailableTime extends FHIRBackboneElement * Validation map for fields in type HealthcareService.AvailableTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareServiceAvailableTime Constructor @@ -450,11 +450,132 @@ public function setDaysOfWeek(array $daysOfWeek = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllDay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALL_DAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailableEndTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABLE_END_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailableStartTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABLE_START_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDaysOfWeek())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DAYS_OF_WEEK, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALL_DAY])) { + $v = $this->getAllDay(); + foreach($validationRules[self::FIELD_ALL_DAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_ALL_DAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALL_DAY])) { + $errs[self::FIELD_ALL_DAY] = []; + } + $errs[self::FIELD_ALL_DAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_END_TIME])) { + $v = $this->getAvailableEndTime(); + foreach($validationRules[self::FIELD_AVAILABLE_END_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_AVAILABLE_END_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_END_TIME])) { + $errs[self::FIELD_AVAILABLE_END_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_END_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_START_TIME])) { + $v = $this->getAvailableStartTime(); + foreach($validationRules[self::FIELD_AVAILABLE_START_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_AVAILABLE_START_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_START_TIME])) { + $errs[self::FIELD_AVAILABLE_START_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_START_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAYS_OF_WEEK])) { + $v = $this->getDaysOfWeek(); + foreach($validationRules[self::FIELD_DAYS_OF_WEEK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_DAYS_OF_WEEK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAYS_OF_WEEK])) { + $errs[self::FIELD_DAYS_OF_WEEK] = []; + } + $errs[self::FIELD_DAYS_OF_WEEK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php index 0fedd8e5d5..0966843c1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRHealthcareServiceNotAvailable extends FHIRBackboneElement * Validation map for fields in type HealthcareService.NotAvailable * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareServiceNotAvailable Constructor @@ -253,11 +253,96 @@ public function setDuring(FHIRPeriod $during = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuring())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_NOT_AVAILABLE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURING])) { + $v = $this->getDuring(); + foreach($validationRules[self::FIELD_DURING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_NOT_AVAILABLE, self::FIELD_DURING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURING])) { + $errs[self::FIELD_DURING] = []; + } + $errs[self::FIELD_DURING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceType.php index a12b8b250e..a02199c94d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRHealthcareServiceServiceType extends FHIRBackboneElement * Validation map for fields in type HealthcareService.ServiceType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareServiceServiceType Constructor @@ -272,11 +272,98 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_SERVICE_TYPE, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_SERVICE_TYPE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFrames.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFrames.php index 127c84fe4d..757251b40b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFrames.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFrames.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRImagingObjectSelectionFrames extends FHIRBackboneElement * Validation map for fields in type ImagingObjectSelection.Frames * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_FRAME_NUMBERS => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -329,11 +329,98 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getFrameNumbers())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FRAME_NUMBERS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FRAME_NUMBERS])) { + $v = $this->getFrameNumbers(); + foreach($validationRules[self::FIELD_FRAME_NUMBERS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_FRAMES, self::FIELD_FRAME_NUMBERS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRAME_NUMBERS])) { + $errs[self::FIELD_FRAME_NUMBERS] = []; + } + $errs[self::FIELD_FRAME_NUMBERS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_FRAMES, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstance.php index 70d96a0c6e..5bb5f8e5da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRImagingObjectSelectionInstance extends FHIRBackboneElement * Validation map for fields in type ImagingObjectSelection.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingObjectSelectionInstance Constructor @@ -478,11 +478,132 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getFrames())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FRAMES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSopClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOP_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FRAMES])) { + $v = $this->getFrames(); + foreach($validationRules[self::FIELD_FRAMES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_INSTANCE, self::FIELD_FRAMES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRAMES])) { + $errs[self::FIELD_FRAMES] = []; + } + $errs[self::FIELD_FRAMES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOP_CLASS])) { + $v = $this->getSopClass(); + foreach($validationRules[self::FIELD_SOP_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_INSTANCE, self::FIELD_SOP_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOP_CLASS])) { + $errs[self::FIELD_SOP_CLASS] = []; + } + $errs[self::FIELD_SOP_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_INSTANCE, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_INSTANCE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeries.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeries.php index 21cb1a2d22..71ba3b26d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeries.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRImagingObjectSelectionSeries extends FHIRBackboneElement * Validation map for fields in type ImagingObjectSelection.Series * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INSTANCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -408,11 +408,115 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_SERIES, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_SERIES, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_SERIES, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudy.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudy.php index 612b138f1e..2aeee74ea9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -156,7 +156,7 @@ class FHIRImagingObjectSelectionStudy extends FHIRBackboneElement * Validation map for fields in type ImagingObjectSelection.Study * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_SERIES => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -462,11 +462,132 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getImagingStudy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMAGING_STUDY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSeries())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERIES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IMAGING_STUDY])) { + $v = $this->getImagingStudy(); + foreach($validationRules[self::FIELD_IMAGING_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_STUDY, self::FIELD_IMAGING_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGING_STUDY])) { + $errs[self::FIELD_IMAGING_STUDY] = []; + } + $errs[self::FIELD_IMAGING_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_STUDY, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_STUDY, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION_DOT_STUDY, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php index eedf9ce94d..4906b1f7df 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -175,7 +175,7 @@ class FHIRImagingStudyInstance extends FHIRBackboneElement * Validation map for fields in type ImagingStudy.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudyInstance Constructor @@ -611,11 +611,166 @@ public function setUid($uid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSopClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOP_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOP_CLASS])) { + $v = $this->getSopClass(); + foreach($validationRules[self::FIELD_SOP_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_SOP_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOP_CLASS])) { + $errs[self::FIELD_SOP_CLASS] = []; + } + $errs[self::FIELD_SOP_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php index 50cf1451f3..77fa201cd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -241,7 +241,7 @@ class FHIRImagingStudySeries extends FHIRBackboneElement * Validation map for fields in type ImagingStudy.Series * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudySeries Constructor @@ -902,11 +902,251 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAvailability())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLaterality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LATERALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getModality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfInstances())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = $fieldErrs; + } + } + if (null !== ($v = $this->getStarted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STARTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY])) { + $v = $this->getAvailability(); + foreach($validationRules[self::FIELD_AVAILABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_AVAILABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY])) { + $errs[self::FIELD_AVAILABILITY] = []; + } + $errs[self::FIELD_AVAILABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LATERALITY])) { + $v = $this->getLaterality(); + foreach($validationRules[self::FIELD_LATERALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_LATERALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LATERALITY])) { + $errs[self::FIELD_LATERALITY] = []; + } + $errs[self::FIELD_LATERALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODALITY])) { + $v = $this->getModality(); + foreach($validationRules[self::FIELD_MODALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_MODALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODALITY])) { + $errs[self::FIELD_MODALITY] = []; + } + $errs[self::FIELD_MODALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_INSTANCES])) { + $v = $this->getNumberOfInstances(); + foreach($validationRules[self::FIELD_NUMBER_OF_INSTANCES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_NUMBER_OF_INSTANCES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_INSTANCES])) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = []; + } + $errs[self::FIELD_NUMBER_OF_INSTANCES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STARTED])) { + $v = $this->getStarted(); + foreach($validationRules[self::FIELD_STARTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_STARTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STARTED])) { + $errs[self::FIELD_STARTED] = []; + } + $errs[self::FIELD_STARTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php index 838a48453d..8606944524 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRImmunizationExplanation extends FHIRBackboneElement * Validation map for fields in type Immunization.Explanation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationExplanation Constructor @@ -308,11 +308,100 @@ public function setReasonNotGiven(array $reasonNotGiven = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonNotGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_NOT_GIVEN, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_EXPLANATION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_NOT_GIVEN])) { + $v = $this->getReasonNotGiven(); + foreach($validationRules[self::FIELD_REASON_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_EXPLANATION, self::FIELD_REASON_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_NOT_GIVEN])) { + $errs[self::FIELD_REASON_NOT_GIVEN] = []; + } + $errs[self::FIELD_REASON_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php index fe4ad69d87..2d08ba2b47 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRImmunizationReaction extends FHIRBackboneElement * Validation map for fields in type Immunization.Reaction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationReaction Constructor @@ -333,11 +333,113 @@ public function setReported($reported = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getReported())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTED])) { + $v = $this->getReported(); + foreach($validationRules[self::FIELD_REPORTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_REPORTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTED])) { + $errs[self::FIELD_REPORTED] = []; + } + $errs[self::FIELD_REPORTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php index a2b80fc99f..2acc52b0b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -196,7 +196,7 @@ class FHIRImmunizationVaccinationProtocol extends FHIRBackboneElement * Validation map for fields in type Immunization.VaccinationProtocol * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_TARGET_DISEASE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -683,11 +683,200 @@ public function setTargetDisease(array $targetDisease = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeriesDoses())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES_DOSES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTargetDisease())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET_DISEASE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_SEQUENCE])) { + $v = $this->getDoseSequence(); + foreach($validationRules[self::FIELD_DOSE_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DOSE_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_SEQUENCE])) { + $errs[self::FIELD_DOSE_SEQUENCE] = []; + } + $errs[self::FIELD_DOSE_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_STATUS])) { + $v = $this->getDoseStatus(); + foreach($validationRules[self::FIELD_DOSE_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DOSE_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_STATUS])) { + $errs[self::FIELD_DOSE_STATUS] = []; + } + $errs[self::FIELD_DOSE_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_STATUS_REASON])) { + $v = $this->getDoseStatusReason(); + foreach($validationRules[self::FIELD_DOSE_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DOSE_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_STATUS_REASON])) { + $errs[self::FIELD_DOSE_STATUS_REASON] = []; + } + $errs[self::FIELD_DOSE_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES_DOSES])) { + $v = $this->getSeriesDoses(); + foreach($validationRules[self::FIELD_SERIES_DOSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_SERIES_DOSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES_DOSES])) { + $errs[self::FIELD_SERIES_DOSES] = []; + } + $errs[self::FIELD_SERIES_DOSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_DISEASE])) { + $v = $this->getTargetDisease(); + foreach($validationRules[self::FIELD_TARGET_DISEASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_TARGET_DISEASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_DISEASE])) { + $errs[self::FIELD_TARGET_DISEASE] = []; + } + $errs[self::FIELD_TARGET_DISEASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php index 5553ed00a1..32e00c2e16 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRImmunizationRecommendationDateCriterion extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.DateCriterion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationDateCriterion Constructor @@ -267,11 +267,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_DATE_CRITERION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_DATE_CRITERION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php index 42b09d0127..070cff24f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRImmunizationRecommendationProtocol extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.Protocol * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationProtocol Constructor @@ -410,11 +410,130 @@ public function setSeries($series = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_SEQUENCE])) { + $v = $this->getDoseSequence(); + foreach($validationRules[self::FIELD_DOSE_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_DOSE_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_SEQUENCE])) { + $errs[self::FIELD_DOSE_SEQUENCE] = []; + } + $errs[self::FIELD_DOSE_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php index df80dea83f..b9cf7d1f81 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -197,7 +197,7 @@ class FHIRImmunizationRecommendationRecommendation extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.Recommendation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationRecommendation Constructor @@ -713,11 +713,204 @@ public function setVaccineCode(FHIRCodeableConcept $vaccineCode = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDateCriterion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATE_CRITERION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDoseNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getForecastStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORECAST_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProtocol())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROTOCOL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingImmunization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_IMMUNIZATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSupportingPatientInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_PATIENT_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVaccineCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VACCINE_CODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_CRITERION])) { + $v = $this->getDateCriterion(); + foreach($validationRules[self::FIELD_DATE_CRITERION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DATE_CRITERION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_CRITERION])) { + $errs[self::FIELD_DATE_CRITERION] = []; + } + $errs[self::FIELD_DATE_CRITERION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_NUMBER])) { + $v = $this->getDoseNumber(); + foreach($validationRules[self::FIELD_DOSE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DOSE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_NUMBER])) { + $errs[self::FIELD_DOSE_NUMBER] = []; + } + $errs[self::FIELD_DOSE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORECAST_STATUS])) { + $v = $this->getForecastStatus(); + foreach($validationRules[self::FIELD_FORECAST_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_FORECAST_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORECAST_STATUS])) { + $errs[self::FIELD_FORECAST_STATUS] = []; + } + $errs[self::FIELD_FORECAST_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_IMMUNIZATION])) { + $v = $this->getSupportingImmunization(); + foreach($validationRules[self::FIELD_SUPPORTING_IMMUNIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SUPPORTING_IMMUNIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_IMMUNIZATION])) { + $errs[self::FIELD_SUPPORTING_IMMUNIZATION] = []; + } + $errs[self::FIELD_SUPPORTING_IMMUNIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_PATIENT_INFORMATION])) { + $v = $this->getSupportingPatientInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_PATIENT_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SUPPORTING_PATIENT_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINE_CODE])) { + $v = $this->getVaccineCode(); + foreach($validationRules[self::FIELD_VACCINE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_VACCINE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINE_CODE])) { + $errs[self::FIELD_VACCINE_CODE] = []; + } + $errs[self::FIELD_VACCINE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContact.php index 0f3809b2e3..272fb667b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRImplementationGuideContact extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideContact Constructor @@ -293,11 +293,98 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php index 9c4ce0fedf..ccd8f863df 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRImplementationGuideDependency extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Dependency * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideDependency Constructor @@ -266,11 +266,96 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEPENDENCY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEPENDENCY, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php index 10245cd462..263f47e330 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRImplementationGuideGlobal extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Global * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideGlobal Constructor @@ -255,11 +255,96 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_GLOBAL, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_GLOBAL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php index b715fee58d..ea3abeb0eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRImplementationGuidePackage extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Package * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RESOURCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -378,11 +378,115 @@ public function setResource(array $resource = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PACKAGE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PACKAGE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PACKAGE, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php index 3186097da2..c11d8768b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -185,7 +185,7 @@ class FHIRImplementationGuidePage extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Page * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuidePage Constructor @@ -752,11 +752,187 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFormat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORMAT] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPackage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PACKAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_FORMAT])) { + $v = $this->getFormat(); + foreach($validationRules[self::FIELD_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAT])) { + $errs[self::FIELD_FORMAT] = []; + } + $errs[self::FIELD_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE])) { + $v = $this->getPackage(); + foreach($validationRules[self::FIELD_PACKAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_PACKAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE])) { + $errs[self::FIELD_PACKAGE] = []; + } + $errs[self::FIELD_PACKAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAGE])) { + $v = $this->getPage(); + foreach($validationRules[self::FIELD_PAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_PAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAGE])) { + $errs[self::FIELD_PAGE] = []; + } + $errs[self::FIELD_PAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php index 6d046ae69c..ae1ed4e94b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -182,7 +182,7 @@ class FHIRImplementationGuideResource extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Resource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideResource Constructor @@ -600,11 +600,181 @@ public function setSourceUri($sourceUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAcronym())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACRONYM] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleFor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_FOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACRONYM])) { + $v = $this->getAcronym(); + foreach($validationRules[self::FIELD_ACRONYM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_ACRONYM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACRONYM])) { + $errs[self::FIELD_ACRONYM] = []; + } + $errs[self::FIELD_ACRONYM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_FOR])) { + $v = $this->getExampleFor(); + foreach($validationRules[self::FIELD_EXAMPLE_FOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_EXAMPLE_FOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_FOR])) { + $errs[self::FIELD_EXAMPLE_FOR] = []; + } + $errs[self::FIELD_EXAMPLE_FOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_REFERENCE])) { + $v = $this->getSourceReference(); + foreach($validationRules[self::FIELD_SOURCE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_SOURCE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_REFERENCE])) { + $errs[self::FIELD_SOURCE_REFERENCE] = []; + } + $errs[self::FIELD_SOURCE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_URI])) { + $v = $this->getSourceUri(); + foreach($validationRules[self::FIELD_SOURCE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_SOURCE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_URI])) { + $errs[self::FIELD_SOURCE_URI] = []; + } + $errs[self::FIELD_SOURCE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php index a8c1f33b8b..06655fef89 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRListEntry extends FHIRBackboneElement * Validation map for fields in type List.Entry * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListEntry Constructor @@ -387,11 +387,130 @@ public function setItem(FHIRReference $item = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeleted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DELETED] = $fieldErrs; + } + } + if (null !== ($v = $this->getFlag())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FLAG] = $fieldErrs; + } + } + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DELETED])) { + $v = $this->getDeleted(); + foreach($validationRules[self::FIELD_DELETED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_DELETED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DELETED])) { + $errs[self::FIELD_DELETED] = []; + } + $errs[self::FIELD_DELETED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FLAG])) { + $v = $this->getFlag(); + foreach($validationRules[self::FIELD_FLAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_FLAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FLAG])) { + $errs[self::FIELD_FLAG] = []; + } + $errs[self::FIELD_FLAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php index fd24b3f703..8f7320e374 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRLocationPosition extends FHIRBackboneElement * Validation map for fields in type Location.Position * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationPosition Constructor @@ -368,11 +368,113 @@ public function setLongitude($longitude = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAltitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALTITUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLatitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LATITUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLongitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LONGITUDE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALTITUDE])) { + $v = $this->getAltitude(); + foreach($validationRules[self::FIELD_ALTITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_ALTITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALTITUDE])) { + $errs[self::FIELD_ALTITUDE] = []; + } + $errs[self::FIELD_ALTITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LATITUDE])) { + $v = $this->getLatitude(); + foreach($validationRules[self::FIELD_LATITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_LATITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LATITUDE])) { + $errs[self::FIELD_LATITUDE] = []; + } + $errs[self::FIELD_LATITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LONGITUDE])) { + $v = $this->getLongitude(); + foreach($validationRules[self::FIELD_LONGITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_LONGITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LONGITUDE])) { + $errs[self::FIELD_LONGITUDE] = []; + } + $errs[self::FIELD_LONGITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php index 6b53b0a899..310d061efd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRMedicationBatch extends FHIRBackboneElement * Validation map for fields in type Medication.Batch * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationBatch Constructor @@ -285,11 +285,96 @@ public function setLotNumber($lotNumber = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpirationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPIRATION_DATE])) { + $v = $this->getExpirationDate(); + foreach($validationRules[self::FIELD_EXPIRATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_BATCH, self::FIELD_EXPIRATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRATION_DATE])) { + $errs[self::FIELD_EXPIRATION_DATE] = []; + } + $errs[self::FIELD_EXPIRATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_BATCH, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php index f1b9701103..2af971b031 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRMedicationContent extends FHIRBackboneElement * Validation map for fields in type Medication.Content * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationContent Constructor @@ -214,11 +214,96 @@ public function setItem(FHIRReference $item = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_CONTENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_CONTENT, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php index 1a1cd6fb18..98b38b327e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRMedicationIngredient extends FHIRBackboneElement * Validation map for fields in type Medication.Ingredient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationIngredient Constructor @@ -235,11 +235,96 @@ public function setItem(FHIRReference $item = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php index a8b9a48179..72652c602b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRMedicationPackage extends FHIRBackboneElement * Validation map for fields in type Medication.Package * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationPackage Constructor @@ -261,11 +261,98 @@ public function setContent(array $content = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContainer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTAINER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINER])) { + $v = $this->getContainer(); + foreach($validationRules[self::FIELD_CONTAINER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PACKAGE, self::FIELD_CONTAINER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINER])) { + $errs[self::FIELD_CONTAINER] = []; + } + $errs[self::FIELD_CONTAINER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PACKAGE, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php index 0c17d6423f..ad38c29a51 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRMedicationProduct extends FHIRBackboneElement * Validation map for fields in type Medication.Product * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationProduct Constructor @@ -347,11 +347,117 @@ public function setIngredient(array $ingredient = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBatch())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BATCH, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_BATCH])) { + $v = $this->getBatch(); + foreach($validationRules[self::FIELD_BATCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PRODUCT, self::FIELD_BATCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BATCH])) { + $errs[self::FIELD_BATCH] = []; + } + $errs[self::FIELD_BATCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PRODUCT, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PRODUCT, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php index 8a2202f334..bc0c2fcdde 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -213,7 +213,7 @@ class FHIRMedicationAdministrationDosage extends FHIRBackboneElement * Validation map for fields in type MedicationAdministration.Dosage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministrationDosage Constructor @@ -618,11 +618,198 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSiteCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSiteReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RANGE])) { + $v = $this->getRateRange(); + foreach($validationRules[self::FIELD_RATE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_RATE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RANGE])) { + $errs[self::FIELD_RATE_RANGE] = []; + } + $errs[self::FIELD_RATE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE_CODEABLE_CONCEPT])) { + $v = $this->getSiteCodeableConcept(); + foreach($validationRules[self::FIELD_SITE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_SITE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SITE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SITE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE_REFERENCE])) { + $v = $this->getSiteReference(); + foreach($validationRules[self::FIELD_SITE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_SITE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE_REFERENCE])) { + $errs[self::FIELD_SITE_REFERENCE] = []; + } + $errs[self::FIELD_SITE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstruction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstruction.php index 33f69e72dc..f6598eb044 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstruction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstruction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -300,7 +300,7 @@ class FHIRMedicationDispenseDosageInstruction extends FHIRBackboneElement * Validation map for fields in type MedicationDispense.DosageInstruction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispenseDosageInstruction Constructor @@ -977,11 +977,300 @@ public function setTiming(FHIRTiming $timing = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditionalInstructions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSiteCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSiteReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_INSTRUCTIONS])) { + $v = $this->getAdditionalInstructions(); + foreach($validationRules[self::FIELD_ADDITIONAL_INSTRUCTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_ADDITIONAL_INSTRUCTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_INSTRUCTIONS])) { + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS] = []; + } + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_QUANTITY])) { + $v = $this->getDoseQuantity(); + foreach($validationRules[self::FIELD_DOSE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_DOSE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_QUANTITY])) { + $errs[self::FIELD_DOSE_QUANTITY] = []; + } + $errs[self::FIELD_DOSE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_RANGE])) { + $v = $this->getDoseRange(); + foreach($validationRules[self::FIELD_DOSE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_DOSE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_RANGE])) { + $errs[self::FIELD_DOSE_RANGE] = []; + } + $errs[self::FIELD_DOSE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $v = $this->getMaxDosePerPeriod(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_MAX_DOSE_PER_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RANGE])) { + $v = $this->getRateRange(); + foreach($validationRules[self::FIELD_RATE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_RATE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RANGE])) { + $errs[self::FIELD_RATE_RANGE] = []; + } + $errs[self::FIELD_RATE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE_CODEABLE_CONCEPT])) { + $v = $this->getSiteCodeableConcept(); + foreach($validationRules[self::FIELD_SITE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_SITE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SITE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SITE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE_REFERENCE])) { + $v = $this->getSiteReference(); + foreach($validationRules[self::FIELD_SITE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_SITE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE_REFERENCE])) { + $errs[self::FIELD_SITE_REFERENCE] = []; + } + $errs[self::FIELD_SITE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING])) { + $v = $this->getTiming(); + foreach($validationRules[self::FIELD_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_DOSAGE_INSTRUCTION, self::FIELD_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING])) { + $errs[self::FIELD_TIMING] = []; + } + $errs[self::FIELD_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php index 689644d135..71cb5daf0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRMedicationDispenseSubstitution extends FHIRBackboneElement * Validation map for fields in type MedicationDispense.Substitution * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispenseSubstitution Constructor @@ -365,11 +365,117 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResponsibleParty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESPONSIBLE_PARTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE_PARTY])) { + $v = $this->getResponsibleParty(); + foreach($validationRules[self::FIELD_RESPONSIBLE_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_RESPONSIBLE_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE_PARTY])) { + $errs[self::FIELD_RESPONSIBLE_PARTY] = []; + } + $errs[self::FIELD_RESPONSIBLE_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequest.php index 3d7ea869b9..efefa1f47a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRMedicationOrderDispenseRequest extends FHIRBackboneElement * Validation map for fields in type MedicationOrder.DispenseRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationOrderDispenseRequest Constructor @@ -468,11 +468,164 @@ public function setValidityPeriod(FHIRPeriod $validityPeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpectedSupplyDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfRepeatsAllowed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidityPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDITY_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPECTED_SUPPLY_DURATION])) { + $v = $this->getExpectedSupplyDuration(); + foreach($validationRules[self::FIELD_EXPECTED_SUPPLY_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DISPENSE_REQUEST, self::FIELD_EXPECTED_SUPPLY_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPECTED_SUPPLY_DURATION])) { + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION] = []; + } + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DISPENSE_REQUEST, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DISPENSE_REQUEST, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $v = $this->getNumberOfRepeatsAllowed(); + foreach($validationRules[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DISPENSE_REQUEST, self::FIELD_NUMBER_OF_REPEATS_ALLOWED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = []; + } + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DISPENSE_REQUEST, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDITY_PERIOD])) { + $v = $this->getValidityPeriod(); + foreach($validationRules[self::FIELD_VALIDITY_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DISPENSE_REQUEST, self::FIELD_VALIDITY_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDITY_PERIOD])) { + $errs[self::FIELD_VALIDITY_PERIOD] = []; + } + $errs[self::FIELD_VALIDITY_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstruction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstruction.php index 467373b84e..41a0b0d2b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstruction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstruction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -300,7 +300,7 @@ class FHIRMedicationOrderDosageInstruction extends FHIRBackboneElement * Validation map for fields in type MedicationOrder.DosageInstruction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationOrderDosageInstruction Constructor @@ -977,11 +977,300 @@ public function setTiming(FHIRTiming $timing = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditionalInstructions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSiteCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSiteReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_INSTRUCTIONS])) { + $v = $this->getAdditionalInstructions(); + foreach($validationRules[self::FIELD_ADDITIONAL_INSTRUCTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_ADDITIONAL_INSTRUCTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_INSTRUCTIONS])) { + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS] = []; + } + $errs[self::FIELD_ADDITIONAL_INSTRUCTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_QUANTITY])) { + $v = $this->getDoseQuantity(); + foreach($validationRules[self::FIELD_DOSE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_DOSE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_QUANTITY])) { + $errs[self::FIELD_DOSE_QUANTITY] = []; + } + $errs[self::FIELD_DOSE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_RANGE])) { + $v = $this->getDoseRange(); + foreach($validationRules[self::FIELD_DOSE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_DOSE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_RANGE])) { + $errs[self::FIELD_DOSE_RANGE] = []; + } + $errs[self::FIELD_DOSE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $v = $this->getMaxDosePerPeriod(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_MAX_DOSE_PER_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RANGE])) { + $v = $this->getRateRange(); + foreach($validationRules[self::FIELD_RATE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_RATE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RANGE])) { + $errs[self::FIELD_RATE_RANGE] = []; + } + $errs[self::FIELD_RATE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE_CODEABLE_CONCEPT])) { + $v = $this->getSiteCodeableConcept(); + foreach($validationRules[self::FIELD_SITE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_SITE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SITE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SITE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE_REFERENCE])) { + $v = $this->getSiteReference(); + foreach($validationRules[self::FIELD_SITE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_SITE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE_REFERENCE])) { + $errs[self::FIELD_SITE_REFERENCE] = []; + } + $errs[self::FIELD_SITE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING])) { + $v = $this->getTiming(); + foreach($validationRules[self::FIELD_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_DOSAGE_INSTRUCTION, self::FIELD_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING])) { + $errs[self::FIELD_TIMING] = []; + } + $errs[self::FIELD_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitution.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitution.php index 848cb9d0eb..dc0e617b0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRMedicationOrderSubstitution extends FHIRBackboneElement * Validation map for fields in type MedicationOrder.Substitution * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationOrderSubstitution Constructor @@ -239,11 +239,96 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_SUBSTITUTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_DOT_SUBSTITUTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php index 2aaeb79697..4dd1570c19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -303,7 +303,7 @@ class FHIRMedicationStatementDosage extends FHIRBackboneElement * Validation map for fields in type MedicationStatement.Dosage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatementDosage Constructor @@ -941,11 +941,283 @@ public function setTiming(FHIRTiming $timing = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantityQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantityRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSiteCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSiteReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $v = $this->getMaxDosePerPeriod(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_MAX_DOSE_PER_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY_QUANTITY])) { + $v = $this->getQuantityQuantity(); + foreach($validationRules[self::FIELD_QUANTITY_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_QUANTITY_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY_QUANTITY])) { + $errs[self::FIELD_QUANTITY_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY_RANGE])) { + $v = $this->getQuantityRange(); + foreach($validationRules[self::FIELD_QUANTITY_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_QUANTITY_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY_RANGE])) { + $errs[self::FIELD_QUANTITY_RANGE] = []; + } + $errs[self::FIELD_QUANTITY_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RANGE])) { + $v = $this->getRateRange(); + foreach($validationRules[self::FIELD_RATE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_RATE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RANGE])) { + $errs[self::FIELD_RATE_RANGE] = []; + } + $errs[self::FIELD_RATE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE_CODEABLE_CONCEPT])) { + $v = $this->getSiteCodeableConcept(); + foreach($validationRules[self::FIELD_SITE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_SITE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SITE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SITE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE_REFERENCE])) { + $v = $this->getSiteReference(); + foreach($validationRules[self::FIELD_SITE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_SITE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE_REFERENCE])) { + $errs[self::FIELD_SITE_REFERENCE] = []; + } + $errs[self::FIELD_SITE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING])) { + $v = $this->getTiming(); + foreach($validationRules[self::FIELD_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_DOT_DOSAGE, self::FIELD_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING])) { + $errs[self::FIELD_TIMING] = []; + } + $errs[self::FIELD_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php index 489f9fd0c1..654c9c45c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRMessageHeaderDestination extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Destination * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderDestination Constructor @@ -331,11 +331,113 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php index 43e5d62e32..1c9ca420f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRMessageHeaderResponse extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Response * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderResponse Constructor @@ -329,11 +329,113 @@ public function setIdentifier($identifier = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAILS] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAILS])) { + $v = $this->getDetails(); + foreach($validationRules[self::FIELD_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAILS])) { + $errs[self::FIELD_DETAILS] = []; + } + $errs[self::FIELD_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php index 08a725c076..5eea95bb77 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRMessageHeaderSource extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderSource Constructor @@ -485,11 +485,147 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getSoftware())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOFTWARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOFTWARE])) { + $v = $this->getSoftware(); + foreach($validationRules[self::FIELD_SOFTWARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_SOFTWARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOFTWARE])) { + $errs[self::FIELD_SOFTWARE] = []; + } + $errs[self::FIELD_SOFTWARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContact.php index 8e0d8cc40d..690c56bd89 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRNamingSystemContact extends FHIRBackboneElement * Validation map for fields in type NamingSystem.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNamingSystemContact Constructor @@ -293,11 +293,98 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php index b664da120c..f12beae99d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRNamingSystemUniqueId extends FHIRBackboneElement * Validation map for fields in type NamingSystem.UniqueId * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNamingSystemUniqueId Constructor @@ -397,11 +397,130 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreferred())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFERRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFERRED])) { + $v = $this->getPreferred(); + foreach($validationRules[self::FIELD_PREFERRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_PREFERRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFERRED])) { + $errs[self::FIELD_PREFERRED] = []; + } + $errs[self::FIELD_PREFERRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php index dd23f91894..1ffd41144b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -136,7 +136,7 @@ class FHIRNutritionOrderAdministration extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Administration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderAdministration Constructor @@ -325,11 +325,130 @@ public function setSchedule(FHIRTiming $schedule = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_QUANTITY])) { + $v = $this->getRateQuantity(); + foreach($validationRules[self::FIELD_RATE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_RATE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_QUANTITY])) { + $errs[self::FIELD_RATE_QUANTITY] = []; + } + $errs[self::FIELD_RATE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php index 0d99a9409d..aa173329c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -207,7 +207,7 @@ class FHIRNutritionOrderEnteralFormula extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.EnteralFormula * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderEnteralFormula Constructor @@ -708,11 +708,217 @@ public function setRouteofAdministration(FHIRCodeableConcept $routeofAdministrat } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditiveProductName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_PRODUCT_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdditiveType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAdministration())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADMINISTRATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAdministrationInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADMINISTRATION_INSTRUCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getBaseFormulaProductName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getBaseFormulaType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE_FORMULA_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCaloricDensity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CALORIC_DENSITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxVolumeToDeliver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VOLUME_TO_DELIVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRouteofAdministration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTEOF_ADMINISTRATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_PRODUCT_NAME])) { + $v = $this->getAdditiveProductName(); + foreach($validationRules[self::FIELD_ADDITIVE_PRODUCT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADDITIVE_PRODUCT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_PRODUCT_NAME])) { + $errs[self::FIELD_ADDITIVE_PRODUCT_NAME] = []; + } + $errs[self::FIELD_ADDITIVE_PRODUCT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_TYPE])) { + $v = $this->getAdditiveType(); + foreach($validationRules[self::FIELD_ADDITIVE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADDITIVE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_TYPE])) { + $errs[self::FIELD_ADDITIVE_TYPE] = []; + } + $errs[self::FIELD_ADDITIVE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADMINISTRATION])) { + $v = $this->getAdministration(); + foreach($validationRules[self::FIELD_ADMINISTRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADMINISTRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMINISTRATION])) { + $errs[self::FIELD_ADMINISTRATION] = []; + } + $errs[self::FIELD_ADMINISTRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADMINISTRATION_INSTRUCTION])) { + $v = $this->getAdministrationInstruction(); + foreach($validationRules[self::FIELD_ADMINISTRATION_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADMINISTRATION_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMINISTRATION_INSTRUCTION])) { + $errs[self::FIELD_ADMINISTRATION_INSTRUCTION] = []; + } + $errs[self::FIELD_ADMINISTRATION_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { + $v = $this->getBaseFormulaProductName(); + foreach($validationRules[self::FIELD_BASE_FORMULA_PRODUCT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_BASE_FORMULA_PRODUCT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { + $errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME] = []; + } + $errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE_FORMULA_TYPE])) { + $v = $this->getBaseFormulaType(); + foreach($validationRules[self::FIELD_BASE_FORMULA_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_BASE_FORMULA_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE_FORMULA_TYPE])) { + $errs[self::FIELD_BASE_FORMULA_TYPE] = []; + } + $errs[self::FIELD_BASE_FORMULA_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CALORIC_DENSITY])) { + $v = $this->getCaloricDensity(); + foreach($validationRules[self::FIELD_CALORIC_DENSITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_CALORIC_DENSITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CALORIC_DENSITY])) { + $errs[self::FIELD_CALORIC_DENSITY] = []; + } + $errs[self::FIELD_CALORIC_DENSITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VOLUME_TO_DELIVER])) { + $v = $this->getMaxVolumeToDeliver(); + foreach($validationRules[self::FIELD_MAX_VOLUME_TO_DELIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_MAX_VOLUME_TO_DELIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VOLUME_TO_DELIVER])) { + $errs[self::FIELD_MAX_VOLUME_TO_DELIVER] = []; + } + $errs[self::FIELD_MAX_VOLUME_TO_DELIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTEOF_ADMINISTRATION])) { + $v = $this->getRouteofAdministration(); + foreach($validationRules[self::FIELD_ROUTEOF_ADMINISTRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ROUTEOF_ADMINISTRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTEOF_ADMINISTRATION])) { + $errs[self::FIELD_ROUTEOF_ADMINISTRATION] = []; + } + $errs[self::FIELD_ROUTEOF_ADMINISTRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php index d7b6e08d8d..a5bcb3bc10 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRNutritionOrderNutrient extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Nutrient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderNutrient Constructor @@ -217,11 +217,96 @@ public function setModifier(FHIRCodeableConcept $modifier = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getModifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODIFIER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_NUTRIENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_NUTRIENT, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php index a874eb2a4b..1a352d4b05 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRNutritionOrderOralDiet extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.OralDiet * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderOralDiet Constructor @@ -661,11 +661,174 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getFluidConsistencyType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FLUID_CONSISTENCY_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTRUCTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNutrient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NUTRIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSchedule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SCHEDULE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTexture())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEXTURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_FLUID_CONSISTENCY_TYPE])) { + $v = $this->getFluidConsistencyType(); + foreach($validationRules[self::FIELD_FLUID_CONSISTENCY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_FLUID_CONSISTENCY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FLUID_CONSISTENCY_TYPE])) { + $errs[self::FIELD_FLUID_CONSISTENCY_TYPE] = []; + } + $errs[self::FIELD_FLUID_CONSISTENCY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTRUCTION])) { + $v = $this->getInstruction(); + foreach($validationRules[self::FIELD_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTRUCTION])) { + $errs[self::FIELD_INSTRUCTION] = []; + } + $errs[self::FIELD_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUTRIENT])) { + $v = $this->getNutrient(); + foreach($validationRules[self::FIELD_NUTRIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_NUTRIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUTRIENT])) { + $errs[self::FIELD_NUTRIENT] = []; + } + $errs[self::FIELD_NUTRIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXTURE])) { + $v = $this->getTexture(); + foreach($validationRules[self::FIELD_TEXTURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_TEXTURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXTURE])) { + $errs[self::FIELD_TEXTURE] = []; + } + $errs[self::FIELD_TEXTURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php index a897211631..caa7241f59 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -154,7 +154,7 @@ class FHIRNutritionOrderSupplement extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Supplement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderSupplement Constructor @@ -474,11 +474,149 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTRUCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSchedule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SCHEDULE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INSTRUCTION])) { + $v = $this->getInstruction(); + foreach($validationRules[self::FIELD_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTRUCTION])) { + $errs[self::FIELD_INSTRUCTION] = []; + } + $errs[self::FIELD_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_NAME])) { + $v = $this->getProductName(); + foreach($validationRules[self::FIELD_PRODUCT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_PRODUCT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_NAME])) { + $errs[self::FIELD_PRODUCT_NAME] = []; + } + $errs[self::FIELD_PRODUCT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php index c958b09575..7211626264 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRNutritionOrderTexture extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Texture * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderTexture Constructor @@ -237,11 +237,96 @@ public function setModifier(FHIRCodeableConcept $modifier = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFoodType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOOD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getModifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODIFIER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FOOD_TYPE])) { + $v = $this->getFoodType(); + foreach($validationRules[self::FIELD_FOOD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_TEXTURE, self::FIELD_FOOD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOOD_TYPE])) { + $errs[self::FIELD_FOOD_TYPE] = []; + } + $errs[self::FIELD_FOOD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_TEXTURE, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php index 45b00132a3..ac6595049c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -274,7 +274,7 @@ class FHIRObservationComponent extends FHIRBackboneElement * Validation map for fields in type Observation.Component * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationComponent Constructor @@ -945,11 +945,285 @@ public function setValueTime($valueTime = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataAbsentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ABSENT_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferenceRange())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_RANGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_ABSENT_REASON])) { + $v = $this->getDataAbsentReason(); + foreach($validationRules[self::FIELD_DATA_ABSENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_DATA_ABSENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_ABSENT_REASON])) { + $errs[self::FIELD_DATA_ABSENT_REASON] = []; + } + $errs[self::FIELD_DATA_ABSENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_RANGE])) { + $v = $this->getReferenceRange(); + foreach($validationRules[self::FIELD_REFERENCE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_REFERENCE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_RANGE])) { + $errs[self::FIELD_REFERENCE_RANGE] = []; + } + $errs[self::FIELD_REFERENCE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php index 4f34dea357..45737a6bc2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRObservationReferenceRange extends FHIRBackboneElement * Validation map for fields in type Observation.ReferenceRange * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationReferenceRange Constructor @@ -406,11 +406,147 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getHigh())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIGH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLow())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOW] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeaning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEANING] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGE])) { + $v = $this->getAge(); + foreach($validationRules[self::FIELD_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE])) { + $errs[self::FIELD_AGE] = []; + } + $errs[self::FIELD_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HIGH])) { + $v = $this->getHigh(); + foreach($validationRules[self::FIELD_HIGH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_HIGH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIGH])) { + $errs[self::FIELD_HIGH] = []; + } + $errs[self::FIELD_HIGH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOW])) { + $v = $this->getLow(); + foreach($validationRules[self::FIELD_LOW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_LOW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOW])) { + $errs[self::FIELD_LOW] = []; + } + $errs[self::FIELD_LOW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEANING])) { + $v = $this->getMeaning(); + foreach($validationRules[self::FIELD_MEANING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_MEANING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEANING])) { + $errs[self::FIELD_MEANING] = []; + } + $errs[self::FIELD_MEANING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php index 2ca798cd0c..71669b4a1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRObservationRelated extends FHIRBackboneElement * Validation map for fields in type Observation.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationRelated Constructor @@ -243,11 +243,96 @@ public function setType(FHIRObservationRelationshipType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_RELATED, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_RELATED, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php index 63ebca1274..a6277dfa11 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIROperationDefinitionBinding extends FHIRBackboneElement * Validation map for fields in type OperationDefinition.Binding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinitionBinding Constructor @@ -341,11 +341,113 @@ public function setValueSetUri($valueSetUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getStrength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSetReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSetUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_BINDING, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET_REFERENCE])) { + $v = $this->getValueSetReference(); + foreach($validationRules[self::FIELD_VALUE_SET_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_BINDING, self::FIELD_VALUE_SET_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET_REFERENCE])) { + $errs[self::FIELD_VALUE_SET_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_SET_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET_URI])) { + $v = $this->getValueSetUri(); + foreach($validationRules[self::FIELD_VALUE_SET_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_BINDING, self::FIELD_VALUE_SET_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET_URI])) { + $errs[self::FIELD_VALUE_SET_URI] = []; + } + $errs[self::FIELD_VALUE_SET_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContact.php index dd86442b53..7e3db3c51d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIROperationDefinitionContact extends FHIRBackboneElement * Validation map for fields in type OperationDefinition.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinitionContact Constructor @@ -292,11 +292,98 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php index 3a5371653b..a3dd69de2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -205,7 +205,7 @@ class FHIROperationDefinitionParameter extends FHIRBackboneElement * Validation map for fields in type OperationDefinition.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinitionParameter Constructor @@ -753,11 +753,217 @@ public function setUse(FHIROperationParameterUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBinding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPart())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BINDING])) { + $v = $this->getBinding(); + foreach($validationRules[self::FIELD_BINDING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_BINDING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING])) { + $errs[self::FIELD_BINDING] = []; + } + $errs[self::FIELD_BINDING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART])) { + $v = $this->getPart(); + foreach($validationRules[self::FIELD_PART] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_PART, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART])) { + $errs[self::FIELD_PART] = []; + } + $errs[self::FIELD_PART][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php index 4d219f6749..2e7a726074 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -159,7 +159,7 @@ class FHIROperationOutcomeIssue extends FHIRBackboneElement * Validation map for fields in type OperationOutcome.Issue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationOutcomeIssue Constructor @@ -520,11 +520,149 @@ public function setSeverity(FHIRIssueSeverity $severity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAILS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnostics())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTICS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAILS])) { + $v = $this->getDetails(); + foreach($validationRules[self::FIELD_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAILS])) { + $errs[self::FIELD_DETAILS] = []; + } + $errs[self::FIELD_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSTICS])) { + $v = $this->getDiagnostics(); + foreach($validationRules[self::FIELD_DIAGNOSTICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_DIAGNOSTICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSTICS])) { + $errs[self::FIELD_DIAGNOSTICS] = []; + } + $errs[self::FIELD_DIAGNOSTICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php index eeab746ac1..3f1cd1ed65 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIROrderWhen extends FHIRBackboneElement * Validation map for fields in type Order.When * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrderWhen Constructor @@ -240,11 +240,96 @@ public function setSchedule(FHIRTiming $schedule = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_DOT_WHEN, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_DOT_WHEN, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php index 169ff555ac..1e7690de39 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIROrganizationContact extends FHIRBackboneElement * Validation map for fields in type Organization.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrganizationContact Constructor @@ -379,11 +379,132 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php index 09434f012c..f0320318ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -627,7 +627,7 @@ class FHIRParametersParameter extends FHIRBackboneElement * Validation map for fields in type Parameters.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParametersParameter Constructor @@ -2623,11 +2623,710 @@ public function setValueUuid($valueUuid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPart())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueElementDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ELEMENT_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UUID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART])) { + $v = $this->getPart(); + foreach($validationRules[self::FIELD_PART] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_PART, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART])) { + $errs[self::FIELD_PART] = []; + } + $errs[self::FIELD_PART][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ELEMENT_DEFINITION])) { + $v = $this->getValueElementDefinition(); + foreach($validationRules[self::FIELD_VALUE_ELEMENT_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ELEMENT_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ELEMENT_DEFINITION])) { + $errs[self::FIELD_VALUE_ELEMENT_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_ELEMENT_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UUID])) { + $v = $this->getValueUuid(); + foreach($validationRules[self::FIELD_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UUID])) { + $errs[self::FIELD_VALUE_UUID] = []; + } + $errs[self::FIELD_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php index 138ea77332..3a9dab0244 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRPatientAnimal extends FHIRBackboneElement * Validation map for fields in type Patient.Animal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientAnimal Constructor @@ -283,11 +283,113 @@ public function setSpecies(FHIRCodeableConcept $species = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBreed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BREED] = $fieldErrs; + } + } + if (null !== ($v = $this->getGenderStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BREED])) { + $v = $this->getBreed(); + foreach($validationRules[self::FIELD_BREED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_ANIMAL, self::FIELD_BREED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BREED])) { + $errs[self::FIELD_BREED] = []; + } + $errs[self::FIELD_BREED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER_STATUS])) { + $v = $this->getGenderStatus(); + foreach($validationRules[self::FIELD_GENDER_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_ANIMAL, self::FIELD_GENDER_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER_STATUS])) { + $errs[self::FIELD_GENDER_STATUS] = []; + } + $errs[self::FIELD_GENDER_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIES])) { + $v = $this->getSpecies(); + foreach($validationRules[self::FIELD_SPECIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_ANIMAL, self::FIELD_SPECIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIES])) { + $errs[self::FIELD_SPECIES] = []; + } + $errs[self::FIELD_SPECIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php index 9e5be0ee4e..4256cc2158 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRPatientCommunication extends FHIRBackboneElement * Validation map for fields in type Patient.Communication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientCommunication Constructor @@ -263,11 +263,96 @@ public function setPreferred($preferred = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreferred())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFERRED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_COMMUNICATION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFERRED])) { + $v = $this->getPreferred(); + foreach($validationRules[self::FIELD_PREFERRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_COMMUNICATION, self::FIELD_PREFERRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFERRED])) { + $errs[self::FIELD_PREFERRED] = []; + } + $errs[self::FIELD_PREFERRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php index 63b09c9fd7..77c75ab4f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -184,7 +184,7 @@ class FHIRPatientContact extends FHIRBackboneElement * Validation map for fields in type Patient.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientContact Constructor @@ -598,11 +598,185 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelationship())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATIONSHIP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php index 120e0fb8c2..3e677adae0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRPatientLink extends FHIRBackboneElement * Validation map for fields in type Patient.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientLink Constructor @@ -240,11 +240,96 @@ public function setType(FHIRLinkType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOther())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OTHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OTHER])) { + $v = $this->getOther(); + foreach($validationRules[self::FIELD_OTHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_LINK, self::FIELD_OTHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OTHER])) { + $errs[self::FIELD_OTHER] = []; + } + $errs[self::FIELD_OTHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_LINK, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php index 1a7ac75df9..78510957d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRPaymentReconciliationDetail extends FHIRBackboneElement * Validation map for fields in type PaymentReconciliation.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentReconciliationDetail Constructor @@ -489,11 +489,181 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponce())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubmitter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBMITTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE])) { + $v = $this->getPayee(); + foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_PAYEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE])) { + $errs[self::FIELD_PAYEE] = []; + } + $errs[self::FIELD_PAYEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONCE])) { + $v = $this->getResponce(); + foreach($validationRules[self::FIELD_RESPONCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_RESPONCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONCE])) { + $errs[self::FIELD_RESPONCE] = []; + } + $errs[self::FIELD_RESPONCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBMITTER])) { + $v = $this->getSubmitter(); + foreach($validationRules[self::FIELD_SUBMITTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_SUBMITTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBMITTER])) { + $errs[self::FIELD_SUBMITTER] = []; + } + $errs[self::FIELD_SUBMITTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNote.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNote.php index 2e6b496f37..6c5884d1a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNote.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRPaymentReconciliationNote extends FHIRBackboneElement * Validation map for fields in type PaymentReconciliation.Note * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentReconciliationNote Constructor @@ -251,11 +251,96 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_NOTE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_NOTE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php index 9cafbaadb4..1dbf1c5a03 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRPersonLink extends FHIRBackboneElement * Validation map for fields in type Person.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPersonLink Constructor @@ -246,11 +246,96 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssurance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSURANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSURANCE])) { + $v = $this->getAssurance(); + foreach($validationRules[self::FIELD_ASSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON_DOT_LINK, self::FIELD_ASSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSURANCE])) { + $errs[self::FIELD_ASSURANCE] = []; + } + $errs[self::FIELD_ASSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON_DOT_LINK, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRole.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRole.php index 04a07a5040..70c5d4d52a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRole.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -164,7 +164,7 @@ class FHIRPractitionerPractitionerRole extends FHIRBackboneElement * Validation map for fields in type Practitioner.PractitionerRole * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerPractitionerRole Constructor @@ -548,11 +548,170 @@ public function setSpecialty(array $specialty = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getHealthcareService())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HEALTHCARE_SERVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_HEALTHCARE_SERVICE])) { + $v = $this->getHealthcareService(); + foreach($validationRules[self::FIELD_HEALTHCARE_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_PRACTITIONER_ROLE, self::FIELD_HEALTHCARE_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEALTHCARE_SERVICE])) { + $errs[self::FIELD_HEALTHCARE_SERVICE] = []; + } + $errs[self::FIELD_HEALTHCARE_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_PRACTITIONER_ROLE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_PRACTITIONER_ROLE, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_PRACTITIONER_ROLE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_PRACTITIONER_ROLE, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_PRACTITIONER_ROLE, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php index 044d518277..8ae9fc9ad8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRPractitionerQualification extends FHIRBackboneElement * Validation map for fields in type Practitioner.Qualification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerQualification Constructor @@ -366,11 +366,132 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssuer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUER])) { + $v = $this->getIssuer(); + foreach($validationRules[self::FIELD_ISSUER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_ISSUER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUER])) { + $errs[self::FIELD_ISSUER] = []; + } + $errs[self::FIELD_ISSUER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php index e2eb1e21e2..63dd983e35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRProcedureFocalDevice extends FHIRBackboneElement * Validation map for fields in type Procedure.FocalDevice * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureFocalDevice Constructor @@ -230,11 +230,96 @@ public function setManipulated(FHIRReference $manipulated = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getManipulated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANIPULATED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_FOCAL_DEVICE, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANIPULATED])) { + $v = $this->getManipulated(); + foreach($validationRules[self::FIELD_MANIPULATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_FOCAL_DEVICE, self::FIELD_MANIPULATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANIPULATED])) { + $errs[self::FIELD_MANIPULATED] = []; + } + $errs[self::FIELD_MANIPULATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php index 11455a288c..43bd6476e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRProcedurePerformer extends FHIRBackboneElement * Validation map for fields in type Procedure.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedurePerformer Constructor @@ -230,11 +230,96 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_PERFORMER, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php index 9166bddbd8..32f7af7795 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRProcessRequestItem extends FHIRBackboneElement * Validation map for fields in type ProcessRequest.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcessRequestItem Constructor @@ -201,11 +201,79 @@ public function setSequenceLinkId($sequenceLinkId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST_DOT_ITEM, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotes.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotes.php index 7a2b12b391..f477dfeece 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotes.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRProcessResponseNotes extends FHIRBackboneElement * Validation map for fields in type ProcessResponse.Notes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcessResponseNotes Constructor @@ -251,11 +251,96 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE_DOT_NOTES, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE_DOT_NOTES, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php index 6c78346d7f..6c0494cb40 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRProvenanceAgent extends FHIRBackboneElement * Validation map for fields in type Provenance.Agent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceAgent Constructor @@ -405,11 +405,132 @@ public function setUserId(FHIRIdentifier $userId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_AGENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUserId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USER_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_AGENT])) { + $v = $this->getRelatedAgent(); + foreach($validationRules[self::FIELD_RELATED_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_RELATED_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_AGENT])) { + $errs[self::FIELD_RELATED_AGENT] = []; + } + $errs[self::FIELD_RELATED_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USER_ID])) { + $v = $this->getUserId(); + foreach($validationRules[self::FIELD_USER_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_USER_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USER_ID])) { + $errs[self::FIELD_USER_ID] = []; + } + $errs[self::FIELD_USER_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php index 3ee8d6574d..f8fef1bcf2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -169,7 +169,7 @@ class FHIRProvenanceEntity extends FHIRBackboneElement * Validation map for fields in type Provenance.Entity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceEntity Constructor @@ -479,11 +479,147 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgent.php index 64003c11f0..444d6dbe46 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRProvenanceRelatedAgent extends FHIRBackboneElement * Validation map for fields in type Provenance.RelatedAgent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceRelatedAgent Constructor @@ -264,11 +264,96 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_RELATED_AGENT, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_RELATED_AGENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php index 263f3e2229..6933a7dac3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -195,7 +195,7 @@ class FHIRQuestionnaireGroup extends FHIRBackboneElement * Validation map for fields in type Questionnaire.Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireGroup Constructor @@ -776,11 +776,204 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK_ID] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getQuestion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUESTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRepeats())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPEATS] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUESTION])) { + $v = $this->getQuestion(); + foreach($validationRules[self::FIELD_QUESTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_QUESTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUESTION])) { + $errs[self::FIELD_QUESTION] = []; + } + $errs[self::FIELD_QUESTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEATS])) { + $v = $this->getRepeats(); + foreach($validationRules[self::FIELD_REPEATS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_REPEATS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEATS])) { + $errs[self::FIELD_REPEATS] = []; + } + $errs[self::FIELD_REPEATS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED])) { + $v = $this->getRequired(); + foreach($validationRules[self::FIELD_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED])) { + $errs[self::FIELD_REQUIRED] = []; + } + $errs[self::FIELD_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_GROUP, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php index d65fa5f7d5..8fecb21d1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -209,7 +209,7 @@ class FHIRQuestionnaireQuestion extends FHIRBackboneElement * Validation map for fields in type Questionnaire.Question * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireQuestion Constructor @@ -819,11 +819,221 @@ public function setType(FHIRAnswerFormat $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK_ID] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOption())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOptions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPTIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getRepeats())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPEATS] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPTION])) { + $v = $this->getOption(); + foreach($validationRules[self::FIELD_OPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_OPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPTION])) { + $errs[self::FIELD_OPTION] = []; + } + $errs[self::FIELD_OPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPTIONS])) { + $v = $this->getOptions(); + foreach($validationRules[self::FIELD_OPTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_OPTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPTIONS])) { + $errs[self::FIELD_OPTIONS] = []; + } + $errs[self::FIELD_OPTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEATS])) { + $v = $this->getRepeats(); + foreach($validationRules[self::FIELD_REPEATS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_REPEATS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEATS])) { + $errs[self::FIELD_REPEATS] = []; + } + $errs[self::FIELD_REPEATS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED])) { + $v = $this->getRequired(); + foreach($validationRules[self::FIELD_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED])) { + $errs[self::FIELD_REQUIRED] = []; + } + $errs[self::FIELD_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_QUESTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php index 67ff97f3de..09a1a39b1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -284,7 +284,7 @@ class FHIRQuestionnaireResponseAnswer extends FHIRBackboneElement * Validation map for fields in type QuestionnaireResponse.Answer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponseAnswer Constructor @@ -1113,11 +1113,302 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroup.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroup.php index 74e18b44c1..2f856061b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -167,7 +167,7 @@ class FHIRQuestionnaireResponseGroup extends FHIRBackboneElement * Validation map for fields in type QuestionnaireResponse.Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponseGroup Constructor @@ -586,11 +586,168 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK_ID] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getQuestion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUESTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_GROUP, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_GROUP, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUESTION])) { + $v = $this->getQuestion(); + foreach($validationRules[self::FIELD_QUESTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_GROUP, self::FIELD_QUESTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUESTION])) { + $errs[self::FIELD_QUESTION] = []; + } + $errs[self::FIELD_QUESTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_GROUP, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_GROUP, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_GROUP, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestion.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestion.php index 9ecd42298d..84b8d6d38c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRQuestionnaireResponseQuestion extends FHIRBackboneElement * Validation map for fields in type QuestionnaireResponse.Question * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponseQuestion Constructor @@ -365,11 +365,115 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAnswer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ANSWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ANSWER])) { + $v = $this->getAnswer(); + foreach($validationRules[self::FIELD_ANSWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_QUESTION, self::FIELD_ANSWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER])) { + $errs[self::FIELD_ANSWER] = []; + } + $errs[self::FIELD_ANSWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_QUESTION, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_QUESTION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php index 9a22c64fed..5a4414b90d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -199,7 +199,7 @@ class FHIRRiskAssessmentPrediction extends FHIRBackboneElement * Validation map for fields in type RiskAssessment.Prediction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskAssessmentPrediction Constructor @@ -628,11 +628,198 @@ public function setWhenRange(FHIRRange $whenRange = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getProbabilityCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROBABILITY_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProbabilityDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROBABILITY_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getProbabilityRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROBABILITY_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRationale())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATIONALE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelativeRisk())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIVE_RISK] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROBABILITY_CODEABLE_CONCEPT])) { + $v = $this->getProbabilityCodeableConcept(); + foreach($validationRules[self::FIELD_PROBABILITY_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_PROBABILITY_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROBABILITY_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PROBABILITY_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PROBABILITY_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROBABILITY_DECIMAL])) { + $v = $this->getProbabilityDecimal(); + foreach($validationRules[self::FIELD_PROBABILITY_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_PROBABILITY_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROBABILITY_DECIMAL])) { + $errs[self::FIELD_PROBABILITY_DECIMAL] = []; + } + $errs[self::FIELD_PROBABILITY_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROBABILITY_RANGE])) { + $v = $this->getProbabilityRange(); + foreach($validationRules[self::FIELD_PROBABILITY_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_PROBABILITY_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROBABILITY_RANGE])) { + $errs[self::FIELD_PROBABILITY_RANGE] = []; + } + $errs[self::FIELD_PROBABILITY_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATIONALE])) { + $v = $this->getRationale(); + foreach($validationRules[self::FIELD_RATIONALE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_RATIONALE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATIONALE])) { + $errs[self::FIELD_RATIONALE] = []; + } + $errs[self::FIELD_RATIONALE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIVE_RISK])) { + $v = $this->getRelativeRisk(); + foreach($validationRules[self::FIELD_RELATIVE_RISK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_RELATIVE_RISK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIVE_RISK])) { + $errs[self::FIELD_RELATIVE_RISK] = []; + } + $errs[self::FIELD_RELATIVE_RISK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_PERIOD])) { + $v = $this->getWhenPeriod(); + foreach($validationRules[self::FIELD_WHEN_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_WHEN_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_PERIOD])) { + $errs[self::FIELD_WHEN_PERIOD] = []; + } + $errs[self::FIELD_WHEN_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_RANGE])) { + $v = $this->getWhenRange(); + foreach($validationRules[self::FIELD_WHEN_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_WHEN_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_RANGE])) { + $errs[self::FIELD_WHEN_RANGE] = []; + } + $errs[self::FIELD_WHEN_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContact.php index 85c7889209..c2c1e0d935 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRSearchParameterContact extends FHIRBackboneElement * Validation map for fields in type SearchParameter.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchParameterContact Constructor @@ -292,11 +292,98 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php index 631945504d..5addd01e06 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -183,7 +183,7 @@ class FHIRSpecimenCollection extends FHIRBackboneElement * Validation map for fields in type Specimen.Collection * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenCollection Constructor @@ -587,11 +587,183 @@ public function setQuantity(FHIRSimpleQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollectedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollectedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollector())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTED_DATE_TIME])) { + $v = $this->getCollectedDateTime(); + foreach($validationRules[self::FIELD_COLLECTED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTED_DATE_TIME])) { + $errs[self::FIELD_COLLECTED_DATE_TIME] = []; + } + $errs[self::FIELD_COLLECTED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTED_PERIOD])) { + $v = $this->getCollectedPeriod(); + foreach($validationRules[self::FIELD_COLLECTED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTED_PERIOD])) { + $errs[self::FIELD_COLLECTED_PERIOD] = []; + } + $errs[self::FIELD_COLLECTED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTOR])) { + $v = $this->getCollector(); + foreach($validationRules[self::FIELD_COLLECTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTOR])) { + $errs[self::FIELD_COLLECTOR] = []; + } + $errs[self::FIELD_COLLECTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php index 31cc9cb168..1f5cedfadc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -173,7 +173,7 @@ class FHIRSpecimenContainer extends FHIRBackboneElement * Validation map for fields in type Specimen.Container * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenContainer Constructor @@ -534,11 +534,183 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditiveCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdditiveReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCapacity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAPACITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecimenQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_CODEABLE_CONCEPT])) { + $v = $this->getAdditiveCodeableConcept(); + foreach($validationRules[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_ADDITIVE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_REFERENCE])) { + $v = $this->getAdditiveReference(); + foreach($validationRules[self::FIELD_ADDITIVE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_ADDITIVE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_REFERENCE])) { + $errs[self::FIELD_ADDITIVE_REFERENCE] = []; + } + $errs[self::FIELD_ADDITIVE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAPACITY])) { + $v = $this->getCapacity(); + foreach($validationRules[self::FIELD_CAPACITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_CAPACITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPACITY])) { + $errs[self::FIELD_CAPACITY] = []; + } + $errs[self::FIELD_CAPACITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN_QUANTITY])) { + $v = $this->getSpecimenQuantity(); + foreach($validationRules[self::FIELD_SPECIMEN_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_SPECIMEN_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN_QUANTITY])) { + $errs[self::FIELD_SPECIMEN_QUANTITY] = []; + } + $errs[self::FIELD_SPECIMEN_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php index aaec4ca63d..88b9e9a1a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRSpecimenTreatment extends FHIRBackboneElement * Validation map for fields in type Specimen.Treatment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenTreatment Constructor @@ -340,11 +340,115 @@ public function setProcedure(FHIRCodeableConcept $procedure = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdditive())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIVE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE])) { + $v = $this->getAdditive(); + foreach($validationRules[self::FIELD_ADDITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_TREATMENT, self::FIELD_ADDITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE])) { + $errs[self::FIELD_ADDITIVE] = []; + } + $errs[self::FIELD_ADDITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_TREATMENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_TREATMENT, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContact.php index 08d7de40e9..cd916cea78 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRStructureDefinitionContact extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinitionContact Constructor @@ -293,11 +293,98 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php index 86322551e7..70fbd5b75c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRStructureDefinitionDifferential extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Differential * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ELEMENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -218,11 +218,81 @@ public function setElement(array $element = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_DIFFERENTIAL, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php index d6768cdacc..81b9b16a84 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRStructureDefinitionMapping extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Mapping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinitionMapping Constructor @@ -444,11 +444,130 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComments())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENTS])) { + $v = $this->getComments(); + foreach($validationRules[self::FIELD_COMMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_COMMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENTS])) { + $errs[self::FIELD_COMMENTS] = []; + } + $errs[self::FIELD_COMMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTITY])) { + $v = $this->getIdentity(); + foreach($validationRules[self::FIELD_IDENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_IDENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY])) { + $errs[self::FIELD_IDENTITY] = []; + } + $errs[self::FIELD_IDENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php index 44aed4eb01..cbbcf9d630 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRStructureDefinitionSnapshot extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Snapshot * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ELEMENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -218,11 +218,81 @@ public function setElement(array $element = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_SNAPSHOT, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php index 78e1d484f4..722c7c1733 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRSubscriptionChannel extends FHIRBackboneElement * Validation map for fields in type Subscription.Channel * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscriptionChannel Constructor @@ -423,11 +423,130 @@ public function setType(FHIRSubscriptionChannelType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeader())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEADER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayload())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYLOAD] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER])) { + $v = $this->getHeader(); + foreach($validationRules[self::FIELD_HEADER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_HEADER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER])) { + $errs[self::FIELD_HEADER] = []; + } + $errs[self::FIELD_HEADER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD])) { + $v = $this->getPayload(); + foreach($validationRules[self::FIELD_PAYLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_PAYLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD])) { + $errs[self::FIELD_PAYLOAD] = []; + } + $errs[self::FIELD_PAYLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php index db4b09dfc9..0ef3682d27 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRSubstanceIngredient extends FHIRBackboneElement * Validation map for fields in type Substance.Ingredient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceIngredient Constructor @@ -228,11 +228,96 @@ public function setSubstance(FHIRReference $substance = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INGREDIENT, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INGREDIENT, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php index 7e51bc50dc..ed9df11512 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRSubstanceInstance extends FHIRBackboneElement * Validation map for fields in type Substance.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceInstance Constructor @@ -303,11 +303,113 @@ public function setQuantity(FHIRSimpleQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpiry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRY] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPIRY])) { + $v = $this->getExpiry(); + foreach($validationRules[self::FIELD_EXPIRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_EXPIRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRY])) { + $errs[self::FIELD_EXPIRY] = []; + } + $errs[self::FIELD_EXPIRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhen.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhen.php index 5bd8795d2d..399137c4a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhen.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRSupplyRequestWhen extends FHIRBackboneElement * Validation map for fields in type SupplyRequest.When * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyRequestWhen Constructor @@ -238,11 +238,96 @@ public function setSchedule(FHIRTiming $schedule = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_WHEN, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_WHEN, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php index d541a4307c..57a48c005a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRTestScriptAction extends FHIRBackboneElement * Validation map for fields in type TestScript.Action * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAction Constructor @@ -221,11 +221,96 @@ public function setOperation(FHIRTestScriptOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERT])) { + $v = $this->getAssert(); + foreach($validationRules[self::FIELD_ASSERT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION, self::FIELD_ASSERT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERT])) { + $errs[self::FIELD_ASSERT] = []; + } + $errs[self::FIELD_ASSERT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php index ed791e52d9..5f36963ebb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRTestScriptAction1 extends FHIRBackboneElement * Validation map for fields in type TestScript.Action1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAction1 Constructor @@ -221,11 +221,96 @@ public function setOperation(FHIRTestScriptOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERT])) { + $v = $this->getAssert(); + foreach($validationRules[self::FIELD_ASSERT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION_1, self::FIELD_ASSERT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERT])) { + $errs[self::FIELD_ASSERT] = []; + } + $errs[self::FIELD_ASSERT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION_1, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php index 17fbcb14c0..037e28136e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRTestScriptAction2 extends FHIRBackboneElement * Validation map for fields in type TestScript.Action2 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAction2 Constructor @@ -172,11 +172,79 @@ public function setOperation(FHIRTestScriptOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION_2, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php index bd24c99680..7262dfcf1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -336,7 +336,7 @@ class FHIRTestScriptAssert extends FHIRBackboneElement * Validation map for fields in type TestScript.Assert * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAssert Constructor @@ -1461,11 +1461,368 @@ public function setWarningOnly($warningOnly = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCompareToSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARE_TO_SOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompareToSourcePath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARE_TO_SOURCE_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDirection())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIRECTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeaderField())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEADER_FIELD] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinimumId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MINIMUM_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getNavigationLinks())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAVIGATION_LINKS] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponseCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidateProfileId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDATE_PROFILE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWarningOnly())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WARNING_ONLY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPARE_TO_SOURCE_ID])) { + $v = $this->getCompareToSourceId(); + foreach($validationRules[self::FIELD_COMPARE_TO_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_COMPARE_TO_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARE_TO_SOURCE_ID])) { + $errs[self::FIELD_COMPARE_TO_SOURCE_ID] = []; + } + $errs[self::FIELD_COMPARE_TO_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARE_TO_SOURCE_PATH])) { + $v = $this->getCompareToSourcePath(); + foreach($validationRules[self::FIELD_COMPARE_TO_SOURCE_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_COMPARE_TO_SOURCE_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARE_TO_SOURCE_PATH])) { + $errs[self::FIELD_COMPARE_TO_SOURCE_PATH] = []; + } + $errs[self::FIELD_COMPARE_TO_SOURCE_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIRECTION])) { + $v = $this->getDirection(); + foreach($validationRules[self::FIELD_DIRECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_DIRECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIRECTION])) { + $errs[self::FIELD_DIRECTION] = []; + } + $errs[self::FIELD_DIRECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER_FIELD])) { + $v = $this->getHeaderField(); + foreach($validationRules[self::FIELD_HEADER_FIELD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_HEADER_FIELD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER_FIELD])) { + $errs[self::FIELD_HEADER_FIELD] = []; + } + $errs[self::FIELD_HEADER_FIELD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MINIMUM_ID])) { + $v = $this->getMinimumId(); + foreach($validationRules[self::FIELD_MINIMUM_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_MINIMUM_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MINIMUM_ID])) { + $errs[self::FIELD_MINIMUM_ID] = []; + } + $errs[self::FIELD_MINIMUM_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAVIGATION_LINKS])) { + $v = $this->getNavigationLinks(); + foreach($validationRules[self::FIELD_NAVIGATION_LINKS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_NAVIGATION_LINKS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAVIGATION_LINKS])) { + $errs[self::FIELD_NAVIGATION_LINKS] = []; + } + $errs[self::FIELD_NAVIGATION_LINKS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATOR])) { + $v = $this->getOperator(); + foreach($validationRules[self::FIELD_OPERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_OPERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATOR])) { + $errs[self::FIELD_OPERATOR] = []; + } + $errs[self::FIELD_OPERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE_CODE])) { + $v = $this->getResponseCode(); + foreach($validationRules[self::FIELD_RESPONSE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RESPONSE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE_CODE])) { + $errs[self::FIELD_RESPONSE_CODE] = []; + } + $errs[self::FIELD_RESPONSE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ID])) { + $v = $this->getSourceId(); + foreach($validationRules[self::FIELD_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ID])) { + $errs[self::FIELD_SOURCE_ID] = []; + } + $errs[self::FIELD_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATE_PROFILE_ID])) { + $v = $this->getValidateProfileId(); + foreach($validationRules[self::FIELD_VALIDATE_PROFILE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_VALIDATE_PROFILE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATE_PROFILE_ID])) { + $errs[self::FIELD_VALIDATE_PROFILE_ID] = []; + } + $errs[self::FIELD_VALIDATE_PROFILE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WARNING_ONLY])) { + $v = $this->getWarningOnly(); + foreach($validationRules[self::FIELD_WARNING_ONLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_WARNING_ONLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WARNING_ONLY])) { + $errs[self::FIELD_WARNING_ONLY] = []; + } + $errs[self::FIELD_WARNING_ONLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php index b610e76666..9503a5f77a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRTestScriptCapability extends FHIRBackboneElement * Validation map for fields in type TestScript.Capability * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptCapability Constructor @@ -604,11 +604,166 @@ public function setValidated($validated = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getConformance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFORMANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDATED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONFORMANCE])) { + $v = $this->getConformance(); + foreach($validationRules[self::FIELD_CONFORMANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_CONFORMANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONFORMANCE])) { + $errs[self::FIELD_CONFORMANCE] = []; + } + $errs[self::FIELD_CONFORMANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED])) { + $v = $this->getRequired(); + foreach($validationRules[self::FIELD_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED])) { + $errs[self::FIELD_REQUIRED] = []; + } + $errs[self::FIELD_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATED])) { + $v = $this->getValidated(); + foreach($validationRules[self::FIELD_VALIDATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_VALIDATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATED])) { + $errs[self::FIELD_VALIDATED] = []; + } + $errs[self::FIELD_VALIDATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContact.php index 6bb111d0a9..6e0804036b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptContact extends FHIRBackboneElement * Validation map for fields in type TestScript.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptContact Constructor @@ -292,11 +292,98 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php index 86a108fbe2..7f1236cc1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRTestScriptFixture extends FHIRBackboneElement * Validation map for fields in type TestScript.Fixture * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptFixture Constructor @@ -340,11 +340,113 @@ public function setResource(FHIRReference $resource = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAutocreate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTOCREATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAutodelete())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTODELETE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTOCREATE])) { + $v = $this->getAutocreate(); + foreach($validationRules[self::FIELD_AUTOCREATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_FIXTURE, self::FIELD_AUTOCREATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTOCREATE])) { + $errs[self::FIELD_AUTOCREATE] = []; + } + $errs[self::FIELD_AUTOCREATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTODELETE])) { + $v = $this->getAutodelete(); + foreach($validationRules[self::FIELD_AUTODELETE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_FIXTURE, self::FIELD_AUTODELETE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTODELETE])) { + $errs[self::FIELD_AUTODELETE] = []; + } + $errs[self::FIELD_AUTODELETE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_FIXTURE, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php index 6df183a260..9157d1bd20 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptLink extends FHIRBackboneElement * Validation map for fields in type TestScript.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptLink Constructor @@ -276,11 +276,96 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_LINK, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_LINK, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php index 6d66556752..22df9d451e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRTestScriptMetadata extends FHIRBackboneElement * Validation map for fields in type TestScript.Metadata * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CAPABILITY => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -298,11 +298,100 @@ public function setLink(array $link = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCapability())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CAPABILITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CAPABILITY])) { + $v = $this->getCapability(); + foreach($validationRules[self::FIELD_CAPABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_METADATA, self::FIELD_CAPABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPABILITY])) { + $errs[self::FIELD_CAPABILITY] = []; + } + $errs[self::FIELD_CAPABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_METADATA, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php index 75b465483b..79fa0af0ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -284,7 +284,7 @@ class FHIRTestScriptOperation extends FHIRBackboneElement * Validation map for fields in type TestScript.Operation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptOperation Constructor @@ -1175,11 +1175,302 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncodeRequestUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCODE_REQUEST_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getParams())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARAMS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRequestHeader())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUEST_HEADER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponseId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCEPT])) { + $v = $this->getAccept(); + foreach($validationRules[self::FIELD_ACCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_ACCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCEPT])) { + $errs[self::FIELD_ACCEPT] = []; + } + $errs[self::FIELD_ACCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCODE_REQUEST_URL])) { + $v = $this->getEncodeRequestUrl(); + foreach($validationRules[self::FIELD_ENCODE_REQUEST_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_ENCODE_REQUEST_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCODE_REQUEST_URL])) { + $errs[self::FIELD_ENCODE_REQUEST_URL] = []; + } + $errs[self::FIELD_ENCODE_REQUEST_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMS])) { + $v = $this->getParams(); + foreach($validationRules[self::FIELD_PARAMS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_PARAMS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMS])) { + $errs[self::FIELD_PARAMS] = []; + } + $errs[self::FIELD_PARAMS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_HEADER])) { + $v = $this->getRequestHeader(); + foreach($validationRules[self::FIELD_REQUEST_HEADER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_REQUEST_HEADER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_HEADER])) { + $errs[self::FIELD_REQUEST_HEADER] = []; + } + $errs[self::FIELD_REQUEST_HEADER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE_ID])) { + $v = $this->getResponseId(); + foreach($validationRules[self::FIELD_RESPONSE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_RESPONSE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE_ID])) { + $errs[self::FIELD_RESPONSE_ID] = []; + } + $errs[self::FIELD_RESPONSE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ID])) { + $v = $this->getSourceId(); + foreach($validationRules[self::FIELD_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ID])) { + $errs[self::FIELD_SOURCE_ID] = []; + } + $errs[self::FIELD_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_ID])) { + $v = $this->getTargetId(); + foreach($validationRules[self::FIELD_TARGET_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_TARGET_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_ID])) { + $errs[self::FIELD_TARGET_ID] = []; + } + $errs[self::FIELD_TARGET_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php index c43c88239f..9f87b72ed0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRTestScriptRequestHeader extends FHIRBackboneElement * Validation map for fields in type TestScript.RequestHeader * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptRequestHeader Constructor @@ -275,11 +275,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getField())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIELD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FIELD])) { + $v = $this->getField(); + foreach($validationRules[self::FIELD_FIELD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_REQUEST_HEADER, self::FIELD_FIELD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIELD])) { + $errs[self::FIELD_FIELD] = []; + } + $errs[self::FIELD_FIELD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_REQUEST_HEADER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php index 48b1149c14..3a2ab20390 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRTestScriptSetup extends FHIRBackboneElement * Validation map for fields in type TestScript.Setup * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -261,11 +261,98 @@ public function setMetadata(FHIRTestScriptMetadata $metadata = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMetadata())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METADATA] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_SETUP, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METADATA])) { + $v = $this->getMetadata(); + foreach($validationRules[self::FIELD_METADATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_SETUP, self::FIELD_METADATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METADATA])) { + $errs[self::FIELD_METADATA] = []; + } + $errs[self::FIELD_METADATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php index 5d3a20e95a..0958452a87 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRTestScriptTeardown extends FHIRBackboneElement * Validation map for fields in type TestScript.Teardown * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -212,11 +212,81 @@ public function setAction(array $action = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEARDOWN, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php index 6b13413904..2c8a34ae53 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -136,7 +136,7 @@ class FHIRTestScriptTest extends FHIRBackboneElement * Validation map for fields in type TestScript.Test * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -413,11 +413,132 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMetadata())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METADATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEST, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METADATA])) { + $v = $this->getMetadata(); + foreach($validationRules[self::FIELD_METADATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEST, self::FIELD_METADATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METADATA])) { + $errs[self::FIELD_METADATA] = []; + } + $errs[self::FIELD_METADATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEST, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php index c5e3f0a8e0..2928a903b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRTestScriptVariable extends FHIRBackboneElement * Validation map for fields in type TestScript.Variable * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptVariable Constructor @@ -442,11 +442,130 @@ public function setSourceId($sourceId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHeaderField())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEADER_FIELD] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HEADER_FIELD])) { + $v = $this->getHeaderField(); + foreach($validationRules[self::FIELD_HEADER_FIELD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_HEADER_FIELD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER_FIELD])) { + $errs[self::FIELD_HEADER_FIELD] = []; + } + $errs[self::FIELD_HEADER_FIELD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ID])) { + $v = $this->getSourceId(); + foreach($validationRules[self::FIELD_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ID])) { + $errs[self::FIELD_SOURCE_ID] = []; + } + $errs[self::FIELD_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystem.php index 05c5dace82..abf9661fd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRValueSetCodeSystem extends FHIRBackboneElement * Validation map for fields in type ValueSet.CodeSystem * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CONCEPT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -455,11 +455,132 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCaseSensitive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CASE_SENSITIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CASE_SENSITIVE])) { + $v = $this->getCaseSensitive(); + foreach($validationRules[self::FIELD_CASE_SENSITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CODE_SYSTEM, self::FIELD_CASE_SENSITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CASE_SENSITIVE])) { + $errs[self::FIELD_CASE_SENSITIVE] = []; + } + $errs[self::FIELD_CASE_SENSITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CODE_SYSTEM, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CODE_SYSTEM, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CODE_SYSTEM, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php index c1200fc727..ac75930b5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRValueSetCompose extends FHIRBackboneElement * Validation map for fields in type ValueSet.Compose * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetCompose Constructor @@ -401,11 +401,119 @@ public function setInclude(array $include = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getExclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPORT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INCLUDE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPORT])) { + $v = $this->getImport(); + foreach($validationRules[self::FIELD_IMPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_IMPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPORT])) { + $errs[self::FIELD_IMPORT] = []; + } + $errs[self::FIELD_IMPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCLUDE])) { + $v = $this->getInclude(); + foreach($validationRules[self::FIELD_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCLUDE])) { + $errs[self::FIELD_INCLUDE] = []; + } + $errs[self::FIELD_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php index 96bdff388d..9a36082b1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -167,7 +167,7 @@ class FHIRValueSetConcept extends FHIRBackboneElement * Validation map for fields in type ValueSet.Concept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetConcept Constructor @@ -607,11 +607,168 @@ public function setDisplay($display = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbstract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABSTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABSTRACT])) { + $v = $this->getAbstract(); + foreach($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_ABSTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABSTRACT])) { + $errs[self::FIELD_ABSTRACT] = []; + } + $errs[self::FIELD_ABSTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1.php index dac8695d65..2754484821 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRValueSetConcept1 extends FHIRBackboneElement * Validation map for fields in type ValueSet.Concept1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetConcept1 Constructor @@ -366,11 +366,115 @@ public function setDisplay($display = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT_1, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT_1, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT_1, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContact.php index 22bb6473ab..fb7b8c9158 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRValueSetContact extends FHIRBackboneElement * Validation map for fields in type ValueSet.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetContact Constructor @@ -291,11 +291,98 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php index 1a91699686..3333fa7fff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRValueSetContains extends FHIRBackboneElement * Validation map for fields in type ValueSet.Contains * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetContains Constructor @@ -592,11 +592,166 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbstract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABSTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContains())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABSTRACT])) { + $v = $this->getAbstract(); + foreach($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_ABSTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABSTRACT])) { + $errs[self::FIELD_ABSTRACT] = []; + } + $errs[self::FIELD_ABSTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINS])) { + $v = $this->getContains(); + foreach($validationRules[self::FIELD_CONTAINS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_CONTAINS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINS])) { + $errs[self::FIELD_CONTAINS] = []; + } + $errs[self::FIELD_CONTAINS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php index 42a28c7d07..790605c01d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRValueSetDesignation extends FHIRBackboneElement * Validation map for fields in type ValueSet.Designation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetDesignation Constructor @@ -328,11 +328,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DESIGNATION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DESIGNATION, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DESIGNATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php index e789884314..f0ffd76f48 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -170,7 +170,7 @@ class FHIRValueSetExpansion extends FHIRBackboneElement * Validation map for fields in type ValueSet.Expansion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetExpansion Constructor @@ -615,11 +615,168 @@ public function setTotal($total = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContains())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTimestamp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMESTAMP] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTAINS])) { + $v = $this->getContains(); + foreach($validationRules[self::FIELD_CONTAINS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_CONTAINS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINS])) { + $errs[self::FIELD_CONTAINS] = []; + } + $errs[self::FIELD_CONTAINS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET])) { + $v = $this->getOffset(); + foreach($validationRules[self::FIELD_OFFSET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_OFFSET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET])) { + $errs[self::FIELD_OFFSET] = []; + } + $errs[self::FIELD_OFFSET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMESTAMP])) { + $v = $this->getTimestamp(); + foreach($validationRules[self::FIELD_TIMESTAMP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_TIMESTAMP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMESTAMP])) { + $errs[self::FIELD_TIMESTAMP] = []; + } + $errs[self::FIELD_TIMESTAMP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php index dc8ceeecf5..742297f233 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRValueSetFilter extends FHIRBackboneElement * Validation map for fields in type ValueSet.Filter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetFilter Constructor @@ -347,11 +347,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OP] = $fieldErrs; + } + } + if (null !== ($v = $this->getProperty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROPERTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OP])) { + $v = $this->getOp(); + foreach($validationRules[self::FIELD_OP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_OP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OP])) { + $errs[self::FIELD_OP] = []; + } + $errs[self::FIELD_OP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php index 8fec28ee95..5effcab348 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRValueSetInclude extends FHIRBackboneElement * Validation map for fields in type ValueSet.Include * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetInclude Constructor @@ -442,11 +442,134 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FILTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FILTER])) { + $v = $this->getFilter(); + foreach($validationRules[self::FIELD_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FILTER])) { + $errs[self::FIELD_FILTER] = []; + } + $errs[self::FIELD_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php index d1b0c9a262..fcda63b950 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -182,7 +182,7 @@ class FHIRValueSetParameter extends FHIRBackboneElement * Validation map for fields in type ValueSet.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetParameter Constructor @@ -652,11 +652,181 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php index 9493ab7c19..1e06241ee3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -286,7 +286,7 @@ class FHIRVisionPrescriptionDispense extends FHIRBackboneElement * Validation map for fields in type VisionPrescription.Dispense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionPrescriptionDispense Constructor @@ -1182,11 +1182,317 @@ public function setSphere($sphere = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADD] = $fieldErrs; + } + } + if (null !== ($v = $this->getAxis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AXIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getBackCurve())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BACK_CURVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBrand())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BRAND] = $fieldErrs; + } + } + if (null !== ($v = $this->getColor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCylinder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CYLINDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiameter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAMETER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEye())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EYE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotes())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTES] = $fieldErrs; + } + } + if (null !== ($v = $this->getPower())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POWER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrism())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRISM] = $fieldErrs; + } + } + if (null !== ($v = $this->getProduct())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSphere())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPHERE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADD])) { + $v = $this->getAdd(); + foreach($validationRules[self::FIELD_ADD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_ADD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADD])) { + $errs[self::FIELD_ADD] = []; + } + $errs[self::FIELD_ADD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AXIS])) { + $v = $this->getAxis(); + foreach($validationRules[self::FIELD_AXIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_AXIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AXIS])) { + $errs[self::FIELD_AXIS] = []; + } + $errs[self::FIELD_AXIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BACK_CURVE])) { + $v = $this->getBackCurve(); + foreach($validationRules[self::FIELD_BACK_CURVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_BACK_CURVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BACK_CURVE])) { + $errs[self::FIELD_BACK_CURVE] = []; + } + $errs[self::FIELD_BACK_CURVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BRAND])) { + $v = $this->getBrand(); + foreach($validationRules[self::FIELD_BRAND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_BRAND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BRAND])) { + $errs[self::FIELD_BRAND] = []; + } + $errs[self::FIELD_BRAND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLOR])) { + $v = $this->getColor(); + foreach($validationRules[self::FIELD_COLOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_COLOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLOR])) { + $errs[self::FIELD_COLOR] = []; + } + $errs[self::FIELD_COLOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CYLINDER])) { + $v = $this->getCylinder(); + foreach($validationRules[self::FIELD_CYLINDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_CYLINDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CYLINDER])) { + $errs[self::FIELD_CYLINDER] = []; + } + $errs[self::FIELD_CYLINDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAMETER])) { + $v = $this->getDiameter(); + foreach($validationRules[self::FIELD_DIAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_DIAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAMETER])) { + $errs[self::FIELD_DIAMETER] = []; + } + $errs[self::FIELD_DIAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EYE])) { + $v = $this->getEye(); + foreach($validationRules[self::FIELD_EYE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_EYE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EYE])) { + $errs[self::FIELD_EYE] = []; + } + $errs[self::FIELD_EYE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POWER])) { + $v = $this->getPower(); + foreach($validationRules[self::FIELD_POWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_POWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POWER])) { + $errs[self::FIELD_POWER] = []; + } + $errs[self::FIELD_POWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRISM])) { + $v = $this->getPrism(); + foreach($validationRules[self::FIELD_PRISM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_PRISM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRISM])) { + $errs[self::FIELD_PRISM] = []; + } + $errs[self::FIELD_PRISM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT])) { + $v = $this->getProduct(); + foreach($validationRules[self::FIELD_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT])) { + $errs[self::FIELD_PRODUCT] = []; + } + $errs[self::FIELD_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPHERE])) { + $v = $this->getSphere(); + foreach($validationRules[self::FIELD_SPHERE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_SPHERE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPHERE])) { + $errs[self::FIELD_SPHERE] = []; + } + $errs[self::FIELD_SPHERE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBase64Binary.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBase64Binary.php index d2927a2a2a..4f069d982e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBase64Binary.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBase64Binary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRBase64Binary extends FHIRElement * Validation map for fields in type base64Binary * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBase64Binary Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASE_64BINARY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBindingStrength.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBindingStrength.php index b25b357f3b..cd4a133834 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBindingStrength.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBindingStrength.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBindingStrength extends FHIRElement * Validation map for fields in type BindingStrength * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBindingStrength Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINDING_STRENGTH, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBoolean.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBoolean.php index 9dcf68fbe4..e2ecf881b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBoolean.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBoolean.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBoolean extends FHIRElement * Validation map for fields in type boolean * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBoolean Constructor @@ -170,11 +170,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BOOLEAN, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBundleType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBundleType.php index bddc5a8d99..839570d7c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBundleType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBundleType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBundleType extends FHIRElement * Validation map for fields in type BundleType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanActivityStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanActivityStatus.php index 5ad5a8ae5f..943ee9ee92 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanActivityStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanActivityStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCarePlanActivityStatus extends FHIRElement * Validation map for fields in type CarePlanActivityStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanActivityStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanRelationship.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanRelationship.php index 204fcde81b..b2896a69b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanRelationship.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanRelationship.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCarePlanRelationship extends FHIRElement * Validation map for fields in type CarePlanRelationship * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanRelationship Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_RELATIONSHIP, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanStatus.php index 508f1334e6..55dfb9739f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCarePlanStatus extends FHIRElement * Validation map for fields in type CarePlanStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClaimType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClaimType.php index e82dc22202..de9322dd9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClaimType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClaimType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRClaimType extends FHIRElement * Validation map for fields in type ClaimType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClinicalImpressionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClinicalImpressionStatus.php index ff53c7d6c8..3bc62fd47e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClinicalImpressionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClinicalImpressionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRClinicalImpressionStatus extends FHIRElement * Validation map for fields in type ClinicalImpressionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpressionStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCode.php index 7e69ebc7f6..785412cbca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRCode extends FHIRElement * Validation map for fields in type code * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCode Constructor @@ -172,11 +172,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCodeableConcept.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCodeableConcept.php index 95145331e6..c087df9bef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCodeableConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCodeableConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRCodeableConcept extends FHIRElement * Validation map for fields in type CodeableConcept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeableConcept Constructor @@ -294,11 +294,86 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCoding())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODING])) { + $v = $this->getCoding(); + foreach($validationRules[self::FIELD_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODEABLE_CONCEPT, self::FIELD_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODING])) { + $errs[self::FIELD_CODING] = []; + } + $errs[self::FIELD_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODEABLE_CONCEPT, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCoding.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCoding.php index c05ced1067..c509898a5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCoding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCoding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -159,7 +159,7 @@ class FHIRCoding extends FHIRElement * Validation map for fields in type Coding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoding Constructor @@ -521,11 +521,135 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUserSelected())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USER_SELECTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USER_SELECTED])) { + $v = $this->getUserSelected(); + foreach($validationRules[self::FIELD_USER_SELECTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_USER_SELECTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USER_SELECTED])) { + $errs[self::FIELD_USER_SELECTED] = []; + } + $errs[self::FIELD_USER_SELECTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationRequestStatus.php index dc1af0b279..cf5138a9af 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCommunicationRequestStatus extends FHIRElement * Validation map for fields in type CommunicationRequestStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationRequestStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationStatus.php index 09d658be74..e4232d3e31 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCommunicationStatus extends FHIRElement * Validation map for fields in type CommunicationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionAttestationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionAttestationMode.php index 55abc6c8bc..d7e881099a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionAttestationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionAttestationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCompositionAttestationMode extends FHIRElement * Validation map for fields in type CompositionAttestationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionAttestationMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionStatus.php index 7561a3a528..52d206f4b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCompositionStatus extends FHIRElement * Validation map for fields in type CompositionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConceptMapEquivalence.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConceptMapEquivalence.php index 11b8725597..52bd68fd09 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConceptMapEquivalence.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConceptMapEquivalence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRConceptMapEquivalence extends FHIRElement * Validation map for fields in type ConceptMapEquivalence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapEquivalence Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionVerificationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionVerificationStatus.php index 59149102c2..240c159dff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionVerificationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionVerificationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRConditionVerificationStatus extends FHIRElement * Validation map for fields in type ConditionVerificationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionVerificationStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_VERIFICATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionalDeleteStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionalDeleteStatus.php index 10a42d5fef..303830de1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionalDeleteStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionalDeleteStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConditionalDeleteStatus extends FHIRElement * Validation map for fields in type ConditionalDeleteStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionalDeleteStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITIONAL_DELETE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceEventMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceEventMode.php index 5e4d38c9a0..e34ea6c3d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceEventMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceEventMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConformanceEventMode extends FHIRElement * Validation map for fields in type ConformanceEventMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceEventMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_EVENT_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceResourceStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceResourceStatus.php index 5b4bbdcdfc..8ace87e12f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceResourceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceResourceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRConformanceResourceStatus extends FHIRElement * Validation map for fields in type ConformanceResourceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceResourceStatus Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_RESOURCE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceStatementKind.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceStatementKind.php index 147f49b954..8c11b72ef2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceStatementKind.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceStatementKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConformanceStatementKind extends FHIRElement * Validation map for fields in type ConformanceStatementKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConformanceStatementKind Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE_STATEMENT_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConstraintSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConstraintSeverity.php index 46b4b22dd9..317a60985e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConstraintSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConstraintSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConstraintSeverity extends FHIRElement * Validation map for fields in type ConstraintSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConstraintSeverity Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPoint.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPoint.php index 96b9424680..f4c90ad7e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPoint.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRContactPoint extends FHIRElement * Validation map for fields in type ContactPoint * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactPoint Constructor @@ -460,11 +460,135 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRank())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RANK] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RANK])) { + $v = $this->getRank(); + foreach($validationRules[self::FIELD_RANK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_RANK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RANK])) { + $errs[self::FIELD_RANK] = []; + } + $errs[self::FIELD_RANK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointSystem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointSystem.php index 95fa72b2ee..9f9dfc24dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContactPointSystem extends FHIRElement * Validation map for fields in type ContactPointSystem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactPointSystem Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_SYSTEM, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointUse.php index 1c4b5596ee..228ed0a718 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContactPointUse extends FHIRElement * Validation map for fields in type ContactPointUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactPointUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContentType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContentType.php index 1fe066b0b8..efce6f537f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContentType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContentType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContentType extends FHIRElement * Validation map for fields in type ContentType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContentType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTENT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDataElementStringency.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDataElementStringency.php index 1f4991f70b..a3863e2d35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDataElementStringency.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDataElementStringency.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDataElementStringency extends FHIRElement * Validation map for fields in type DataElementStringency * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataElementStringency Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_STRINGENCY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDate.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDate.php index c4565219c0..cf8fab0c0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDate.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRDate extends FHIRElement * Validation map for fields in type date * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDate Constructor @@ -172,11 +172,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDateTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDateTime.php index 52e42003b5..bf658768a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDateTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDateTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRDateTime extends FHIRElement * Validation map for fields in type dateTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDateTime Constructor @@ -174,11 +174,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDaysOfWeek.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDaysOfWeek.php index 29618b4224..ec292d32dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDaysOfWeek.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDaysOfWeek.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDaysOfWeek extends FHIRElement * Validation map for fields in type DaysOfWeek * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDaysOfWeek Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DAYS_OF_WEEK, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDecimal.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDecimal.php index 8f5e904163..ddeb3fceb1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDecimal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDecimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRDecimal extends FHIRElement * Validation map for fields in type decimal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDecimal Constructor @@ -172,11 +172,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DECIMAL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDetectedIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDetectedIssueSeverity.php index 42af46f3c0..1e40e97b36 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDetectedIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDetectedIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDetectedIssueSeverity extends FHIRElement * Validation map for fields in type DetectedIssueSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDetectedIssueSeverity Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationState.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationState.php index 77035ad157..13b4fff193 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationState.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricCalibrationState extends FHIRElement * Validation map for fields in type DeviceMetricCalibrationState * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCalibrationState Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_STATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationType.php index bd48933653..7d1d742b5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricCalibrationType extends FHIRElement * Validation map for fields in type DeviceMetricCalibrationType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCalibrationType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCategory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCategory.php index d56b9faa1e..a8ef00f2df 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricCategory extends FHIRElement * Validation map for fields in type DeviceMetricCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCategory Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricColor.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricColor.php index 08cfa7ae14..498531ceef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricColor.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricColor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricColor extends FHIRElement * Validation map for fields in type DeviceMetricColor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricColor Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_COLOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricOperationalStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricOperationalStatus.php index c0341b9c01..cf5c7f411b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricOperationalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricOperationalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricOperationalStatus extends FHIRElement * Validation map for fields in type DeviceMetricOperationalStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricOperationalStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_OPERATIONAL_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceStatus.php index 401966a9b3..9618de2349 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceStatus extends FHIRElement * Validation map for fields in type DeviceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestPriority.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestPriority.php index d9f145c86a..094f58508e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceUseRequestPriority extends FHIRElement * Validation map for fields in type DeviceUseRequestPriority * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceUseRequestPriority Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST_PRIORITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestStatus.php index 93625e34f2..30b392223b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceUseRequestStatus extends FHIRElement * Validation map for fields in type DeviceUseRequestStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceUseRequestStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderPriority.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderPriority.php index 3a057d6ba9..605640d0dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDiagnosticOrderPriority extends FHIRElement * Validation map for fields in type DiagnosticOrderPriority * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticOrderPriority Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_PRIORITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderStatus.php index 2c21fcc80e..fb41985599 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDiagnosticOrderStatus extends FHIRElement * Validation map for fields in type DiagnosticOrderStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticOrderStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticReportStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticReportStatus.php index 7f46e27603..59ce55ede3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDiagnosticReportStatus extends FHIRElement * Validation map for fields in type DiagnosticReportStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReportStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDigitalMediaType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDigitalMediaType.php index 6f1b5fb0ad..c7802cb7fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDigitalMediaType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDigitalMediaType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDigitalMediaType extends FHIRElement * Validation map for fields in type DigitalMediaType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDigitalMediaType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIGITAL_MEDIA_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentMode.php index 5afe6b94aa..b2b0ad1963 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDocumentMode extends FHIRElement * Validation map for fields in type DocumentMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentReferenceStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentReferenceStatus.php index 10d7290ccf..8a0ee18ca7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentReferenceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentReferenceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRDocumentReferenceStatus extends FHIRElement * Validation map for fields in type DocumentReferenceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceStatus Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentRelationshipType.php index 25d981311b..012ffd3f3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDocumentRelationshipType extends FHIRElement * Validation map for fields in type DocumentRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentRelationshipType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition.php index f470db37b3..b5357d420a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -3663,7 +3663,7 @@ class FHIRElementDefinition extends FHIRElement * Validation map for fields in type ElementDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinition Constructor @@ -16733,11 +16733,3957 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAlias())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALIAS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBinding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getComments())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENTS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getConstraint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONSTRAINT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefaultValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_UUID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getExamplePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getExamplePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_UUID] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_UUID] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsModifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_MODIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsSummary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_SUMMARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMapping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_LENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_UUID] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeaningWhenMissing())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEANING_WHEN_MISSING] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_UUID] = $fieldErrs; + } + } + if (null !== ($v = $this->getMustSupport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MUST_SUPPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNameReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_UUID] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRepresentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPRESENTATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getShort())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SHORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSlicing())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLICING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BINDING])) { + $v = $this->getBinding(); + foreach($validationRules[self::FIELD_BINDING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_BINDING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING])) { + $errs[self::FIELD_BINDING] = []; + } + $errs[self::FIELD_BINDING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENTS])) { + $v = $this->getComments(); + foreach($validationRules[self::FIELD_COMMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_COMMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENTS])) { + $errs[self::FIELD_COMMENTS] = []; + } + $errs[self::FIELD_COMMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONSTRAINT])) { + $v = $this->getConstraint(); + foreach($validationRules[self::FIELD_CONSTRAINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CONSTRAINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONSTRAINT])) { + $errs[self::FIELD_CONSTRAINT] = []; + } + $errs[self::FIELD_CONSTRAINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ADDRESS])) { + $v = $this->getDefaultValueAddress(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ADDRESS])) { + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ANNOTATION])) { + $v = $this->getDefaultValueAnnotation(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ANNOTATION])) { + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ATTACHMENT])) { + $v = $this->getDefaultValueAttachment(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT])) { + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $v = $this->getDefaultValueBase64Binary(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $v = $this->getDefaultValueBoolean(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODE])) { + $v = $this->getDefaultValueCode(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODE])) { + $errs[self::FIELD_DEFAULT_VALUE_CODE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getDefaultValueCodeableConcept(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODING])) { + $v = $this->getDefaultValueCoding(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODING])) { + $errs[self::FIELD_DEFAULT_VALUE_CODING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])) { + $v = $this->getDefaultValueContactPoint(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATE])) { + $v = $this->getDefaultValueDate(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATE])) { + $errs[self::FIELD_DEFAULT_VALUE_DATE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $v = $this->getDefaultValueDateTime(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $v = $this->getDefaultValueDecimal(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { + $v = $this->getDefaultValueHumanName(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ID])) { + $v = $this->getDefaultValueId(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ID])) { + $errs[self::FIELD_DEFAULT_VALUE_ID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { + $v = $this->getDefaultValueIdentifier(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $v = $this->getDefaultValueInstant(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $errs[self::FIELD_DEFAULT_VALUE_INSTANT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $v = $this->getDefaultValueInteger(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $errs[self::FIELD_DEFAULT_VALUE_INTEGER] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $v = $this->getDefaultValueMarkdown(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_META])) { + $v = $this->getDefaultValueMeta(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_META])) { + $errs[self::FIELD_DEFAULT_VALUE_META] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_OID])) { + $v = $this->getDefaultValueOid(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_OID])) { + $errs[self::FIELD_DEFAULT_VALUE_OID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_PERIOD])) { + $v = $this->getDefaultValuePeriod(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_PERIOD])) { + $errs[self::FIELD_DEFAULT_VALUE_PERIOD] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $v = $this->getDefaultValuePositiveInt(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_QUANTITY])) { + $v = $this->getDefaultValueQuantity(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_QUANTITY])) { + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RANGE])) { + $v = $this->getDefaultValueRange(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RANGE])) { + $errs[self::FIELD_DEFAULT_VALUE_RANGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RATIO])) { + $v = $this->getDefaultValueRatio(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RATIO])) { + $errs[self::FIELD_DEFAULT_VALUE_RATIO] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_REFERENCE])) { + $v = $this->getDefaultValueReference(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_REFERENCE])) { + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA])) { + $v = $this->getDefaultValueSampledData(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_SIGNATURE])) { + $v = $this->getDefaultValueSignature(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_SIGNATURE])) { + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_STRING])) { + $v = $this->getDefaultValueString(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_STRING])) { + $errs[self::FIELD_DEFAULT_VALUE_STRING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TIME])) { + $v = $this->getDefaultValueTime(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TIME])) { + $errs[self::FIELD_DEFAULT_VALUE_TIME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TIMING])) { + $v = $this->getDefaultValueTiming(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TIMING])) { + $errs[self::FIELD_DEFAULT_VALUE_TIMING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $v = $this->getDefaultValueUnsignedInt(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_URI])) { + $v = $this->getDefaultValueUri(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_URI])) { + $errs[self::FIELD_DEFAULT_VALUE_URI] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_UUID])) { + $v = $this->getDefaultValueUuid(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_UUID])) { + $errs[self::FIELD_DEFAULT_VALUE_UUID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_ADDRESS])) { + $v = $this->getExampleAddress(); + foreach($validationRules[self::FIELD_EXAMPLE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_ADDRESS])) { + $errs[self::FIELD_EXAMPLE_ADDRESS] = []; + } + $errs[self::FIELD_EXAMPLE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_ANNOTATION])) { + $v = $this->getExampleAnnotation(); + foreach($validationRules[self::FIELD_EXAMPLE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_ANNOTATION])) { + $errs[self::FIELD_EXAMPLE_ANNOTATION] = []; + } + $errs[self::FIELD_EXAMPLE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_ATTACHMENT])) { + $v = $this->getExampleAttachment(); + foreach($validationRules[self::FIELD_EXAMPLE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_ATTACHMENT])) { + $errs[self::FIELD_EXAMPLE_ATTACHMENT] = []; + } + $errs[self::FIELD_EXAMPLE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_BASE_64BINARY])) { + $v = $this->getExampleBase64Binary(); + foreach($validationRules[self::FIELD_EXAMPLE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_BASE_64BINARY])) { + $errs[self::FIELD_EXAMPLE_BASE_64BINARY] = []; + } + $errs[self::FIELD_EXAMPLE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_BOOLEAN])) { + $v = $this->getExampleBoolean(); + foreach($validationRules[self::FIELD_EXAMPLE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_BOOLEAN])) { + $errs[self::FIELD_EXAMPLE_BOOLEAN] = []; + } + $errs[self::FIELD_EXAMPLE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_CODE])) { + $v = $this->getExampleCode(); + foreach($validationRules[self::FIELD_EXAMPLE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_CODE])) { + $errs[self::FIELD_EXAMPLE_CODE] = []; + } + $errs[self::FIELD_EXAMPLE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_CODEABLE_CONCEPT])) { + $v = $this->getExampleCodeableConcept(); + foreach($validationRules[self::FIELD_EXAMPLE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_EXAMPLE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_EXAMPLE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_CODING])) { + $v = $this->getExampleCoding(); + foreach($validationRules[self::FIELD_EXAMPLE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_CODING])) { + $errs[self::FIELD_EXAMPLE_CODING] = []; + } + $errs[self::FIELD_EXAMPLE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_CONTACT_POINT])) { + $v = $this->getExampleContactPoint(); + foreach($validationRules[self::FIELD_EXAMPLE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_CONTACT_POINT])) { + $errs[self::FIELD_EXAMPLE_CONTACT_POINT] = []; + } + $errs[self::FIELD_EXAMPLE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_DATE])) { + $v = $this->getExampleDate(); + foreach($validationRules[self::FIELD_EXAMPLE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_DATE])) { + $errs[self::FIELD_EXAMPLE_DATE] = []; + } + $errs[self::FIELD_EXAMPLE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_DATE_TIME])) { + $v = $this->getExampleDateTime(); + foreach($validationRules[self::FIELD_EXAMPLE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_DATE_TIME])) { + $errs[self::FIELD_EXAMPLE_DATE_TIME] = []; + } + $errs[self::FIELD_EXAMPLE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_DECIMAL])) { + $v = $this->getExampleDecimal(); + foreach($validationRules[self::FIELD_EXAMPLE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_DECIMAL])) { + $errs[self::FIELD_EXAMPLE_DECIMAL] = []; + } + $errs[self::FIELD_EXAMPLE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_HUMAN_NAME])) { + $v = $this->getExampleHumanName(); + foreach($validationRules[self::FIELD_EXAMPLE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_HUMAN_NAME])) { + $errs[self::FIELD_EXAMPLE_HUMAN_NAME] = []; + } + $errs[self::FIELD_EXAMPLE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_ID])) { + $v = $this->getExampleId(); + foreach($validationRules[self::FIELD_EXAMPLE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_ID])) { + $errs[self::FIELD_EXAMPLE_ID] = []; + } + $errs[self::FIELD_EXAMPLE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_IDENTIFIER])) { + $v = $this->getExampleIdentifier(); + foreach($validationRules[self::FIELD_EXAMPLE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_IDENTIFIER])) { + $errs[self::FIELD_EXAMPLE_IDENTIFIER] = []; + } + $errs[self::FIELD_EXAMPLE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_INSTANT])) { + $v = $this->getExampleInstant(); + foreach($validationRules[self::FIELD_EXAMPLE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_INSTANT])) { + $errs[self::FIELD_EXAMPLE_INSTANT] = []; + } + $errs[self::FIELD_EXAMPLE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_INTEGER])) { + $v = $this->getExampleInteger(); + foreach($validationRules[self::FIELD_EXAMPLE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_INTEGER])) { + $errs[self::FIELD_EXAMPLE_INTEGER] = []; + } + $errs[self::FIELD_EXAMPLE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_MARKDOWN])) { + $v = $this->getExampleMarkdown(); + foreach($validationRules[self::FIELD_EXAMPLE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_MARKDOWN])) { + $errs[self::FIELD_EXAMPLE_MARKDOWN] = []; + } + $errs[self::FIELD_EXAMPLE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_META])) { + $v = $this->getExampleMeta(); + foreach($validationRules[self::FIELD_EXAMPLE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_META])) { + $errs[self::FIELD_EXAMPLE_META] = []; + } + $errs[self::FIELD_EXAMPLE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_OID])) { + $v = $this->getExampleOid(); + foreach($validationRules[self::FIELD_EXAMPLE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_OID])) { + $errs[self::FIELD_EXAMPLE_OID] = []; + } + $errs[self::FIELD_EXAMPLE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_PERIOD])) { + $v = $this->getExamplePeriod(); + foreach($validationRules[self::FIELD_EXAMPLE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_PERIOD])) { + $errs[self::FIELD_EXAMPLE_PERIOD] = []; + } + $errs[self::FIELD_EXAMPLE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_POSITIVE_INT])) { + $v = $this->getExamplePositiveInt(); + foreach($validationRules[self::FIELD_EXAMPLE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_POSITIVE_INT])) { + $errs[self::FIELD_EXAMPLE_POSITIVE_INT] = []; + } + $errs[self::FIELD_EXAMPLE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_QUANTITY])) { + $v = $this->getExampleQuantity(); + foreach($validationRules[self::FIELD_EXAMPLE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_QUANTITY])) { + $errs[self::FIELD_EXAMPLE_QUANTITY] = []; + } + $errs[self::FIELD_EXAMPLE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_RANGE])) { + $v = $this->getExampleRange(); + foreach($validationRules[self::FIELD_EXAMPLE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_RANGE])) { + $errs[self::FIELD_EXAMPLE_RANGE] = []; + } + $errs[self::FIELD_EXAMPLE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_RATIO])) { + $v = $this->getExampleRatio(); + foreach($validationRules[self::FIELD_EXAMPLE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_RATIO])) { + $errs[self::FIELD_EXAMPLE_RATIO] = []; + } + $errs[self::FIELD_EXAMPLE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_REFERENCE])) { + $v = $this->getExampleReference(); + foreach($validationRules[self::FIELD_EXAMPLE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_REFERENCE])) { + $errs[self::FIELD_EXAMPLE_REFERENCE] = []; + } + $errs[self::FIELD_EXAMPLE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_SAMPLED_DATA])) { + $v = $this->getExampleSampledData(); + foreach($validationRules[self::FIELD_EXAMPLE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_SAMPLED_DATA])) { + $errs[self::FIELD_EXAMPLE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_EXAMPLE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_SIGNATURE])) { + $v = $this->getExampleSignature(); + foreach($validationRules[self::FIELD_EXAMPLE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_SIGNATURE])) { + $errs[self::FIELD_EXAMPLE_SIGNATURE] = []; + } + $errs[self::FIELD_EXAMPLE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_STRING])) { + $v = $this->getExampleString(); + foreach($validationRules[self::FIELD_EXAMPLE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_STRING])) { + $errs[self::FIELD_EXAMPLE_STRING] = []; + } + $errs[self::FIELD_EXAMPLE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_TIME])) { + $v = $this->getExampleTime(); + foreach($validationRules[self::FIELD_EXAMPLE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_TIME])) { + $errs[self::FIELD_EXAMPLE_TIME] = []; + } + $errs[self::FIELD_EXAMPLE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_TIMING])) { + $v = $this->getExampleTiming(); + foreach($validationRules[self::FIELD_EXAMPLE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_TIMING])) { + $errs[self::FIELD_EXAMPLE_TIMING] = []; + } + $errs[self::FIELD_EXAMPLE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_UNSIGNED_INT])) { + $v = $this->getExampleUnsignedInt(); + foreach($validationRules[self::FIELD_EXAMPLE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_UNSIGNED_INT])) { + $errs[self::FIELD_EXAMPLE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_EXAMPLE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_URI])) { + $v = $this->getExampleUri(); + foreach($validationRules[self::FIELD_EXAMPLE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_URI])) { + $errs[self::FIELD_EXAMPLE_URI] = []; + } + $errs[self::FIELD_EXAMPLE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_UUID])) { + $v = $this->getExampleUuid(); + foreach($validationRules[self::FIELD_EXAMPLE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_UUID])) { + $errs[self::FIELD_EXAMPLE_UUID] = []; + } + $errs[self::FIELD_EXAMPLE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ADDRESS])) { + $v = $this->getFixedAddress(); + foreach($validationRules[self::FIELD_FIXED_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ADDRESS])) { + $errs[self::FIELD_FIXED_ADDRESS] = []; + } + $errs[self::FIELD_FIXED_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ANNOTATION])) { + $v = $this->getFixedAnnotation(); + foreach($validationRules[self::FIELD_FIXED_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ANNOTATION])) { + $errs[self::FIELD_FIXED_ANNOTATION] = []; + } + $errs[self::FIELD_FIXED_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ATTACHMENT])) { + $v = $this->getFixedAttachment(); + foreach($validationRules[self::FIELD_FIXED_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ATTACHMENT])) { + $errs[self::FIELD_FIXED_ATTACHMENT] = []; + } + $errs[self::FIELD_FIXED_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_BASE_64BINARY])) { + $v = $this->getFixedBase64Binary(); + foreach($validationRules[self::FIELD_FIXED_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_BASE_64BINARY])) { + $errs[self::FIELD_FIXED_BASE_64BINARY] = []; + } + $errs[self::FIELD_FIXED_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_BOOLEAN])) { + $v = $this->getFixedBoolean(); + foreach($validationRules[self::FIELD_FIXED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_BOOLEAN])) { + $errs[self::FIELD_FIXED_BOOLEAN] = []; + } + $errs[self::FIELD_FIXED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CODE])) { + $v = $this->getFixedCode(); + foreach($validationRules[self::FIELD_FIXED_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CODE])) { + $errs[self::FIELD_FIXED_CODE] = []; + } + $errs[self::FIELD_FIXED_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CODEABLE_CONCEPT])) { + $v = $this->getFixedCodeableConcept(); + foreach($validationRules[self::FIELD_FIXED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_FIXED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_FIXED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CODING])) { + $v = $this->getFixedCoding(); + foreach($validationRules[self::FIELD_FIXED_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CODING])) { + $errs[self::FIELD_FIXED_CODING] = []; + } + $errs[self::FIELD_FIXED_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CONTACT_POINT])) { + $v = $this->getFixedContactPoint(); + foreach($validationRules[self::FIELD_FIXED_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CONTACT_POINT])) { + $errs[self::FIELD_FIXED_CONTACT_POINT] = []; + } + $errs[self::FIELD_FIXED_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DATE])) { + $v = $this->getFixedDate(); + foreach($validationRules[self::FIELD_FIXED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DATE])) { + $errs[self::FIELD_FIXED_DATE] = []; + } + $errs[self::FIELD_FIXED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DATE_TIME])) { + $v = $this->getFixedDateTime(); + foreach($validationRules[self::FIELD_FIXED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DATE_TIME])) { + $errs[self::FIELD_FIXED_DATE_TIME] = []; + } + $errs[self::FIELD_FIXED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DECIMAL])) { + $v = $this->getFixedDecimal(); + foreach($validationRules[self::FIELD_FIXED_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DECIMAL])) { + $errs[self::FIELD_FIXED_DECIMAL] = []; + } + $errs[self::FIELD_FIXED_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_HUMAN_NAME])) { + $v = $this->getFixedHumanName(); + foreach($validationRules[self::FIELD_FIXED_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_HUMAN_NAME])) { + $errs[self::FIELD_FIXED_HUMAN_NAME] = []; + } + $errs[self::FIELD_FIXED_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ID])) { + $v = $this->getFixedId(); + foreach($validationRules[self::FIELD_FIXED_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ID])) { + $errs[self::FIELD_FIXED_ID] = []; + } + $errs[self::FIELD_FIXED_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_IDENTIFIER])) { + $v = $this->getFixedIdentifier(); + foreach($validationRules[self::FIELD_FIXED_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_IDENTIFIER])) { + $errs[self::FIELD_FIXED_IDENTIFIER] = []; + } + $errs[self::FIELD_FIXED_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_INSTANT])) { + $v = $this->getFixedInstant(); + foreach($validationRules[self::FIELD_FIXED_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_INSTANT])) { + $errs[self::FIELD_FIXED_INSTANT] = []; + } + $errs[self::FIELD_FIXED_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_INTEGER])) { + $v = $this->getFixedInteger(); + foreach($validationRules[self::FIELD_FIXED_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_INTEGER])) { + $errs[self::FIELD_FIXED_INTEGER] = []; + } + $errs[self::FIELD_FIXED_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_MARKDOWN])) { + $v = $this->getFixedMarkdown(); + foreach($validationRules[self::FIELD_FIXED_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_MARKDOWN])) { + $errs[self::FIELD_FIXED_MARKDOWN] = []; + } + $errs[self::FIELD_FIXED_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_META])) { + $v = $this->getFixedMeta(); + foreach($validationRules[self::FIELD_FIXED_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_META])) { + $errs[self::FIELD_FIXED_META] = []; + } + $errs[self::FIELD_FIXED_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_OID])) { + $v = $this->getFixedOid(); + foreach($validationRules[self::FIELD_FIXED_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_OID])) { + $errs[self::FIELD_FIXED_OID] = []; + } + $errs[self::FIELD_FIXED_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_PERIOD])) { + $v = $this->getFixedPeriod(); + foreach($validationRules[self::FIELD_FIXED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_PERIOD])) { + $errs[self::FIELD_FIXED_PERIOD] = []; + } + $errs[self::FIELD_FIXED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_POSITIVE_INT])) { + $v = $this->getFixedPositiveInt(); + foreach($validationRules[self::FIELD_FIXED_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_POSITIVE_INT])) { + $errs[self::FIELD_FIXED_POSITIVE_INT] = []; + } + $errs[self::FIELD_FIXED_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_QUANTITY])) { + $v = $this->getFixedQuantity(); + foreach($validationRules[self::FIELD_FIXED_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_QUANTITY])) { + $errs[self::FIELD_FIXED_QUANTITY] = []; + } + $errs[self::FIELD_FIXED_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_RANGE])) { + $v = $this->getFixedRange(); + foreach($validationRules[self::FIELD_FIXED_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_RANGE])) { + $errs[self::FIELD_FIXED_RANGE] = []; + } + $errs[self::FIELD_FIXED_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_RATIO])) { + $v = $this->getFixedRatio(); + foreach($validationRules[self::FIELD_FIXED_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_RATIO])) { + $errs[self::FIELD_FIXED_RATIO] = []; + } + $errs[self::FIELD_FIXED_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_REFERENCE])) { + $v = $this->getFixedReference(); + foreach($validationRules[self::FIELD_FIXED_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_REFERENCE])) { + $errs[self::FIELD_FIXED_REFERENCE] = []; + } + $errs[self::FIELD_FIXED_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_SAMPLED_DATA])) { + $v = $this->getFixedSampledData(); + foreach($validationRules[self::FIELD_FIXED_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_SAMPLED_DATA])) { + $errs[self::FIELD_FIXED_SAMPLED_DATA] = []; + } + $errs[self::FIELD_FIXED_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_SIGNATURE])) { + $v = $this->getFixedSignature(); + foreach($validationRules[self::FIELD_FIXED_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_SIGNATURE])) { + $errs[self::FIELD_FIXED_SIGNATURE] = []; + } + $errs[self::FIELD_FIXED_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_STRING])) { + $v = $this->getFixedString(); + foreach($validationRules[self::FIELD_FIXED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_STRING])) { + $errs[self::FIELD_FIXED_STRING] = []; + } + $errs[self::FIELD_FIXED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_TIME])) { + $v = $this->getFixedTime(); + foreach($validationRules[self::FIELD_FIXED_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_TIME])) { + $errs[self::FIELD_FIXED_TIME] = []; + } + $errs[self::FIELD_FIXED_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_TIMING])) { + $v = $this->getFixedTiming(); + foreach($validationRules[self::FIELD_FIXED_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_TIMING])) { + $errs[self::FIELD_FIXED_TIMING] = []; + } + $errs[self::FIELD_FIXED_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_UNSIGNED_INT])) { + $v = $this->getFixedUnsignedInt(); + foreach($validationRules[self::FIELD_FIXED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_UNSIGNED_INT])) { + $errs[self::FIELD_FIXED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_FIXED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_URI])) { + $v = $this->getFixedUri(); + foreach($validationRules[self::FIELD_FIXED_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_URI])) { + $errs[self::FIELD_FIXED_URI] = []; + } + $errs[self::FIELD_FIXED_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_UUID])) { + $v = $this->getFixedUuid(); + foreach($validationRules[self::FIELD_FIXED_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_UUID])) { + $errs[self::FIELD_FIXED_UUID] = []; + } + $errs[self::FIELD_FIXED_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_MODIFIER])) { + $v = $this->getIsModifier(); + foreach($validationRules[self::FIELD_IS_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_IS_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_MODIFIER])) { + $errs[self::FIELD_IS_MODIFIER] = []; + } + $errs[self::FIELD_IS_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_SUMMARY])) { + $v = $this->getIsSummary(); + foreach($validationRules[self::FIELD_IS_SUMMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_IS_SUMMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_SUMMARY])) { + $errs[self::FIELD_IS_SUMMARY] = []; + } + $errs[self::FIELD_IS_SUMMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAPPING])) { + $v = $this->getMapping(); + foreach($validationRules[self::FIELD_MAPPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAPPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAPPING])) { + $errs[self::FIELD_MAPPING] = []; + } + $errs[self::FIELD_MAPPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_LENGTH])) { + $v = $this->getMaxLength(); + foreach($validationRules[self::FIELD_MAX_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_LENGTH])) { + $errs[self::FIELD_MAX_LENGTH] = []; + } + $errs[self::FIELD_MAX_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_ADDRESS])) { + $v = $this->getMaxValueAddress(); + foreach($validationRules[self::FIELD_MAX_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_ADDRESS])) { + $errs[self::FIELD_MAX_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_MAX_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_ANNOTATION])) { + $v = $this->getMaxValueAnnotation(); + foreach($validationRules[self::FIELD_MAX_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_ANNOTATION])) { + $errs[self::FIELD_MAX_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_MAX_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_ATTACHMENT])) { + $v = $this->getMaxValueAttachment(); + foreach($validationRules[self::FIELD_MAX_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_ATTACHMENT])) { + $errs[self::FIELD_MAX_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_MAX_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_BASE_64BINARY])) { + $v = $this->getMaxValueBase64Binary(); + foreach($validationRules[self::FIELD_MAX_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_MAX_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_MAX_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_BOOLEAN])) { + $v = $this->getMaxValueBoolean(); + foreach($validationRules[self::FIELD_MAX_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_BOOLEAN])) { + $errs[self::FIELD_MAX_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_MAX_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_CODE])) { + $v = $this->getMaxValueCode(); + foreach($validationRules[self::FIELD_MAX_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_CODE])) { + $errs[self::FIELD_MAX_VALUE_CODE] = []; + } + $errs[self::FIELD_MAX_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getMaxValueCodeableConcept(); + foreach($validationRules[self::FIELD_MAX_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MAX_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MAX_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_CODING])) { + $v = $this->getMaxValueCoding(); + foreach($validationRules[self::FIELD_MAX_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_CODING])) { + $errs[self::FIELD_MAX_VALUE_CODING] = []; + } + $errs[self::FIELD_MAX_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_CONTACT_POINT])) { + $v = $this->getMaxValueContactPoint(); + foreach($validationRules[self::FIELD_MAX_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_MAX_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_MAX_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_DATE])) { + $v = $this->getMaxValueDate(); + foreach($validationRules[self::FIELD_MAX_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_DATE])) { + $errs[self::FIELD_MAX_VALUE_DATE] = []; + } + $errs[self::FIELD_MAX_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_DATE_TIME])) { + $v = $this->getMaxValueDateTime(); + foreach($validationRules[self::FIELD_MAX_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_DATE_TIME])) { + $errs[self::FIELD_MAX_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_MAX_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_DECIMAL])) { + $v = $this->getMaxValueDecimal(); + foreach($validationRules[self::FIELD_MAX_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_DECIMAL])) { + $errs[self::FIELD_MAX_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_MAX_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_HUMAN_NAME])) { + $v = $this->getMaxValueHumanName(); + foreach($validationRules[self::FIELD_MAX_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_MAX_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_MAX_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_ID])) { + $v = $this->getMaxValueId(); + foreach($validationRules[self::FIELD_MAX_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_ID])) { + $errs[self::FIELD_MAX_VALUE_ID] = []; + } + $errs[self::FIELD_MAX_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_IDENTIFIER])) { + $v = $this->getMaxValueIdentifier(); + foreach($validationRules[self::FIELD_MAX_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_IDENTIFIER])) { + $errs[self::FIELD_MAX_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_MAX_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_INSTANT])) { + $v = $this->getMaxValueInstant(); + foreach($validationRules[self::FIELD_MAX_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_INSTANT])) { + $errs[self::FIELD_MAX_VALUE_INSTANT] = []; + } + $errs[self::FIELD_MAX_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_INTEGER])) { + $v = $this->getMaxValueInteger(); + foreach($validationRules[self::FIELD_MAX_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_INTEGER])) { + $errs[self::FIELD_MAX_VALUE_INTEGER] = []; + } + $errs[self::FIELD_MAX_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_MARKDOWN])) { + $v = $this->getMaxValueMarkdown(); + foreach($validationRules[self::FIELD_MAX_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_MARKDOWN])) { + $errs[self::FIELD_MAX_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_MAX_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_META])) { + $v = $this->getMaxValueMeta(); + foreach($validationRules[self::FIELD_MAX_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_META])) { + $errs[self::FIELD_MAX_VALUE_META] = []; + } + $errs[self::FIELD_MAX_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_OID])) { + $v = $this->getMaxValueOid(); + foreach($validationRules[self::FIELD_MAX_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_OID])) { + $errs[self::FIELD_MAX_VALUE_OID] = []; + } + $errs[self::FIELD_MAX_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_PERIOD])) { + $v = $this->getMaxValuePeriod(); + foreach($validationRules[self::FIELD_MAX_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_PERIOD])) { + $errs[self::FIELD_MAX_VALUE_PERIOD] = []; + } + $errs[self::FIELD_MAX_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_POSITIVE_INT])) { + $v = $this->getMaxValuePositiveInt(); + foreach($validationRules[self::FIELD_MAX_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_MAX_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_MAX_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_QUANTITY])) { + $v = $this->getMaxValueQuantity(); + foreach($validationRules[self::FIELD_MAX_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_QUANTITY])) { + $errs[self::FIELD_MAX_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_MAX_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_RANGE])) { + $v = $this->getMaxValueRange(); + foreach($validationRules[self::FIELD_MAX_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_RANGE])) { + $errs[self::FIELD_MAX_VALUE_RANGE] = []; + } + $errs[self::FIELD_MAX_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_RATIO])) { + $v = $this->getMaxValueRatio(); + foreach($validationRules[self::FIELD_MAX_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_RATIO])) { + $errs[self::FIELD_MAX_VALUE_RATIO] = []; + } + $errs[self::FIELD_MAX_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_REFERENCE])) { + $v = $this->getMaxValueReference(); + foreach($validationRules[self::FIELD_MAX_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_REFERENCE])) { + $errs[self::FIELD_MAX_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_MAX_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_SAMPLED_DATA])) { + $v = $this->getMaxValueSampledData(); + foreach($validationRules[self::FIELD_MAX_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_MAX_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_MAX_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_SIGNATURE])) { + $v = $this->getMaxValueSignature(); + foreach($validationRules[self::FIELD_MAX_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_SIGNATURE])) { + $errs[self::FIELD_MAX_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_MAX_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_STRING])) { + $v = $this->getMaxValueString(); + foreach($validationRules[self::FIELD_MAX_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_STRING])) { + $errs[self::FIELD_MAX_VALUE_STRING] = []; + } + $errs[self::FIELD_MAX_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_TIME])) { + $v = $this->getMaxValueTime(); + foreach($validationRules[self::FIELD_MAX_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_TIME])) { + $errs[self::FIELD_MAX_VALUE_TIME] = []; + } + $errs[self::FIELD_MAX_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_TIMING])) { + $v = $this->getMaxValueTiming(); + foreach($validationRules[self::FIELD_MAX_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_TIMING])) { + $errs[self::FIELD_MAX_VALUE_TIMING] = []; + } + $errs[self::FIELD_MAX_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { + $v = $this->getMaxValueUnsignedInt(); + foreach($validationRules[self::FIELD_MAX_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_MAX_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_MAX_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_URI])) { + $v = $this->getMaxValueUri(); + foreach($validationRules[self::FIELD_MAX_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_URI])) { + $errs[self::FIELD_MAX_VALUE_URI] = []; + } + $errs[self::FIELD_MAX_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_UUID])) { + $v = $this->getMaxValueUuid(); + foreach($validationRules[self::FIELD_MAX_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_UUID])) { + $errs[self::FIELD_MAX_VALUE_UUID] = []; + } + $errs[self::FIELD_MAX_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEANING_WHEN_MISSING])) { + $v = $this->getMeaningWhenMissing(); + foreach($validationRules[self::FIELD_MEANING_WHEN_MISSING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MEANING_WHEN_MISSING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEANING_WHEN_MISSING])) { + $errs[self::FIELD_MEANING_WHEN_MISSING] = []; + } + $errs[self::FIELD_MEANING_WHEN_MISSING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_ADDRESS])) { + $v = $this->getMinValueAddress(); + foreach($validationRules[self::FIELD_MIN_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_ADDRESS])) { + $errs[self::FIELD_MIN_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_MIN_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_ANNOTATION])) { + $v = $this->getMinValueAnnotation(); + foreach($validationRules[self::FIELD_MIN_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_ANNOTATION])) { + $errs[self::FIELD_MIN_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_MIN_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_ATTACHMENT])) { + $v = $this->getMinValueAttachment(); + foreach($validationRules[self::FIELD_MIN_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_ATTACHMENT])) { + $errs[self::FIELD_MIN_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_MIN_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_BASE_64BINARY])) { + $v = $this->getMinValueBase64Binary(); + foreach($validationRules[self::FIELD_MIN_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_MIN_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_MIN_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_BOOLEAN])) { + $v = $this->getMinValueBoolean(); + foreach($validationRules[self::FIELD_MIN_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_BOOLEAN])) { + $errs[self::FIELD_MIN_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_MIN_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_CODE])) { + $v = $this->getMinValueCode(); + foreach($validationRules[self::FIELD_MIN_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_CODE])) { + $errs[self::FIELD_MIN_VALUE_CODE] = []; + } + $errs[self::FIELD_MIN_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getMinValueCodeableConcept(); + foreach($validationRules[self::FIELD_MIN_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MIN_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MIN_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_CODING])) { + $v = $this->getMinValueCoding(); + foreach($validationRules[self::FIELD_MIN_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_CODING])) { + $errs[self::FIELD_MIN_VALUE_CODING] = []; + } + $errs[self::FIELD_MIN_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_CONTACT_POINT])) { + $v = $this->getMinValueContactPoint(); + foreach($validationRules[self::FIELD_MIN_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_MIN_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_MIN_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_DATE])) { + $v = $this->getMinValueDate(); + foreach($validationRules[self::FIELD_MIN_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_DATE])) { + $errs[self::FIELD_MIN_VALUE_DATE] = []; + } + $errs[self::FIELD_MIN_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_DATE_TIME])) { + $v = $this->getMinValueDateTime(); + foreach($validationRules[self::FIELD_MIN_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_DATE_TIME])) { + $errs[self::FIELD_MIN_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_MIN_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_DECIMAL])) { + $v = $this->getMinValueDecimal(); + foreach($validationRules[self::FIELD_MIN_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_DECIMAL])) { + $errs[self::FIELD_MIN_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_MIN_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_HUMAN_NAME])) { + $v = $this->getMinValueHumanName(); + foreach($validationRules[self::FIELD_MIN_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_MIN_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_MIN_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_ID])) { + $v = $this->getMinValueId(); + foreach($validationRules[self::FIELD_MIN_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_ID])) { + $errs[self::FIELD_MIN_VALUE_ID] = []; + } + $errs[self::FIELD_MIN_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_IDENTIFIER])) { + $v = $this->getMinValueIdentifier(); + foreach($validationRules[self::FIELD_MIN_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_IDENTIFIER])) { + $errs[self::FIELD_MIN_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_MIN_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_INSTANT])) { + $v = $this->getMinValueInstant(); + foreach($validationRules[self::FIELD_MIN_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_INSTANT])) { + $errs[self::FIELD_MIN_VALUE_INSTANT] = []; + } + $errs[self::FIELD_MIN_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_INTEGER])) { + $v = $this->getMinValueInteger(); + foreach($validationRules[self::FIELD_MIN_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_INTEGER])) { + $errs[self::FIELD_MIN_VALUE_INTEGER] = []; + } + $errs[self::FIELD_MIN_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_MARKDOWN])) { + $v = $this->getMinValueMarkdown(); + foreach($validationRules[self::FIELD_MIN_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_MARKDOWN])) { + $errs[self::FIELD_MIN_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_MIN_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_META])) { + $v = $this->getMinValueMeta(); + foreach($validationRules[self::FIELD_MIN_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_META])) { + $errs[self::FIELD_MIN_VALUE_META] = []; + } + $errs[self::FIELD_MIN_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_OID])) { + $v = $this->getMinValueOid(); + foreach($validationRules[self::FIELD_MIN_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_OID])) { + $errs[self::FIELD_MIN_VALUE_OID] = []; + } + $errs[self::FIELD_MIN_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_PERIOD])) { + $v = $this->getMinValuePeriod(); + foreach($validationRules[self::FIELD_MIN_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_PERIOD])) { + $errs[self::FIELD_MIN_VALUE_PERIOD] = []; + } + $errs[self::FIELD_MIN_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_POSITIVE_INT])) { + $v = $this->getMinValuePositiveInt(); + foreach($validationRules[self::FIELD_MIN_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_MIN_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_MIN_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_QUANTITY])) { + $v = $this->getMinValueQuantity(); + foreach($validationRules[self::FIELD_MIN_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_QUANTITY])) { + $errs[self::FIELD_MIN_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_MIN_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_RANGE])) { + $v = $this->getMinValueRange(); + foreach($validationRules[self::FIELD_MIN_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_RANGE])) { + $errs[self::FIELD_MIN_VALUE_RANGE] = []; + } + $errs[self::FIELD_MIN_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_RATIO])) { + $v = $this->getMinValueRatio(); + foreach($validationRules[self::FIELD_MIN_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_RATIO])) { + $errs[self::FIELD_MIN_VALUE_RATIO] = []; + } + $errs[self::FIELD_MIN_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_REFERENCE])) { + $v = $this->getMinValueReference(); + foreach($validationRules[self::FIELD_MIN_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_REFERENCE])) { + $errs[self::FIELD_MIN_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_MIN_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_SAMPLED_DATA])) { + $v = $this->getMinValueSampledData(); + foreach($validationRules[self::FIELD_MIN_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_MIN_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_MIN_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_SIGNATURE])) { + $v = $this->getMinValueSignature(); + foreach($validationRules[self::FIELD_MIN_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_SIGNATURE])) { + $errs[self::FIELD_MIN_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_MIN_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_STRING])) { + $v = $this->getMinValueString(); + foreach($validationRules[self::FIELD_MIN_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_STRING])) { + $errs[self::FIELD_MIN_VALUE_STRING] = []; + } + $errs[self::FIELD_MIN_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_TIME])) { + $v = $this->getMinValueTime(); + foreach($validationRules[self::FIELD_MIN_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_TIME])) { + $errs[self::FIELD_MIN_VALUE_TIME] = []; + } + $errs[self::FIELD_MIN_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_TIMING])) { + $v = $this->getMinValueTiming(); + foreach($validationRules[self::FIELD_MIN_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_TIMING])) { + $errs[self::FIELD_MIN_VALUE_TIMING] = []; + } + $errs[self::FIELD_MIN_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { + $v = $this->getMinValueUnsignedInt(); + foreach($validationRules[self::FIELD_MIN_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_MIN_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_MIN_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_URI])) { + $v = $this->getMinValueUri(); + foreach($validationRules[self::FIELD_MIN_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_URI])) { + $errs[self::FIELD_MIN_VALUE_URI] = []; + } + $errs[self::FIELD_MIN_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_UUID])) { + $v = $this->getMinValueUuid(); + foreach($validationRules[self::FIELD_MIN_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_UUID])) { + $errs[self::FIELD_MIN_VALUE_UUID] = []; + } + $errs[self::FIELD_MIN_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MUST_SUPPORT])) { + $v = $this->getMustSupport(); + foreach($validationRules[self::FIELD_MUST_SUPPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MUST_SUPPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MUST_SUPPORT])) { + $errs[self::FIELD_MUST_SUPPORT] = []; + } + $errs[self::FIELD_MUST_SUPPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME_REFERENCE])) { + $v = $this->getNameReference(); + foreach($validationRules[self::FIELD_NAME_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_NAME_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME_REFERENCE])) { + $errs[self::FIELD_NAME_REFERENCE] = []; + } + $errs[self::FIELD_NAME_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ADDRESS])) { + $v = $this->getPatternAddress(); + foreach($validationRules[self::FIELD_PATTERN_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ADDRESS])) { + $errs[self::FIELD_PATTERN_ADDRESS] = []; + } + $errs[self::FIELD_PATTERN_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ANNOTATION])) { + $v = $this->getPatternAnnotation(); + foreach($validationRules[self::FIELD_PATTERN_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ANNOTATION])) { + $errs[self::FIELD_PATTERN_ANNOTATION] = []; + } + $errs[self::FIELD_PATTERN_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ATTACHMENT])) { + $v = $this->getPatternAttachment(); + foreach($validationRules[self::FIELD_PATTERN_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ATTACHMENT])) { + $errs[self::FIELD_PATTERN_ATTACHMENT] = []; + } + $errs[self::FIELD_PATTERN_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_BASE_64BINARY])) { + $v = $this->getPatternBase64Binary(); + foreach($validationRules[self::FIELD_PATTERN_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_BASE_64BINARY])) { + $errs[self::FIELD_PATTERN_BASE_64BINARY] = []; + } + $errs[self::FIELD_PATTERN_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_BOOLEAN])) { + $v = $this->getPatternBoolean(); + foreach($validationRules[self::FIELD_PATTERN_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_BOOLEAN])) { + $errs[self::FIELD_PATTERN_BOOLEAN] = []; + } + $errs[self::FIELD_PATTERN_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CODE])) { + $v = $this->getPatternCode(); + foreach($validationRules[self::FIELD_PATTERN_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CODE])) { + $errs[self::FIELD_PATTERN_CODE] = []; + } + $errs[self::FIELD_PATTERN_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CODEABLE_CONCEPT])) { + $v = $this->getPatternCodeableConcept(); + foreach($validationRules[self::FIELD_PATTERN_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PATTERN_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PATTERN_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CODING])) { + $v = $this->getPatternCoding(); + foreach($validationRules[self::FIELD_PATTERN_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CODING])) { + $errs[self::FIELD_PATTERN_CODING] = []; + } + $errs[self::FIELD_PATTERN_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CONTACT_POINT])) { + $v = $this->getPatternContactPoint(); + foreach($validationRules[self::FIELD_PATTERN_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CONTACT_POINT])) { + $errs[self::FIELD_PATTERN_CONTACT_POINT] = []; + } + $errs[self::FIELD_PATTERN_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DATE])) { + $v = $this->getPatternDate(); + foreach($validationRules[self::FIELD_PATTERN_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DATE])) { + $errs[self::FIELD_PATTERN_DATE] = []; + } + $errs[self::FIELD_PATTERN_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DATE_TIME])) { + $v = $this->getPatternDateTime(); + foreach($validationRules[self::FIELD_PATTERN_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DATE_TIME])) { + $errs[self::FIELD_PATTERN_DATE_TIME] = []; + } + $errs[self::FIELD_PATTERN_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DECIMAL])) { + $v = $this->getPatternDecimal(); + foreach($validationRules[self::FIELD_PATTERN_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DECIMAL])) { + $errs[self::FIELD_PATTERN_DECIMAL] = []; + } + $errs[self::FIELD_PATTERN_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_HUMAN_NAME])) { + $v = $this->getPatternHumanName(); + foreach($validationRules[self::FIELD_PATTERN_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_HUMAN_NAME])) { + $errs[self::FIELD_PATTERN_HUMAN_NAME] = []; + } + $errs[self::FIELD_PATTERN_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ID])) { + $v = $this->getPatternId(); + foreach($validationRules[self::FIELD_PATTERN_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ID])) { + $errs[self::FIELD_PATTERN_ID] = []; + } + $errs[self::FIELD_PATTERN_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_IDENTIFIER])) { + $v = $this->getPatternIdentifier(); + foreach($validationRules[self::FIELD_PATTERN_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_IDENTIFIER])) { + $errs[self::FIELD_PATTERN_IDENTIFIER] = []; + } + $errs[self::FIELD_PATTERN_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_INSTANT])) { + $v = $this->getPatternInstant(); + foreach($validationRules[self::FIELD_PATTERN_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_INSTANT])) { + $errs[self::FIELD_PATTERN_INSTANT] = []; + } + $errs[self::FIELD_PATTERN_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_INTEGER])) { + $v = $this->getPatternInteger(); + foreach($validationRules[self::FIELD_PATTERN_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_INTEGER])) { + $errs[self::FIELD_PATTERN_INTEGER] = []; + } + $errs[self::FIELD_PATTERN_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_MARKDOWN])) { + $v = $this->getPatternMarkdown(); + foreach($validationRules[self::FIELD_PATTERN_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_MARKDOWN])) { + $errs[self::FIELD_PATTERN_MARKDOWN] = []; + } + $errs[self::FIELD_PATTERN_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_META])) { + $v = $this->getPatternMeta(); + foreach($validationRules[self::FIELD_PATTERN_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_META])) { + $errs[self::FIELD_PATTERN_META] = []; + } + $errs[self::FIELD_PATTERN_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_OID])) { + $v = $this->getPatternOid(); + foreach($validationRules[self::FIELD_PATTERN_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_OID])) { + $errs[self::FIELD_PATTERN_OID] = []; + } + $errs[self::FIELD_PATTERN_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_PERIOD])) { + $v = $this->getPatternPeriod(); + foreach($validationRules[self::FIELD_PATTERN_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_PERIOD])) { + $errs[self::FIELD_PATTERN_PERIOD] = []; + } + $errs[self::FIELD_PATTERN_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_POSITIVE_INT])) { + $v = $this->getPatternPositiveInt(); + foreach($validationRules[self::FIELD_PATTERN_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_POSITIVE_INT])) { + $errs[self::FIELD_PATTERN_POSITIVE_INT] = []; + } + $errs[self::FIELD_PATTERN_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_QUANTITY])) { + $v = $this->getPatternQuantity(); + foreach($validationRules[self::FIELD_PATTERN_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_QUANTITY])) { + $errs[self::FIELD_PATTERN_QUANTITY] = []; + } + $errs[self::FIELD_PATTERN_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_RANGE])) { + $v = $this->getPatternRange(); + foreach($validationRules[self::FIELD_PATTERN_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_RANGE])) { + $errs[self::FIELD_PATTERN_RANGE] = []; + } + $errs[self::FIELD_PATTERN_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_RATIO])) { + $v = $this->getPatternRatio(); + foreach($validationRules[self::FIELD_PATTERN_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_RATIO])) { + $errs[self::FIELD_PATTERN_RATIO] = []; + } + $errs[self::FIELD_PATTERN_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_REFERENCE])) { + $v = $this->getPatternReference(); + foreach($validationRules[self::FIELD_PATTERN_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_REFERENCE])) { + $errs[self::FIELD_PATTERN_REFERENCE] = []; + } + $errs[self::FIELD_PATTERN_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_SAMPLED_DATA])) { + $v = $this->getPatternSampledData(); + foreach($validationRules[self::FIELD_PATTERN_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_SAMPLED_DATA])) { + $errs[self::FIELD_PATTERN_SAMPLED_DATA] = []; + } + $errs[self::FIELD_PATTERN_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_SIGNATURE])) { + $v = $this->getPatternSignature(); + foreach($validationRules[self::FIELD_PATTERN_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_SIGNATURE])) { + $errs[self::FIELD_PATTERN_SIGNATURE] = []; + } + $errs[self::FIELD_PATTERN_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_STRING])) { + $v = $this->getPatternString(); + foreach($validationRules[self::FIELD_PATTERN_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_STRING])) { + $errs[self::FIELD_PATTERN_STRING] = []; + } + $errs[self::FIELD_PATTERN_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_TIME])) { + $v = $this->getPatternTime(); + foreach($validationRules[self::FIELD_PATTERN_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_TIME])) { + $errs[self::FIELD_PATTERN_TIME] = []; + } + $errs[self::FIELD_PATTERN_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_TIMING])) { + $v = $this->getPatternTiming(); + foreach($validationRules[self::FIELD_PATTERN_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_TIMING])) { + $errs[self::FIELD_PATTERN_TIMING] = []; + } + $errs[self::FIELD_PATTERN_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_UNSIGNED_INT])) { + $v = $this->getPatternUnsignedInt(); + foreach($validationRules[self::FIELD_PATTERN_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_UNSIGNED_INT])) { + $errs[self::FIELD_PATTERN_UNSIGNED_INT] = []; + } + $errs[self::FIELD_PATTERN_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_URI])) { + $v = $this->getPatternUri(); + foreach($validationRules[self::FIELD_PATTERN_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_URI])) { + $errs[self::FIELD_PATTERN_URI] = []; + } + $errs[self::FIELD_PATTERN_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_UUID])) { + $v = $this->getPatternUuid(); + foreach($validationRules[self::FIELD_PATTERN_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_UUID])) { + $errs[self::FIELD_PATTERN_UUID] = []; + } + $errs[self::FIELD_PATTERN_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPRESENTATION])) { + $v = $this->getRepresentation(); + foreach($validationRules[self::FIELD_REPRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_REPRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPRESENTATION])) { + $errs[self::FIELD_REPRESENTATION] = []; + } + $errs[self::FIELD_REPRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHORT])) { + $v = $this->getShort(); + foreach($validationRules[self::FIELD_SHORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_SHORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHORT])) { + $errs[self::FIELD_SHORT] = []; + } + $errs[self::FIELD_SHORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLICING])) { + $v = $this->getSlicing(); + foreach($validationRules[self::FIELD_SLICING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_SLICING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLICING])) { + $errs[self::FIELD_SLICING] = []; + } + $errs[self::FIELD_SLICING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php index 6c442fe969..f9b2476cba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRElementDefinitionBase extends FHIRElement * Validation map for fields in type ElementDefinition.Base * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionBase Constructor @@ -360,11 +360,101 @@ public function setPath($path = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BASE, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BASE, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BASE, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php index e1904d804f..20d2c43317 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRElementDefinitionBinding extends FHIRElement * Validation map for fields in type ElementDefinition.Binding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionBinding Constructor @@ -403,11 +403,118 @@ public function setValueSetUri($valueSetUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStrength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSetReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSetUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET_REFERENCE])) { + $v = $this->getValueSetReference(); + foreach($validationRules[self::FIELD_VALUE_SET_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_VALUE_SET_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET_REFERENCE])) { + $errs[self::FIELD_VALUE_SET_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_SET_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET_URI])) { + $v = $this->getValueSetUri(); + foreach($validationRules[self::FIELD_VALUE_SET_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_VALUE_SET_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET_URI])) { + $errs[self::FIELD_VALUE_SET_URI] = []; + } + $errs[self::FIELD_VALUE_SET_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php index 577e2f6dbb..fb1827a681 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -161,7 +161,7 @@ class FHIRElementDefinitionConstraint extends FHIRElement * Validation map for fields in type ElementDefinition.Constraint * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionConstraint Constructor @@ -513,11 +513,135 @@ public function setXpath($xpath = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHuman())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HUMAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getKey())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HUMAN])) { + $v = $this->getHuman(); + foreach($validationRules[self::FIELD_HUMAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_HUMAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HUMAN])) { + $errs[self::FIELD_HUMAN] = []; + } + $errs[self::FIELD_HUMAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KEY])) { + $v = $this->getKey(); + foreach($validationRules[self::FIELD_KEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_KEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KEY])) { + $errs[self::FIELD_KEY] = []; + } + $errs[self::FIELD_KEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH])) { + $v = $this->getXpath(); + foreach($validationRules[self::FIELD_XPATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_XPATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH])) { + $errs[self::FIELD_XPATH] = []; + } + $errs[self::FIELD_XPATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php index 715a725730..2c7c57c8e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRElementDefinitionMapping extends FHIRElement * Validation map for fields in type ElementDefinition.Mapping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionMapping Constructor @@ -364,11 +364,101 @@ public function setMap($map = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTITY])) { + $v = $this->getIdentity(); + foreach($validationRules[self::FIELD_IDENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_IDENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY])) { + $errs[self::FIELD_IDENTITY] = []; + } + $errs[self::FIELD_IDENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAP])) { + $v = $this->getMap(); + foreach($validationRules[self::FIELD_MAP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_MAP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAP])) { + $errs[self::FIELD_MAP] = []; + } + $errs[self::FIELD_MAP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php index 5f8b7f4b24..72a35dc6ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRElementDefinitionSlicing extends FHIRElement * Validation map for fields in type ElementDefinition.Slicing * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionSlicing Constructor @@ -481,11 +481,120 @@ public function setRules(FHIRSlicingRules $rules = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDiscriminator())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DISCRIMINATOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrdered())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED] = $fieldErrs; + } + } + if (null !== ($v = $this->getRules())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCRIMINATOR])) { + $v = $this->getDiscriminator(); + foreach($validationRules[self::FIELD_DISCRIMINATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_DISCRIMINATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCRIMINATOR])) { + $errs[self::FIELD_DISCRIMINATOR] = []; + } + $errs[self::FIELD_DISCRIMINATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED])) { + $v = $this->getOrdered(); + foreach($validationRules[self::FIELD_ORDERED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_ORDERED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED])) { + $errs[self::FIELD_ORDERED] = []; + } + $errs[self::FIELD_ORDERED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULES])) { + $v = $this->getRules(); + foreach($validationRules[self::FIELD_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULES])) { + $errs[self::FIELD_RULES] = []; + } + $errs[self::FIELD_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php index fe07ae3703..1fbd2d2672 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRElementDefinitionType extends FHIRElement * Validation map for fields in type ElementDefinition.Type * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionType Constructor @@ -453,11 +453,105 @@ public function setProfile(array $profile = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAggregation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGGREGATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AGGREGATION])) { + $v = $this->getAggregation(); + foreach($validationRules[self::FIELD_AGGREGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_AGGREGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGGREGATION])) { + $errs[self::FIELD_AGGREGATION] = []; + } + $errs[self::FIELD_AGGREGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterClass.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterClass.php index 0e439ac62d..34a4375548 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterClass.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterClass.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREncounterClass extends FHIRElement * Validation map for fields in type EncounterClass * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterClass Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_CLASS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterLocationStatus.php index 90bb9623de..c68dad2bf8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREncounterLocationStatus extends FHIRElement * Validation map for fields in type EncounterLocationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterLocationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_LOCATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterState.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterState.php index c1901ce2ef..ff2fb65f0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterState.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREncounterState extends FHIRElement * Validation map for fields in type EncounterState * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterState Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREpisodeOfCareStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREpisodeOfCareStatus.php index f51f4171a2..0ba05b75dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREpisodeOfCareStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREpisodeOfCareStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREpisodeOfCareStatus extends FHIRElement * Validation map for fields in type EpisodeOfCareStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCareStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREventTiming.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREventTiming.php index 20767ca0d5..4639ee9944 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREventTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREventTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREventTiming extends FHIRElement * Validation map for fields in type EventTiming * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREventTiming Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_TIMING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtension.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtension.php index 4aa03930c3..c975b8ac82 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtension.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtension.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -585,7 +585,7 @@ class FHIRExtension extends FHIRElement * Validation map for fields in type Extension * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExtension Constructor @@ -2455,11 +2455,645 @@ public function setValueUuid($valueUuid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UUID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UUID])) { + $v = $this->getValueUuid(); + foreach($validationRules[self::FIELD_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UUID])) { + $errs[self::FIELD_VALUE_UUID] = []; + } + $errs[self::FIELD_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtensionContext.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtensionContext.php index ce51041de5..b317888653 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtensionContext.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtensionContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRExtensionContext extends FHIRElement * Validation map for fields in type ExtensionContext * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExtensionContext Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFamilyHistoryStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFamilyHistoryStatus.php index 646a3c7b83..bde1520b8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFamilyHistoryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFamilyHistoryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFamilyHistoryStatus extends FHIRElement * Validation map for fields in type FamilyHistoryStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyHistoryStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFilterOperator.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFilterOperator.php index 2a3bea1fc8..0e5571c351 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFilterOperator.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFilterOperator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFilterOperator extends FHIRElement * Validation map for fields in type FilterOperator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFilterOperator Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFlagStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFlagStatus.php index d6033bbff2..c3fc03067b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFlagStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFlagStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRFlagStatus extends FHIRElement * Validation map for fields in type FlagStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFlagStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGoalStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGoalStatus.php index 07c549e648..bc0e913011 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGoalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGoalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGoalStatus extends FHIRElement * Validation map for fields in type GoalStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGoalStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGroupType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGroupType.php index bc002b19f1..5c1075d805 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGroupType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGroupType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGroupType extends FHIRElement * Validation map for fields in type GroupType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideDependencyType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideDependencyType.php index 2e881ff541..4950e6aeaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideDependencyType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideDependencyType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGuideDependencyType extends FHIRElement * Validation map for fields in type GuideDependencyType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuideDependencyType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDE_DEPENDENCY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuidePageKind.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuidePageKind.php index 95eda1acee..8966d01220 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuidePageKind.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuidePageKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGuidePageKind extends FHIRElement * Validation map for fields in type GuidePageKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuidePageKind Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDE_PAGE_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideResourcePurpose.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideResourcePurpose.php index 1927525e19..3c8598e1c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideResourcePurpose.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideResourcePurpose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGuideResourcePurpose extends FHIRElement * Validation map for fields in type GuideResourcePurpose * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuideResourcePurpose Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDE_RESOURCE_PURPOSE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHTTPVerb.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHTTPVerb.php index b47d39e0bc..9bb1cf4646 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHTTPVerb.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHTTPVerb.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRHTTPVerb extends FHIRElement * Validation map for fields in type HTTPVerb * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHTTPVerb Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HTTPVERB, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHumanName.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHumanName.php index 72ad7d7238..ca080ba367 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHumanName.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHumanName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -178,7 +178,7 @@ class FHIRHumanName extends FHIRElement * Validation map for fields in type HumanName * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHumanName Constructor @@ -785,11 +785,177 @@ public function setUse(FHIRNameUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getFamily())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FAMILY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GIVEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrefix())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PREFIX, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSuffix())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUFFIX, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FAMILY])) { + $v = $this->getFamily(); + foreach($validationRules[self::FIELD_FAMILY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_FAMILY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FAMILY])) { + $errs[self::FIELD_FAMILY] = []; + } + $errs[self::FIELD_FAMILY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GIVEN])) { + $v = $this->getGiven(); + foreach($validationRules[self::FIELD_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GIVEN])) { + $errs[self::FIELD_GIVEN] = []; + } + $errs[self::FIELD_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFIX])) { + $v = $this->getPrefix(); + foreach($validationRules[self::FIELD_PREFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_PREFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFIX])) { + $errs[self::FIELD_PREFIX] = []; + } + $errs[self::FIELD_PREFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUFFIX])) { + $v = $this->getSuffix(); + foreach($validationRules[self::FIELD_SUFFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_SUFFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUFFIX])) { + $errs[self::FIELD_SUFFIX] = []; + } + $errs[self::FIELD_SUFFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRId.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRId.php index b28ce0d108..11ece22f44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRId.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRId extends FHIRElement * Validation map for fields in type id * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRId Constructor @@ -174,11 +174,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifier.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifier.php index 29e8f5c4fd..b7982a2ce4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -163,7 +163,7 @@ class FHIRIdentifier extends FHIRElement * Validation map for fields in type Identifier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentifier Constructor @@ -494,11 +494,152 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssigner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSIGNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSIGNER])) { + $v = $this->getAssigner(); + foreach($validationRules[self::FIELD_ASSIGNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_ASSIGNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSIGNER])) { + $errs[self::FIELD_ASSIGNER] = []; + } + $errs[self::FIELD_ASSIGNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifierUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifierUse.php index f1fd1da676..d49a302844 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifierUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifierUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRIdentifierUse extends FHIRElement * Validation map for fields in type IdentifierUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentifierUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentityAssuranceLevel.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentityAssuranceLevel.php index 234cf624c2..9fbe2374a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentityAssuranceLevel.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentityAssuranceLevel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRIdentityAssuranceLevel extends FHIRElement * Validation map for fields in type IdentityAssuranceLevel * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentityAssuranceLevel Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTITY_ASSURANCE_LEVEL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstanceAvailability.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstanceAvailability.php index 6027ccf2a4..9eb8ca10a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstanceAvailability.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstanceAvailability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRInstanceAvailability extends FHIRElement * Validation map for fields in type InstanceAvailability * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInstanceAvailability Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANCE_AVAILABILITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstant.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstant.php index ffbaf9c226..8d97275833 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRInstant extends FHIRElement * Validation map for fields in type instant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInstant Constructor @@ -173,11 +173,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInteger.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInteger.php index 3574855095..44e29fe057 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInteger.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInteger.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRInteger extends FHIRElement * Validation map for fields in type integer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInteger Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INTEGER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueSeverity.php index a66cc1f2df..41f0d4c34e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRIssueSeverity extends FHIRElement * Validation map for fields in type IssueSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIssueSeverity Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueType.php index 11255d55a9..fe64e0bfe3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRIssueType extends FHIRElement * Validation map for fields in type IssueType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIssueType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ISSUE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLinkType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLinkType.php index d63765f8ad..069e1c130a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLinkType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLinkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRLinkType extends FHIRElement * Validation map for fields in type LinkType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLinkType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINK_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListMode.php index 7f8cfb9be9..b24b93c59b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRListMode extends FHIRElement * Validation map for fields in type ListMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListStatus.php index 4e450088ae..aa0c9f7c7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRListStatus extends FHIRElement * Validation map for fields in type ListStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationMode.php index 6566a57f38..b62d970412 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRLocationMode extends FHIRElement * Validation map for fields in type LocationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationMode Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationStatus.php index e4b4d5d73d..9b80ba0457 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRLocationStatus extends FHIRElement * Validation map for fields in type LocationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMarkdown.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMarkdown.php index 0c9060c7b4..db74d4072f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMarkdown.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMarkdown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRMarkdown extends FHIRElement * Validation map for fields in type markdown * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMarkdown Constructor @@ -177,11 +177,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKDOWN, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeasmnt_Principle.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeasmnt_Principle.php index d04ea62591..85707d7e2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeasmnt_Principle.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeasmnt_Principle.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMeasmnt_Principle extends FHIRElement * Validation map for fields in type Measmnt-Principle * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasmnt_Principle Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASMNT_HYPHEN_PRINCIPLE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationAdministrationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationAdministrationStatus.php index 833d697c5c..91b257ec18 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationAdministrationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationAdministrationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationAdministrationStatus extends FHIRElement * Validation map for fields in type MedicationAdministrationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministrationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationDispenseStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationDispenseStatus.php index a286e33643..8e1a052bdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationDispenseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationDispenseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationDispenseStatus extends FHIRElement * Validation map for fields in type MedicationDispenseStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispenseStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationOrderStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationOrderStatus.php index 4b43ba469c..67979107aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationOrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationOrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMedicationOrderStatus extends FHIRElement * Validation map for fields in type MedicationOrderStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationOrderStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationStatementStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationStatementStatus.php index 08bf9174c5..c8a70915af 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationStatementStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationStatementStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationStatementStatus extends FHIRElement * Validation map for fields in type MedicationStatementStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatementStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMessageSignificanceCategory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMessageSignificanceCategory.php index 7e6f644e3a..ca0d86032d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMessageSignificanceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMessageSignificanceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMessageSignificanceCategory extends FHIRElement * Validation map for fields in type MessageSignificanceCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageSignificanceCategory Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeta.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeta.php index 7342831dbd..c7df5b3b8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeta.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeta.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -161,7 +161,7 @@ class FHIRMeta extends FHIRElement * Validation map for fields in type Meta * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeta Constructor @@ -598,11 +598,141 @@ public function setVersionId($versionId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLastUpdated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_UPDATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTag())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TAG, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersionId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LAST_UPDATED])) { + $v = $this->getLastUpdated(); + foreach($validationRules[self::FIELD_LAST_UPDATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_LAST_UPDATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_UPDATED])) { + $errs[self::FIELD_LAST_UPDATED] = []; + } + $errs[self::FIELD_LAST_UPDATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY])) { + $v = $this->getSecurity(); + foreach($validationRules[self::FIELD_SECURITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_SECURITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY])) { + $errs[self::FIELD_SECURITY] = []; + } + $errs[self::FIELD_SECURITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TAG])) { + $v = $this->getTag(); + foreach($validationRules[self::FIELD_TAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_TAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TAG])) { + $errs[self::FIELD_TAG] = []; + } + $errs[self::FIELD_TAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION_ID])) { + $v = $this->getVersionId(); + foreach($validationRules[self::FIELD_VERSION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_VERSION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION_ID])) { + $errs[self::FIELD_VERSION_ID] = []; + } + $errs[self::FIELD_VERSION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNameUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNameUse.php index 82a75e4e61..55483e17fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNameUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNameUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNameUse extends FHIRElement * Validation map for fields in type NameUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNameUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAME_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemIdentifierType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemIdentifierType.php index 4a186d3c1b..7297df0107 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemIdentifierType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemIdentifierType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNamingSystemIdentifierType extends FHIRElement * Validation map for fields in type NamingSystemIdentifierType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNamingSystemIdentifierType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_IDENTIFIER_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemType.php index cc2f54329b..64f2c1edce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNamingSystemType extends FHIRElement * Validation map for fields in type NamingSystemType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNamingSystemType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrative.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrative.php index 40237e7bd7..0b3e2c8186 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrative.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrative.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRNarrative extends FHIRElement * Validation map for fields in type Narrative * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNarrative Constructor @@ -238,11 +238,84 @@ public function setStatus(FHIRNarrativeStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiv())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIV] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DIV])) { + $v = $this->getDiv(); + foreach($validationRules[self::FIELD_DIV] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE, self::FIELD_DIV, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIV])) { + $errs[self::FIELD_DIV] = []; + } + $errs[self::FIELD_DIV][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrativeStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrativeStatus.php index 8e4b08ebab..9037801647 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrativeStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrativeStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNarrativeStatus extends FHIRElement * Validation map for fields in type NarrativeStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNarrativeStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNoteType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNoteType.php index 6bf6127d6e..cd138d8c62 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNoteType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNoteType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRNoteType extends FHIRElement * Validation map for fields in type NoteType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNoteType Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NOTE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNutritionOrderStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNutritionOrderStatus.php index 397191b51f..2777a46bbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNutritionOrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNutritionOrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRNutritionOrderStatus extends FHIRElement * Validation map for fields in type NutritionOrderStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationRelationshipType.php index d61935a0ca..46c60e2408 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRObservationRelationshipType extends FHIRElement * Validation map for fields in type ObservationRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationRelationshipType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationStatus.php index cda0435a8c..7a605935f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRObservationStatus extends FHIRElement * Validation map for fields in type ObservationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROid.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROid.php index d1ac6b076c..b9ea2cfcc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROid.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIROid extends FHIRElement * Validation map for fields in type oid * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROid Constructor @@ -172,11 +172,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationKind.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationKind.php index a90d46ccd0..fe2325f341 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationKind.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIROperationKind extends FHIRElement * Validation map for fields in type OperationKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationKind Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationParameterUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationParameterUse.php index aa1950efd3..a56a80dddc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationParameterUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationParameterUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIROperationParameterUse extends FHIRElement * Validation map for fields in type OperationParameterUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationParameterUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_PARAMETER_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROrderStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROrderStatus.php index 85d0ff9aa6..cebffd705a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIROrderStatus extends FHIRElement * Validation map for fields in type OrderStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrderStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantRequired.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantRequired.php index a374f1eb01..fe7888c073 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantRequired.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantRequired.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRParticipantRequired extends FHIRElement * Validation map for fields in type ParticipantRequired * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParticipantRequired Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARTICIPANT_REQUIRED, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantStatus.php index 6052f521cc..e8c623cc0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRParticipantStatus extends FHIRElement * Validation map for fields in type ParticipantStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParticipantStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARTICIPANT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipationStatus.php index 84e25884f0..4c01f7c9ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRParticipationStatus extends FHIRElement * Validation map for fields in type ParticipationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParticipationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARTICIPATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPeriod.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPeriod.php index 98297e320e..156a802b75 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPeriod.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPeriod.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRPeriod extends FHIRElement * Validation map for fields in type Period * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPeriod Constructor @@ -299,11 +299,84 @@ public function setStart($start = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERIOD, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERIOD, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPositiveInt.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPositiveInt.php index fa16912169..c0e7e74df4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPositiveInt.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPositiveInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRPositiveInt extends FHIRElement * Validation map for fields in type positiveInt * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPositiveInt Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POSITIVE_INT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestPriority.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestPriority.php index b00c419c39..4daa27f19a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRProcedureRequestPriority extends FHIRElement * Validation map for fields in type ProcedureRequestPriority * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureRequestPriority Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST_PRIORITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestStatus.php index 979d2e880f..d112b5a024 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRProcedureRequestStatus extends FHIRElement * Validation map for fields in type ProcedureRequestStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureRequestStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureStatus.php index 7d7ac02dd1..a6a498d079 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRProcedureStatus extends FHIRElement * Validation map for fields in type ProcedureStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPropertyRepresentation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPropertyRepresentation.php index 62ad226148..de24c44235 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPropertyRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPropertyRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRPropertyRepresentation extends FHIRElement * Validation map for fields in type PropertyRepresentation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPropertyRepresentation Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProvenanceEntityRole.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProvenanceEntityRole.php index 792fabe613..3cac49fdb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProvenanceEntityRole.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProvenanceEntityRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRProvenanceEntityRole extends FHIRElement * Validation map for fields in type ProvenanceEntityRole * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceEntityRole Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity.php index 626baddf86..6bc2fae3a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRQuantity extends FHIRElement * Validation map for fields in type Quantity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuantity Constructor @@ -503,11 +503,135 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComparator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRAge.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRAge.php index f31d5b138d..3a460a78e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRAge.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRAge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAge extends FHIRQuantity * Validation map for fields in type Age * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAge Constructor @@ -123,11 +123,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRCount.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRCount.php index 4c2bd5f284..131ad78b78 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRCount.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRCount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCount extends FHIRQuantity * Validation map for fields in type Count * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCount Constructor @@ -123,11 +123,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDistance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDistance.php index b8ff70f49f..8819d93d07 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDistance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDistance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDistance extends FHIRQuantity * Validation map for fields in type Distance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDistance Constructor @@ -123,11 +123,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDuration.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDuration.php index d9a9db0d10..7ef9d95a6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDuration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDuration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDuration extends FHIRQuantity * Validation map for fields in type Duration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDuration Constructor @@ -123,11 +123,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRMoney.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRMoney.php index 7fc51cb2f1..1a0b00b7aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRMoney.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRMoney.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMoney extends FHIRQuantity * Validation map for fields in type Money * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMoney Constructor @@ -123,11 +123,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRSimpleQuantity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRSimpleQuantity.php index b9073746a4..06c85664cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRSimpleQuantity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRSimpleQuantity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSimpleQuantity extends FHIRQuantity * Validation map for fields in type SimpleQuantity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSimpleQuantity Constructor @@ -123,11 +123,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantityComparator.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantityComparator.php index 84556d78ea..e50ab5a297 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantityComparator.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantityComparator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuantityComparator extends FHIRElement * Validation map for fields in type QuantityComparator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuantityComparator Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireResponseStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireResponseStatus.php index 0a211a8be2..cedfeae8c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireResponseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireResponseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuestionnaireResponseStatus extends FHIRElement * Validation map for fields in type QuestionnaireResponseStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponseStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireStatus.php index 8df5ccb1a8..bf39fa2d20 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuestionnaireStatus extends FHIRElement * Validation map for fields in type QuestionnaireStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRange.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRange.php index b5b80d1b41..0c8613e4b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRange.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRRange extends FHIRElement * Validation map for fields in type Range * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRange Constructor @@ -202,11 +202,84 @@ public function setLow(FHIRSimpleQuantity $low = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHigh())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIGH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLow())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOW] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HIGH])) { + $v = $this->getHigh(); + foreach($validationRules[self::FIELD_HIGH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RANGE, self::FIELD_HIGH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIGH])) { + $errs[self::FIELD_HIGH] = []; + } + $errs[self::FIELD_HIGH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOW])) { + $v = $this->getLow(); + foreach($validationRules[self::FIELD_LOW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RANGE, self::FIELD_LOW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOW])) { + $errs[self::FIELD_LOW] = []; + } + $errs[self::FIELD_LOW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRatio.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRatio.php index 641ebcabbe..b37f7e1ce4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRatio.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRatio.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRRatio extends FHIRElement * Validation map for fields in type Ratio * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRatio Constructor @@ -238,11 +238,84 @@ public function setNumerator(FHIRQuantity $numerator = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDenominator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DENOMINATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumerator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMERATOR] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DENOMINATOR])) { + $v = $this->getDenominator(); + foreach($validationRules[self::FIELD_DENOMINATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RATIO, self::FIELD_DENOMINATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DENOMINATOR])) { + $errs[self::FIELD_DENOMINATOR] = []; + } + $errs[self::FIELD_DENOMINATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMERATOR])) { + $v = $this->getNumerator(); + foreach($validationRules[self::FIELD_NUMERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RATIO, self::FIELD_NUMERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMERATOR])) { + $errs[self::FIELD_NUMERATOR] = []; + } + $errs[self::FIELD_NUMERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReference.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReference.php index 667df765e2..fda685db3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReference.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRReference extends FHIRElement * Validation map for fields in type Reference * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReference Constructor @@ -293,11 +293,84 @@ public function setReference($reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReferralStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReferralStatus.php index 6c8cc12b6a..19065f3616 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReferralStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReferralStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRReferralStatus extends FHIRElement * Validation map for fields in type ReferralStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReferralStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRemittanceOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRemittanceOutcome.php index e484427eee..0c4830d657 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRemittanceOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRemittanceOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRRemittanceOutcome extends FHIRElement * Validation map for fields in type RemittanceOutcome * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRemittanceOutcome Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REMITTANCE_OUTCOME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResourceVersionPolicy.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResourceVersionPolicy.php index 909a557e82..85b3b984ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResourceVersionPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResourceVersionPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResourceVersionPolicy extends FHIRElement * Validation map for fields in type ResourceVersionPolicy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceVersionPolicy Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE_VERSION_POLICY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResponseType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResponseType.php index 0424e18f59..6c5f48a957 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResponseType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResponseType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResponseType extends FHIRElement * Validation map for fields in type ResponseType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResponseType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRestfulConformanceMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRestfulConformanceMode.php index 818fb7c62d..8bf971a8e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRestfulConformanceMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRestfulConformanceMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRestfulConformanceMode extends FHIRElement * Validation map for fields in type RestfulConformanceMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRestfulConformanceMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESTFUL_CONFORMANCE_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledData.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledData.php index 84ca25aa6d..35bacb9f23 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledData.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -182,7 +182,7 @@ class FHIRSampledData extends FHIRElement * Validation map for fields in type SampledData * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSampledData Constructor @@ -634,11 +634,169 @@ public function setUpperLimit($upperLimit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDimensions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIMENSIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getLowerLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOWER_LIMIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getUpperLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UPPER_LIMIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIMENSIONS])) { + $v = $this->getDimensions(); + foreach($validationRules[self::FIELD_DIMENSIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_DIMENSIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIMENSIONS])) { + $errs[self::FIELD_DIMENSIONS] = []; + } + $errs[self::FIELD_DIMENSIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOWER_LIMIT])) { + $v = $this->getLowerLimit(); + foreach($validationRules[self::FIELD_LOWER_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_LOWER_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOWER_LIMIT])) { + $errs[self::FIELD_LOWER_LIMIT] = []; + } + $errs[self::FIELD_LOWER_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UPPER_LIMIT])) { + $v = $this->getUpperLimit(); + foreach($validationRules[self::FIELD_UPPER_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_UPPER_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UPPER_LIMIT])) { + $errs[self::FIELD_UPPER_LIMIT] = []; + } + $errs[self::FIELD_UPPER_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledDataDataType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledDataDataType.php index 7299fa3ef0..fce7833a0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledDataDataType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledDataDataType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRSampledDataDataType extends FHIRElement * Validation map for fields in type SampledDataDataType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSampledDataDataType Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchEntryMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchEntryMode.php index fb7aae9770..f059c854b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchEntryMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchEntryMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSearchEntryMode extends FHIRElement * Validation map for fields in type SearchEntryMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchEntryMode Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_ENTRY_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchModifierCode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchModifierCode.php index 6cc92de2cc..e2448e6253 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchModifierCode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchModifierCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSearchModifierCode extends FHIRElement * Validation map for fields in type SearchModifierCode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchModifierCode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_MODIFIER_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchParamType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchParamType.php index 50369f1dc3..95dd53d144 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchParamType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchParamType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRSearchParamType extends FHIRElement * Validation map for fields in type SearchParamType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchParamType Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSignature.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSignature.php index d8b7352ccd..3116d6aa28 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSignature.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSignature.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -174,7 +174,7 @@ class FHIRSignature extends FHIRElement * Validation map for fields in type Signature * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_TYPE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -594,11 +594,154 @@ public function setWhoUri($whoUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBlob())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BLOB] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getWhen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhoReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhoUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BLOB])) { + $v = $this->getBlob(); + foreach($validationRules[self::FIELD_BLOB] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_BLOB, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BLOB])) { + $errs[self::FIELD_BLOB] = []; + } + $errs[self::FIELD_BLOB][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN])) { + $v = $this->getWhen(); + foreach($validationRules[self::FIELD_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN])) { + $errs[self::FIELD_WHEN] = []; + } + $errs[self::FIELD_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO_REFERENCE])) { + $v = $this->getWhoReference(); + foreach($validationRules[self::FIELD_WHO_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_WHO_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO_REFERENCE])) { + $errs[self::FIELD_WHO_REFERENCE] = []; + } + $errs[self::FIELD_WHO_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO_URI])) { + $v = $this->getWhoUri(); + foreach($validationRules[self::FIELD_WHO_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_WHO_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO_URI])) { + $errs[self::FIELD_WHO_URI] = []; + } + $errs[self::FIELD_WHO_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlicingRules.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlicingRules.php index 73c8568dfd..d70ad07a15 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlicingRules.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlicingRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSlicingRules extends FHIRElement * Validation map for fields in type SlicingRules * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSlicingRules Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLICING_RULES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlotStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlotStatus.php index 626f98db5a..d64fa77c46 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlotStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlotStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSlotStatus extends FHIRElement * Validation map for fields in type SlotStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSlotStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSpecimenStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSpecimenStatus.php index 44ff5f1868..835ed70b85 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSpecimenStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSpecimenStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSpecimenStatus extends FHIRElement * Validation map for fields in type SpecimenStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRString.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRString.php index 66576a2722..5847f92333 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRString.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRString.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRString extends FHIRElement * Validation map for fields in type string * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRString Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRStructureDefinitionKind.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRStructureDefinitionKind.php index 73bd6a0635..28b197b94c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRStructureDefinitionKind.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRStructureDefinitionKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureDefinitionKind extends FHIRElement * Validation map for fields in type StructureDefinitionKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinitionKind Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionChannelType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionChannelType.php index ba7060f8cd..c0a9451dcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionChannelType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionChannelType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSubscriptionChannelType extends FHIRElement * Validation map for fields in type SubscriptionChannelType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscriptionChannelType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_CHANNEL_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionStatus.php index f8a89d7c97..89d7cd70c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSubscriptionStatus extends FHIRElement * Validation map for fields in type SubscriptionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscriptionStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyDeliveryStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyDeliveryStatus.php index 8722cecfcd..415886c871 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyDeliveryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyDeliveryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSupplyDeliveryStatus extends FHIRElement * Validation map for fields in type SupplyDeliveryStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyDeliveryStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyRequestStatus.php index c6c16abdfa..58d1a0f6d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSupplyRequestStatus extends FHIRElement * Validation map for fields in type SupplyRequestStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyRequestStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSystemRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSystemRestfulInteraction.php index bdb653df95..1c37f8af2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSystemRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSystemRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSystemRestfulInteraction extends FHIRElement * Validation map for fields in type SystemRestfulInteraction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSystemRestfulInteraction Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SYSTEM_RESTFUL_INTERACTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTime.php index 92fd978b23..0cb7fe5ffa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTime extends FHIRElement * Validation map for fields in type time * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTime Constructor @@ -170,11 +170,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming.php index a98a5b0d21..d523c50af7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRTiming extends FHIRElement * Validation map for fields in type Timing * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTiming Constructor @@ -371,11 +371,103 @@ public function setRepeat(FHIRTimingRepeat $repeat = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRepeat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPEAT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEAT])) { + $v = $this->getRepeat(); + foreach($validationRules[self::FIELD_REPEAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING, self::FIELD_REPEAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEAT])) { + $errs[self::FIELD_REPEAT] = []; + } + $errs[self::FIELD_REPEAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming/FHIRTimingRepeat.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming/FHIRTimingRepeat.php index 94bceeb065..526259ad67 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming/FHIRTimingRepeat.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming/FHIRTimingRepeat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -267,7 +267,7 @@ class FHIRTimingRepeat extends FHIRElement * Validation map for fields in type Timing.Repeat * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTimingRepeat Constructor @@ -1015,11 +1015,271 @@ public function setWhen(FHIREventTiming $when = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBoundsPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BOUNDS_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getBoundsQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BOUNDS_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getBoundsRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BOUNDS_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDurationMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getDurationUnits())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION_UNITS] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrequency())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FREQUENCY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrequencyMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FREQUENCY_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriodMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriodUnits())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD_UNITS] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BOUNDS_PERIOD])) { + $v = $this->getBoundsPeriod(); + foreach($validationRules[self::FIELD_BOUNDS_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_BOUNDS_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BOUNDS_PERIOD])) { + $errs[self::FIELD_BOUNDS_PERIOD] = []; + } + $errs[self::FIELD_BOUNDS_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BOUNDS_QUANTITY])) { + $v = $this->getBoundsQuantity(); + foreach($validationRules[self::FIELD_BOUNDS_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_BOUNDS_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BOUNDS_QUANTITY])) { + $errs[self::FIELD_BOUNDS_QUANTITY] = []; + } + $errs[self::FIELD_BOUNDS_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BOUNDS_RANGE])) { + $v = $this->getBoundsRange(); + foreach($validationRules[self::FIELD_BOUNDS_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_BOUNDS_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BOUNDS_RANGE])) { + $errs[self::FIELD_BOUNDS_RANGE] = []; + } + $errs[self::FIELD_BOUNDS_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT])) { + $v = $this->getCount(); + foreach($validationRules[self::FIELD_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT])) { + $errs[self::FIELD_COUNT] = []; + } + $errs[self::FIELD_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION_MAX])) { + $v = $this->getDurationMax(); + foreach($validationRules[self::FIELD_DURATION_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DURATION_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION_MAX])) { + $errs[self::FIELD_DURATION_MAX] = []; + } + $errs[self::FIELD_DURATION_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION_UNITS])) { + $v = $this->getDurationUnits(); + foreach($validationRules[self::FIELD_DURATION_UNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DURATION_UNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION_UNITS])) { + $errs[self::FIELD_DURATION_UNITS] = []; + } + $errs[self::FIELD_DURATION_UNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FREQUENCY])) { + $v = $this->getFrequency(); + foreach($validationRules[self::FIELD_FREQUENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_FREQUENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FREQUENCY])) { + $errs[self::FIELD_FREQUENCY] = []; + } + $errs[self::FIELD_FREQUENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FREQUENCY_MAX])) { + $v = $this->getFrequencyMax(); + foreach($validationRules[self::FIELD_FREQUENCY_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_FREQUENCY_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FREQUENCY_MAX])) { + $errs[self::FIELD_FREQUENCY_MAX] = []; + } + $errs[self::FIELD_FREQUENCY_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD_MAX])) { + $v = $this->getPeriodMax(); + foreach($validationRules[self::FIELD_PERIOD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_PERIOD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD_MAX])) { + $errs[self::FIELD_PERIOD_MAX] = []; + } + $errs[self::FIELD_PERIOD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD_UNITS])) { + $v = $this->getPeriodUnits(); + foreach($validationRules[self::FIELD_PERIOD_UNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_PERIOD_UNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD_UNITS])) { + $errs[self::FIELD_PERIOD_UNITS] = []; + } + $errs[self::FIELD_PERIOD_UNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN])) { + $v = $this->getWhen(); + foreach($validationRules[self::FIELD_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN])) { + $errs[self::FIELD_WHEN] = []; + } + $errs[self::FIELD_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTransactionMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTransactionMode.php index defb06871b..92b5de53d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTransactionMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTransactionMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTransactionMode extends FHIRElement * Validation map for fields in type TransactionMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTransactionMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRANSACTION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTypeRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTypeRestfulInteraction.php index 4f94364be1..fd9ac4a5ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTypeRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTypeRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTypeRestfulInteraction extends FHIRElement * Validation map for fields in type TypeRestfulInteraction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTypeRestfulInteraction Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TYPE_RESTFUL_INTERACTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnitsOfTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnitsOfTime.php index 88fa9d711c..d68786d363 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnitsOfTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnitsOfTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRUnitsOfTime extends FHIRElement * Validation map for fields in type UnitsOfTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUnitsOfTime Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnknownContentCode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnknownContentCode.php index 5ebacee3e6..54b2d7654e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnknownContentCode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnknownContentCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRUnknownContentCode extends FHIRElement * Validation map for fields in type UnknownContentCode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUnknownContentCode Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNKNOWN_CONTENT_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnsignedInt.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnsignedInt.php index f2a8c575eb..09f64d795a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnsignedInt.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnsignedInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRUnsignedInt extends FHIRElement * Validation map for fields in type unsignedInt * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUnsignedInt Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUri.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUri.php index 3eb7f1496e..fa0152dbdb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUri.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUri.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRUri extends FHIRElement * Validation map for fields in type uri * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUri Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_URI, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUse.php index 59e3addec2..5eeb681738 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRUse extends FHIRElement * Validation map for fields in type Use * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUuid.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUuid.php index 5410c8d501..fc22181ce0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUuid.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUuid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRUuid extends FHIRElement * Validation map for fields in type uuid * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUuid Constructor @@ -172,11 +172,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UUID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionBase.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionBase.php index af73ddcac5..7557224842 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRVisionBase extends FHIRElement * Validation map for fields in type VisionBase * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionBase Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_BASE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionEyes.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionEyes.php index 7d4169500f..ce317ba872 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionEyes.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionEyes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRVisionEyes extends FHIRElement * Validation map for fields in type VisionEyes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionEyes Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_EYES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRXPathUsageType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRXPathUsageType.php index ef71dca0d9..1a2aae8768 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRXPathUsageType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRXPathUsageType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRXPathUsageType extends FHIRElement * Validation map for fields in type XPathUsageType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRXPathUsageType Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_XPATH_USAGE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIdPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIdPrimitive.php index aa21e619b5..c84da3eaf8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIdPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIdPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRIdPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRIdPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type id-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[A-Za-z0-9\\-\\.]{1,64}$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,11 +171,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRInstantPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRInstantPrimitive.php index afa11d9ce8..4429078938 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRInstantPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRInstantPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRInstantPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANT_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRInstantPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type instant-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInstantPrimitive Constructor @@ -173,7 +175,7 @@ public function _getDateTime() if (null === $v) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -184,11 +186,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANT_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIntegerPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIntegerPrimitive.php index 07272a1b62..995b0a1a44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIntegerPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIntegerPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INTEGER_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type integer-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^-?([0]|([1-9][0-9]*))$/', ], @@ -181,11 +183,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INTEGER_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRMarkdownPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRMarkdownPrimitive.php index fcaf82147d..d32f2ab897 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRMarkdownPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRMarkdownPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRMarkdownPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MARKDOWN_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRMarkdownPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type markdown-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, ], @@ -168,11 +170,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKDOWN_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIROidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIROidPrimitive.php index f8b9dc53d0..69952e18af 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIROidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIROidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIROidPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIROidPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type oid-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^urn:oid:(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))*$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,11 +171,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRPositiveIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRPositiveIntPrimitive.php index a9a3ad5ae1..923fdc3415 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRPositiveIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRPositiveIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRPositiveIntPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_POSITIVE_INT_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRPositiveIntPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type positiveInt-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[1-9][0-9]*$/', ], @@ -181,11 +183,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POSITIVE_INT_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource.php index d2959b7736..4f03636589 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -76,6 +76,7 @@ class FHIRResource implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE; @@ -149,7 +150,7 @@ class FHIRResource implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInter * Validation map for fields in type Resource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResource Constructor @@ -460,11 +461,46 @@ public function setMeta(FHIRMeta $meta = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getImplicitRules())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLICIT_RULES] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_META] = $fieldErrs; + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBinary.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBinary.php index bfbe060e8d..baba9c1c9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBinary.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBinary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRBinary extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Binary * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBinary Constructor @@ -289,11 +289,108 @@ public function setContentType($contentType = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINARY, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINARY, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBundle.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBundle.php index fdf248ecb7..0f82e30da4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBundle.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBundle.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -153,7 +153,7 @@ class FHIRBundle extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Bundle * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundle Constructor @@ -498,11 +498,163 @@ public function setType(FHIRBundleType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTRY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENTRY])) { + $v = $this->getEntry(); + foreach($validationRules[self::FIELD_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY])) { + $errs[self::FIELD_ENTRY] = []; + } + $errs[self::FIELD_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNATURE])) { + $v = $this->getSignature(); + foreach($validationRules[self::FIELD_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNATURE])) { + $errs[self::FIELD_SIGNATURE] = []; + } + $errs[self::FIELD_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource.php index 0a200e19d8..ea3732b332 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -151,7 +151,7 @@ class FHIRDomainResource extends FHIRResource * Validation map for fields in type DomainResource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDomainResource Constructor @@ -513,11 +513,148 @@ public function setText(FHIRNarrative $text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContained())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINED, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXTENSION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getModifierExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAccount.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAccount.php index 877bfe5a0b..06f8f96f43 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAccount.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAccount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -233,7 +233,7 @@ class FHIRAccount extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Account * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAccount Constructor @@ -797,11 +797,311 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getBalance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BALANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoveragePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getCurrency())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CURRENCY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOwner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVE_PERIOD])) { + $v = $this->getActivePeriod(); + foreach($validationRules[self::FIELD_ACTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_ACTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE_PERIOD])) { + $errs[self::FIELD_ACTIVE_PERIOD] = []; + } + $errs[self::FIELD_ACTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BALANCE])) { + $v = $this->getBalance(); + foreach($validationRules[self::FIELD_BALANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_BALANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BALANCE])) { + $errs[self::FIELD_BALANCE] = []; + } + $errs[self::FIELD_BALANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE_PERIOD])) { + $v = $this->getCoveragePeriod(); + foreach($validationRules[self::FIELD_COVERAGE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_COVERAGE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE_PERIOD])) { + $errs[self::FIELD_COVERAGE_PERIOD] = []; + } + $errs[self::FIELD_COVERAGE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CURRENCY])) { + $v = $this->getCurrency(); + foreach($validationRules[self::FIELD_CURRENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_CURRENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CURRENCY])) { + $errs[self::FIELD_CURRENCY] = []; + } + $errs[self::FIELD_CURRENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNER])) { + $v = $this->getOwner(); + foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_OWNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNER])) { + $errs[self::FIELD_OWNER] = []; + } + $errs[self::FIELD_OWNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php index b5d2d37912..32c3520f60 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -289,7 +289,7 @@ class FHIRAllergyIntolerance extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type AllergyIntolerance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntolerance Constructor @@ -1103,11 +1103,364 @@ public function setType(FHIRAllergyIntoleranceType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCriticality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITICALITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastOccurence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_OCCURENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReaction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecordedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReporter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITICALITY])) { + $v = $this->getCriticality(); + foreach($validationRules[self::FIELD_CRITICALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CRITICALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITICALITY])) { + $errs[self::FIELD_CRITICALITY] = []; + } + $errs[self::FIELD_CRITICALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_OCCURENCE])) { + $v = $this->getLastOccurence(); + foreach($validationRules[self::FIELD_LAST_OCCURENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_LAST_OCCURENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_OCCURENCE])) { + $errs[self::FIELD_LAST_OCCURENCE] = []; + } + $errs[self::FIELD_LAST_OCCURENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET])) { + $v = $this->getOnset(); + foreach($validationRules[self::FIELD_ONSET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET])) { + $errs[self::FIELD_ONSET] = []; + } + $errs[self::FIELD_ONSET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REACTION])) { + $v = $this->getReaction(); + foreach($validationRules[self::FIELD_REACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_REACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REACTION])) { + $errs[self::FIELD_REACTION] = []; + } + $errs[self::FIELD_REACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED_DATE])) { + $v = $this->getRecordedDate(); + foreach($validationRules[self::FIELD_RECORDED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_RECORDED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED_DATE])) { + $errs[self::FIELD_RECORDED_DATE] = []; + } + $errs[self::FIELD_RECORDED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTER])) { + $v = $this->getReporter(); + foreach($validationRules[self::FIELD_REPORTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_REPORTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTER])) { + $errs[self::FIELD_REPORTER] = []; + } + $errs[self::FIELD_REPORTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointment.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointment.php index 5795fdf492..d3f783d487 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -268,7 +268,7 @@ class FHIRAppointment extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type Appointment * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PARTICIPANT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1081,11 +1081,332 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMinutesDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MINUTES_DURATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSlot())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SLOT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MINUTES_DURATION])) { + $v = $this->getMinutesDuration(); + foreach($validationRules[self::FIELD_MINUTES_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_MINUTES_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MINUTES_DURATION])) { + $errs[self::FIELD_MINUTES_DURATION] = []; + } + $errs[self::FIELD_MINUTES_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLOT])) { + $v = $this->getSlot(); + foreach($validationRules[self::FIELD_SLOT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SLOT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLOT])) { + $errs[self::FIELD_SLOT] = []; + } + $errs[self::FIELD_SLOT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php index 51b773bc6f..10563f72ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -206,7 +206,7 @@ class FHIRAppointmentResponse extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type AppointmentResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAppointmentResponse Constructor @@ -742,11 +742,262 @@ public function setStart($start = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getParticipantStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipantType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT])) { + $v = $this->getAppointment(); + foreach($validationRules[self::FIELD_APPOINTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_APPOINTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT])) { + $errs[self::FIELD_APPOINTMENT] = []; + } + $errs[self::FIELD_APPOINTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_STATUS])) { + $v = $this->getParticipantStatus(); + foreach($validationRules[self::FIELD_PARTICIPANT_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_PARTICIPANT_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_STATUS])) { + $errs[self::FIELD_PARTICIPANT_STATUS] = []; + } + $errs[self::FIELD_PARTICIPANT_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_TYPE])) { + $v = $this->getParticipantType(); + foreach($validationRules[self::FIELD_PARTICIPANT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_PARTICIPANT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_TYPE])) { + $errs[self::FIELD_PARTICIPANT_TYPE] = []; + } + $errs[self::FIELD_PARTICIPANT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php index a01200ccf4..9cae85ee5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRAuditEvent extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type AuditEvent * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PARTICIPANT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -415,11 +415,194 @@ public function setSource(FHIRAuditEventSource $source = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getObject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OBJECT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OBJECT])) { + $v = $this->getObject(); + foreach($validationRules[self::FIELD_OBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_OBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBJECT])) { + $errs[self::FIELD_OBJECT] = []; + } + $errs[self::FIELD_OBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBasic.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBasic.php index daf17fe726..45051e0535 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBasic.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBasic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -158,7 +158,7 @@ class FHIRBasic extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Basic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBasic Constructor @@ -464,11 +464,209 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBodySite.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBodySite.php index 15ae2a979f..edd77cf734 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBodySite.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBodySite.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -169,7 +169,7 @@ class FHIRBodySite extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type BodySite * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBodySite Constructor @@ -583,11 +583,230 @@ public function setPatient(FHIRReference $patient = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGE])) { + $v = $this->getImage(); + foreach($validationRules[self::FIELD_IMAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_IMAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGE])) { + $errs[self::FIELD_IMAGE] = []; + } + $errs[self::FIELD_IMAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCarePlan.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCarePlan.php index 0045daa073..488f8d0a4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCarePlan.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCarePlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -311,7 +311,7 @@ class FHIRCarePlan extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type CarePlan * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlan Constructor @@ -1395,11 +1395,412 @@ public function setSupport(array $support = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getActivity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTIVITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAddresses())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESSES, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGoal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getModified())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODIFIED] = $fieldErrs; + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedPlan())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_PLAN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVITY])) { + $v = $this->getActivity(); + foreach($validationRules[self::FIELD_ACTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_ACTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVITY])) { + $errs[self::FIELD_ACTIVITY] = []; + } + $errs[self::FIELD_ACTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESSES])) { + $v = $this->getAddresses(); + foreach($validationRules[self::FIELD_ADDRESSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_ADDRESSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESSES])) { + $errs[self::FIELD_ADDRESSES] = []; + } + $errs[self::FIELD_ADDRESSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL])) { + $v = $this->getGoal(); + foreach($validationRules[self::FIELD_GOAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_GOAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL])) { + $errs[self::FIELD_GOAL] = []; + } + $errs[self::FIELD_GOAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIED])) { + $v = $this->getModified(); + foreach($validationRules[self::FIELD_MODIFIED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_MODIFIED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIED])) { + $errs[self::FIELD_MODIFIED] = []; + } + $errs[self::FIELD_MODIFIED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_PLAN])) { + $v = $this->getRelatedPlan(); + foreach($validationRules[self::FIELD_RELATED_PLAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_RELATED_PLAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_PLAN])) { + $errs[self::FIELD_RELATED_PLAN] = []; + } + $errs[self::FIELD_RELATED_PLAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORT])) { + $v = $this->getSupport(); + foreach($validationRules[self::FIELD_SUPPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_SUPPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORT])) { + $errs[self::FIELD_SUPPORT] = []; + } + $errs[self::FIELD_SUPPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaim.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaim.php index 9b7e8bc9f1..44e31231ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaim.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaim.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -462,7 +462,7 @@ class FHIRClaim extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Claim * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaim Constructor @@ -2039,11 +2039,633 @@ public function setUse(FHIRUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccident())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCIDENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAccidentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCIDENT_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAdditionalMaterials())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIONAL_MATERIALS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCoverage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COVERAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getException())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCEPTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFacility())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFundsReserve())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNDS_RESERVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInterventionException())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERVENTION_EXCEPTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMissingTeeth())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MISSING_TEETH, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferral())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchool())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHOOL] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCIDENT])) { + $v = $this->getAccident(); + foreach($validationRules[self::FIELD_ACCIDENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCIDENT])) { + $errs[self::FIELD_ACCIDENT] = []; + } + $errs[self::FIELD_ACCIDENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACCIDENT_TYPE])) { + $v = $this->getAccidentType(); + foreach($validationRules[self::FIELD_ACCIDENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCIDENT_TYPE])) { + $errs[self::FIELD_ACCIDENT_TYPE] = []; + } + $errs[self::FIELD_ACCIDENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_MATERIALS])) { + $v = $this->getAdditionalMaterials(); + foreach($validationRules[self::FIELD_ADDITIONAL_MATERIALS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ADDITIONAL_MATERIALS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_MATERIALS])) { + $errs[self::FIELD_ADDITIONAL_MATERIALS] = []; + } + $errs[self::FIELD_ADDITIONAL_MATERIALS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCEPTION])) { + $v = $this->getException(); + foreach($validationRules[self::FIELD_EXCEPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_EXCEPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCEPTION])) { + $errs[self::FIELD_EXCEPTION] = []; + } + $errs[self::FIELD_EXCEPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY])) { + $v = $this->getFacility(); + foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FACILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY])) { + $errs[self::FIELD_FACILITY] = []; + } + $errs[self::FIELD_FACILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNDS_RESERVE])) { + $v = $this->getFundsReserve(); + foreach($validationRules[self::FIELD_FUNDS_RESERVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FUNDS_RESERVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNDS_RESERVE])) { + $errs[self::FIELD_FUNDS_RESERVE] = []; + } + $errs[self::FIELD_FUNDS_RESERVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERVENTION_EXCEPTION])) { + $v = $this->getInterventionException(); + foreach($validationRules[self::FIELD_INTERVENTION_EXCEPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_INTERVENTION_EXCEPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERVENTION_EXCEPTION])) { + $errs[self::FIELD_INTERVENTION_EXCEPTION] = []; + } + $errs[self::FIELD_INTERVENTION_EXCEPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MISSING_TEETH])) { + $v = $this->getMissingTeeth(); + foreach($validationRules[self::FIELD_MISSING_TEETH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_MISSING_TEETH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MISSING_TEETH])) { + $errs[self::FIELD_MISSING_TEETH] = []; + } + $errs[self::FIELD_MISSING_TEETH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION])) { + $v = $this->getOriginalPrescription(); + foreach($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_PRESCRIPTION])) { + $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = []; + } + $errs[self::FIELD_ORIGINAL_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE])) { + $v = $this->getPayee(); + foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PAYEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE])) { + $errs[self::FIELD_PAYEE] = []; + } + $errs[self::FIELD_PAYEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIPTION])) { + $v = $this->getPrescription(); + foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIPTION])) { + $errs[self::FIELD_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL])) { + $v = $this->getReferral(); + foreach($validationRules[self::FIELD_REFERRAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_REFERRAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL])) { + $errs[self::FIELD_REFERRAL] = []; + } + $errs[self::FIELD_REFERRAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHOOL])) { + $v = $this->getSchool(); + foreach($validationRules[self::FIELD_SCHOOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_SCHOOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHOOL])) { + $errs[self::FIELD_SCHOOL] = []; + } + $errs[self::FIELD_SCHOOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php index cb08012ac7..2907780e6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -401,7 +401,7 @@ class FHIRClaimResponse extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type ClaimResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponse Constructor @@ -1695,11 +1695,576 @@ public function setUnallocDeductable(FHIRMoney $unallocDeductable = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAddItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCoverage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COVERAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getError())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ERROR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayeeType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentAdjustment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_ADJUSTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentAdjustmentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_ADJUSTMENT_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentRef())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_REF] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReserved())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESERVED] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotalBenefit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL_BENEFIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotalCost())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL_COST] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnallocDeductable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNALLOC_DEDUCTABLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADD_ITEM])) { + $v = $this->getAddItem(); + foreach($validationRules[self::FIELD_ADD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ADD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADD_ITEM])) { + $errs[self::FIELD_ADD_ITEM] = []; + } + $errs[self::FIELD_ADD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ERROR])) { + $v = $this->getError(); + foreach($validationRules[self::FIELD_ERROR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ERROR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ERROR])) { + $errs[self::FIELD_ERROR] = []; + } + $errs[self::FIELD_ERROR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE_TYPE])) { + $v = $this->getPayeeType(); + foreach($validationRules[self::FIELD_PAYEE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PAYEE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE_TYPE])) { + $errs[self::FIELD_PAYEE_TYPE] = []; + } + $errs[self::FIELD_PAYEE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_ADJUSTMENT])) { + $v = $this->getPaymentAdjustment(); + foreach($validationRules[self::FIELD_PAYMENT_ADJUSTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PAYMENT_ADJUSTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_ADJUSTMENT])) { + $errs[self::FIELD_PAYMENT_ADJUSTMENT] = []; + } + $errs[self::FIELD_PAYMENT_ADJUSTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_ADJUSTMENT_REASON])) { + $v = $this->getPaymentAdjustmentReason(); + foreach($validationRules[self::FIELD_PAYMENT_ADJUSTMENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PAYMENT_ADJUSTMENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_ADJUSTMENT_REASON])) { + $errs[self::FIELD_PAYMENT_ADJUSTMENT_REASON] = []; + } + $errs[self::FIELD_PAYMENT_ADJUSTMENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_AMOUNT])) { + $v = $this->getPaymentAmount(); + foreach($validationRules[self::FIELD_PAYMENT_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PAYMENT_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_AMOUNT])) { + $errs[self::FIELD_PAYMENT_AMOUNT] = []; + } + $errs[self::FIELD_PAYMENT_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_DATE])) { + $v = $this->getPaymentDate(); + foreach($validationRules[self::FIELD_PAYMENT_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PAYMENT_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_DATE])) { + $errs[self::FIELD_PAYMENT_DATE] = []; + } + $errs[self::FIELD_PAYMENT_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_REF])) { + $v = $this->getPaymentRef(); + foreach($validationRules[self::FIELD_PAYMENT_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PAYMENT_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_REF])) { + $errs[self::FIELD_PAYMENT_REF] = []; + } + $errs[self::FIELD_PAYMENT_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESERVED])) { + $v = $this->getReserved(); + foreach($validationRules[self::FIELD_RESERVED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_RESERVED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESERVED])) { + $errs[self::FIELD_RESERVED] = []; + } + $errs[self::FIELD_RESERVED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL_BENEFIT])) { + $v = $this->getTotalBenefit(); + foreach($validationRules[self::FIELD_TOTAL_BENEFIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_TOTAL_BENEFIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL_BENEFIT])) { + $errs[self::FIELD_TOTAL_BENEFIT] = []; + } + $errs[self::FIELD_TOTAL_BENEFIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL_COST])) { + $v = $this->getTotalCost(); + foreach($validationRules[self::FIELD_TOTAL_COST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_TOTAL_COST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL_COST])) { + $errs[self::FIELD_TOTAL_COST] = []; + } + $errs[self::FIELD_TOTAL_COST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNALLOC_DEDUCTABLE])) { + $v = $this->getUnallocDeductable(); + foreach($validationRules[self::FIELD_UNALLOC_DEDUCTABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_UNALLOC_DEDUCTABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNALLOC_DEDUCTABLE])) { + $errs[self::FIELD_UNALLOC_DEDUCTABLE] = []; + } + $errs[self::FIELD_UNALLOC_DEDUCTABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php index 425c39ac65..09117d92af 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -352,7 +352,7 @@ class FHIRClinicalImpression extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type ClinicalImpression * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpression Constructor @@ -1538,11 +1538,442 @@ public function setTriggerReference(FHIRReference $triggerReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAssessor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSESSOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFinding())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FINDING, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInvestigations())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INVESTIGATIONS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPlan())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PLAN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrevious())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREVIOUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProblem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROBLEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrognosis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROGNOSIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProtocol())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROTOCOL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getResolved())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOLVED, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRuledOut())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULED_OUT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSummary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUMMARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getTriggerCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRIGGER_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTriggerReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRIGGER_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSESSOR])) { + $v = $this->getAssessor(); + foreach($validationRules[self::FIELD_ASSESSOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_ASSESSOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSESSOR])) { + $errs[self::FIELD_ASSESSOR] = []; + } + $errs[self::FIELD_ASSESSOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FINDING])) { + $v = $this->getFinding(); + foreach($validationRules[self::FIELD_FINDING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_FINDING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FINDING])) { + $errs[self::FIELD_FINDING] = []; + } + $errs[self::FIELD_FINDING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INVESTIGATIONS])) { + $v = $this->getInvestigations(); + foreach($validationRules[self::FIELD_INVESTIGATIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_INVESTIGATIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INVESTIGATIONS])) { + $errs[self::FIELD_INVESTIGATIONS] = []; + } + $errs[self::FIELD_INVESTIGATIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PLAN])) { + $v = $this->getPlan(); + foreach($validationRules[self::FIELD_PLAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PLAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PLAN])) { + $errs[self::FIELD_PLAN] = []; + } + $errs[self::FIELD_PLAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREVIOUS])) { + $v = $this->getPrevious(); + foreach($validationRules[self::FIELD_PREVIOUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PREVIOUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREVIOUS])) { + $errs[self::FIELD_PREVIOUS] = []; + } + $errs[self::FIELD_PREVIOUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROBLEM])) { + $v = $this->getProblem(); + foreach($validationRules[self::FIELD_PROBLEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROBLEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROBLEM])) { + $errs[self::FIELD_PROBLEM] = []; + } + $errs[self::FIELD_PROBLEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGNOSIS])) { + $v = $this->getPrognosis(); + foreach($validationRules[self::FIELD_PROGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGNOSIS])) { + $errs[self::FIELD_PROGNOSIS] = []; + } + $errs[self::FIELD_PROGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOLVED])) { + $v = $this->getResolved(); + foreach($validationRules[self::FIELD_RESOLVED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_RESOLVED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOLVED])) { + $errs[self::FIELD_RESOLVED] = []; + } + $errs[self::FIELD_RESOLVED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULED_OUT])) { + $v = $this->getRuledOut(); + foreach($validationRules[self::FIELD_RULED_OUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_RULED_OUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULED_OUT])) { + $errs[self::FIELD_RULED_OUT] = []; + } + $errs[self::FIELD_RULED_OUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUMMARY])) { + $v = $this->getSummary(); + foreach($validationRules[self::FIELD_SUMMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_SUMMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUMMARY])) { + $errs[self::FIELD_SUMMARY] = []; + } + $errs[self::FIELD_SUMMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRIGGER_CODEABLE_CONCEPT])) { + $v = $this->getTriggerCodeableConcept(); + foreach($validationRules[self::FIELD_TRIGGER_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_TRIGGER_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRIGGER_CODEABLE_CONCEPT])) { + $errs[self::FIELD_TRIGGER_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_TRIGGER_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRIGGER_REFERENCE])) { + $v = $this->getTriggerReference(); + foreach($validationRules[self::FIELD_TRIGGER_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_TRIGGER_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRIGGER_REFERENCE])) { + $errs[self::FIELD_TRIGGER_REFERENCE] = []; + } + $errs[self::FIELD_TRIGGER_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunication.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunication.php index 5596df9d25..9d4e7d447d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -271,7 +271,7 @@ class FHIRCommunication extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type Communication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunication Constructor @@ -1096,11 +1096,353 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMedium())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEDIUM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPayload())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYLOAD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReceived())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequestDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getSender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIUM])) { + $v = $this->getMedium(); + foreach($validationRules[self::FIELD_MEDIUM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_MEDIUM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIUM])) { + $errs[self::FIELD_MEDIUM] = []; + } + $errs[self::FIELD_MEDIUM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD])) { + $v = $this->getPayload(); + foreach($validationRules[self::FIELD_PAYLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_PAYLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD])) { + $errs[self::FIELD_PAYLOAD] = []; + } + $errs[self::FIELD_PAYLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVED])) { + $v = $this->getReceived(); + foreach($validationRules[self::FIELD_RECEIVED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_RECEIVED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVED])) { + $errs[self::FIELD_RECEIVED] = []; + } + $errs[self::FIELD_RECEIVED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_DETAIL])) { + $v = $this->getRequestDetail(); + foreach($validationRules[self::FIELD_REQUEST_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_REQUEST_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_DETAIL])) { + $errs[self::FIELD_REQUEST_DETAIL] = []; + } + $errs[self::FIELD_REQUEST_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENDER])) { + $v = $this->getSender(); + foreach($validationRules[self::FIELD_SENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_SENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENDER])) { + $errs[self::FIELD_SENDER] = []; + } + $errs[self::FIELD_SENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENT])) { + $v = $this->getSent(); + foreach($validationRules[self::FIELD_SENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_SENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENT])) { + $errs[self::FIELD_SENT] = []; + } + $errs[self::FIELD_SENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php index 56e2cc82d1..cef826df76 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -295,7 +295,7 @@ class FHIRCommunicationRequest extends FHIRDomainResource implements PHPFHIRCont * Validation map for fields in type CommunicationRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationRequest Constructor @@ -1187,11 +1187,387 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMedium())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEDIUM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPayload())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYLOAD, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequestedOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTED_ON] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getSender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIUM])) { + $v = $this->getMedium(); + foreach($validationRules[self::FIELD_MEDIUM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_MEDIUM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIUM])) { + $errs[self::FIELD_MEDIUM] = []; + } + $errs[self::FIELD_MEDIUM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD])) { + $v = $this->getPayload(); + foreach($validationRules[self::FIELD_PAYLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_PAYLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD])) { + $errs[self::FIELD_PAYLOAD] = []; + } + $errs[self::FIELD_PAYLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTED_ON])) { + $v = $this->getRequestedOn(); + foreach($validationRules[self::FIELD_REQUESTED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REQUESTED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTED_ON])) { + $errs[self::FIELD_REQUESTED_ON] = []; + } + $errs[self::FIELD_REQUESTED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_DATE_TIME])) { + $v = $this->getScheduledDateTime(); + foreach($validationRules[self::FIELD_SCHEDULED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_SCHEDULED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_DATE_TIME])) { + $errs[self::FIELD_SCHEDULED_DATE_TIME] = []; + } + $errs[self::FIELD_SCHEDULED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_PERIOD])) { + $v = $this->getScheduledPeriod(); + foreach($validationRules[self::FIELD_SCHEDULED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_SCHEDULED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_PERIOD])) { + $errs[self::FIELD_SCHEDULED_PERIOD] = []; + } + $errs[self::FIELD_SCHEDULED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENDER])) { + $v = $this->getSender(); + foreach($validationRules[self::FIELD_SENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_SENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENDER])) { + $errs[self::FIELD_SENDER] = []; + } + $errs[self::FIELD_SENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRComposition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRComposition.php index 14d9155896..d86c18c668 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRComposition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRComposition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -301,7 +301,7 @@ class FHIRComposition extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type Composition * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_AUTHOR => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1175,11 +1175,368 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAttester())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ATTESTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getConfidentiality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFIDENTIALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCustodian())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CUSTODIAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSection())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ATTESTER])) { + $v = $this->getAttester(); + foreach($validationRules[self::FIELD_ATTESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_ATTESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTESTER])) { + $errs[self::FIELD_ATTESTER] = []; + } + $errs[self::FIELD_ATTESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONFIDENTIALITY])) { + $v = $this->getConfidentiality(); + foreach($validationRules[self::FIELD_CONFIDENTIALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CONFIDENTIALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONFIDENTIALITY])) { + $errs[self::FIELD_CONFIDENTIALITY] = []; + } + $errs[self::FIELD_CONFIDENTIALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CUSTODIAN])) { + $v = $this->getCustodian(); + foreach($validationRules[self::FIELD_CUSTODIAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CUSTODIAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CUSTODIAN])) { + $errs[self::FIELD_CUSTODIAN] = []; + } + $errs[self::FIELD_CUSTODIAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECTION])) { + $v = $this->getSection(); + foreach($validationRules[self::FIELD_SECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_SECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECTION])) { + $errs[self::FIELD_SECTION] = []; + } + $errs[self::FIELD_SECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConceptMap.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConceptMap.php index 3d047c7411..1479e53145 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConceptMap.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConceptMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -349,7 +349,7 @@ class FHIRConceptMap extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type ConceptMap * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMap Constructor @@ -1513,11 +1513,434 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_REFERENCE])) { + $v = $this->getSourceReference(); + foreach($validationRules[self::FIELD_SOURCE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_SOURCE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_REFERENCE])) { + $errs[self::FIELD_SOURCE_REFERENCE] = []; + } + $errs[self::FIELD_SOURCE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_URI])) { + $v = $this->getSourceUri(); + foreach($validationRules[self::FIELD_SOURCE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_SOURCE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_URI])) { + $errs[self::FIELD_SOURCE_URI] = []; + } + $errs[self::FIELD_SOURCE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_REFERENCE])) { + $v = $this->getTargetReference(); + foreach($validationRules[self::FIELD_TARGET_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_TARGET_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_REFERENCE])) { + $errs[self::FIELD_TARGET_REFERENCE] = []; + } + $errs[self::FIELD_TARGET_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_URI])) { + $v = $this->getTargetUri(); + foreach($validationRules[self::FIELD_TARGET_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_TARGET_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_URI])) { + $errs[self::FIELD_TARGET_URI] = []; + } + $errs[self::FIELD_TARGET_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCondition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCondition.php index c4b3139218..41e4d40621 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -446,7 +446,7 @@ class FHIRCondition extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCondition Constructor @@ -1813,11 +1813,553 @@ public function setVerificationStatus(FHIRConditionVerificationStatus $verificat } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbatementBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsserter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getClinicalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateRecorded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_RECORDED] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvidence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVIDENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNotes())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTES] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVerificationStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERIFICATION_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_BOOLEAN])) { + $v = $this->getAbatementBoolean(); + foreach($validationRules[self::FIELD_ABATEMENT_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_BOOLEAN])) { + $errs[self::FIELD_ABATEMENT_BOOLEAN] = []; + } + $errs[self::FIELD_ABATEMENT_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_DATE_TIME])) { + $v = $this->getAbatementDateTime(); + foreach($validationRules[self::FIELD_ABATEMENT_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_DATE_TIME])) { + $errs[self::FIELD_ABATEMENT_DATE_TIME] = []; + } + $errs[self::FIELD_ABATEMENT_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_PERIOD])) { + $v = $this->getAbatementPeriod(); + foreach($validationRules[self::FIELD_ABATEMENT_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_PERIOD])) { + $errs[self::FIELD_ABATEMENT_PERIOD] = []; + } + $errs[self::FIELD_ABATEMENT_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_QUANTITY])) { + $v = $this->getAbatementQuantity(); + foreach($validationRules[self::FIELD_ABATEMENT_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_QUANTITY])) { + $errs[self::FIELD_ABATEMENT_QUANTITY] = []; + } + $errs[self::FIELD_ABATEMENT_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_RANGE])) { + $v = $this->getAbatementRange(); + foreach($validationRules[self::FIELD_ABATEMENT_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_RANGE])) { + $errs[self::FIELD_ABATEMENT_RANGE] = []; + } + $errs[self::FIELD_ABATEMENT_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_STRING])) { + $v = $this->getAbatementString(); + foreach($validationRules[self::FIELD_ABATEMENT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_STRING])) { + $errs[self::FIELD_ABATEMENT_STRING] = []; + } + $errs[self::FIELD_ABATEMENT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSERTER])) { + $v = $this->getAsserter(); + foreach($validationRules[self::FIELD_ASSERTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ASSERTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERTER])) { + $errs[self::FIELD_ASSERTER] = []; + } + $errs[self::FIELD_ASSERTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLINICAL_STATUS])) { + $v = $this->getClinicalStatus(); + foreach($validationRules[self::FIELD_CLINICAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CLINICAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLINICAL_STATUS])) { + $errs[self::FIELD_CLINICAL_STATUS] = []; + } + $errs[self::FIELD_CLINICAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_RECORDED])) { + $v = $this->getDateRecorded(); + foreach($validationRules[self::FIELD_DATE_RECORDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_DATE_RECORDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_RECORDED])) { + $errs[self::FIELD_DATE_RECORDED] = []; + } + $errs[self::FIELD_DATE_RECORDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVIDENCE])) { + $v = $this->getEvidence(); + foreach($validationRules[self::FIELD_EVIDENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_EVIDENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVIDENCE])) { + $errs[self::FIELD_EVIDENCE] = []; + } + $errs[self::FIELD_EVIDENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_DATE_TIME])) { + $v = $this->getOnsetDateTime(); + foreach($validationRules[self::FIELD_ONSET_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_DATE_TIME])) { + $errs[self::FIELD_ONSET_DATE_TIME] = []; + } + $errs[self::FIELD_ONSET_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_PERIOD])) { + $v = $this->getOnsetPeriod(); + foreach($validationRules[self::FIELD_ONSET_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_PERIOD])) { + $errs[self::FIELD_ONSET_PERIOD] = []; + } + $errs[self::FIELD_ONSET_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_QUANTITY])) { + $v = $this->getOnsetQuantity(); + foreach($validationRules[self::FIELD_ONSET_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_QUANTITY])) { + $errs[self::FIELD_ONSET_QUANTITY] = []; + } + $errs[self::FIELD_ONSET_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_RANGE])) { + $v = $this->getOnsetRange(); + foreach($validationRules[self::FIELD_ONSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_RANGE])) { + $errs[self::FIELD_ONSET_RANGE] = []; + } + $errs[self::FIELD_ONSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_STRING])) { + $v = $this->getOnsetString(); + foreach($validationRules[self::FIELD_ONSET_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_STRING])) { + $errs[self::FIELD_ONSET_STRING] = []; + } + $errs[self::FIELD_ONSET_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STAGE])) { + $v = $this->getStage(); + foreach($validationRules[self::FIELD_STAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_STAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STAGE])) { + $errs[self::FIELD_STAGE] = []; + } + $errs[self::FIELD_STAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERIFICATION_STATUS])) { + $v = $this->getVerificationStatus(); + foreach($validationRules[self::FIELD_VERIFICATION_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_VERIFICATION_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERIFICATION_STATUS])) { + $errs[self::FIELD_VERIFICATION_STATUS] = []; + } + $errs[self::FIELD_VERIFICATION_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConformance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConformance.php index 6ee0ea4493..02d2daa2f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConformance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConformance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -407,7 +407,7 @@ class FHIRConformance extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type Conformance * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_FORMAT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1867,11 +1867,491 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAcceptUnknown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCEPT_UNKNOWN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDocument())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFhirVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FHIR_VERSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFormat())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FORMAT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getImplementation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLEMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMessaging())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MESSAGING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSoftware())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOFTWARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCEPT_UNKNOWN])) { + $v = $this->getAcceptUnknown(); + foreach($validationRules[self::FIELD_ACCEPT_UNKNOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_ACCEPT_UNKNOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCEPT_UNKNOWN])) { + $errs[self::FIELD_ACCEPT_UNKNOWN] = []; + } + $errs[self::FIELD_ACCEPT_UNKNOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENT])) { + $v = $this->getDocument(); + foreach($validationRules[self::FIELD_DOCUMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_DOCUMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENT])) { + $errs[self::FIELD_DOCUMENT] = []; + } + $errs[self::FIELD_DOCUMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORMAT])) { + $v = $this->getFormat(); + foreach($validationRules[self::FIELD_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAT])) { + $errs[self::FIELD_FORMAT] = []; + } + $errs[self::FIELD_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLEMENTATION])) { + $v = $this->getImplementation(); + foreach($validationRules[self::FIELD_IMPLEMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_IMPLEMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLEMENTATION])) { + $errs[self::FIELD_IMPLEMENTATION] = []; + } + $errs[self::FIELD_IMPLEMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MESSAGING])) { + $v = $this->getMessaging(); + foreach($validationRules[self::FIELD_MESSAGING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_MESSAGING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MESSAGING])) { + $errs[self::FIELD_MESSAGING] = []; + } + $errs[self::FIELD_MESSAGING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REST])) { + $v = $this->getRest(); + foreach($validationRules[self::FIELD_REST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_REST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REST])) { + $errs[self::FIELD_REST] = []; + } + $errs[self::FIELD_REST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOFTWARE])) { + $v = $this->getSoftware(); + foreach($validationRules[self::FIELD_SOFTWARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_SOFTWARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOFTWARE])) { + $errs[self::FIELD_SOFTWARE] = []; + } + $errs[self::FIELD_SOFTWARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFORMANCE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRContract.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRContract.php index 45c0eba302..509add7411 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRContract.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRContract.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -351,7 +351,7 @@ class FHIRContract extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Contract * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContract Constructor @@ -1663,11 +1663,471 @@ public function setValuedItem(array $valuedItem = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getActionReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getActor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getApplies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPLIES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthority())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHORITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBindingAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBindingReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDomain())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOMAIN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFriendly())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FRIENDLY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLegal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LEGAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSigner())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SIGNER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTerm())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TERM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValuedItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUED_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTION_REASON])) { + $v = $this->getActionReason(); + foreach($validationRules[self::FIELD_ACTION_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_ACTION_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION_REASON])) { + $errs[self::FIELD_ACTION_REASON] = []; + } + $errs[self::FIELD_ACTION_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPLIES])) { + $v = $this->getApplies(); + foreach($validationRules[self::FIELD_APPLIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_APPLIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES])) { + $errs[self::FIELD_APPLIES] = []; + } + $errs[self::FIELD_APPLIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BINDING_ATTACHMENT])) { + $v = $this->getBindingAttachment(); + foreach($validationRules[self::FIELD_BINDING_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_BINDING_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING_ATTACHMENT])) { + $errs[self::FIELD_BINDING_ATTACHMENT] = []; + } + $errs[self::FIELD_BINDING_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BINDING_REFERENCE])) { + $v = $this->getBindingReference(); + foreach($validationRules[self::FIELD_BINDING_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_BINDING_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING_REFERENCE])) { + $errs[self::FIELD_BINDING_REFERENCE] = []; + } + $errs[self::FIELD_BINDING_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOMAIN])) { + $v = $this->getDomain(); + foreach($validationRules[self::FIELD_DOMAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_DOMAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOMAIN])) { + $errs[self::FIELD_DOMAIN] = []; + } + $errs[self::FIELD_DOMAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FRIENDLY])) { + $v = $this->getFriendly(); + foreach($validationRules[self::FIELD_FRIENDLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_FRIENDLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRIENDLY])) { + $errs[self::FIELD_FRIENDLY] = []; + } + $errs[self::FIELD_FRIENDLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEGAL])) { + $v = $this->getLegal(); + foreach($validationRules[self::FIELD_LEGAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_LEGAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEGAL])) { + $errs[self::FIELD_LEGAL] = []; + } + $errs[self::FIELD_LEGAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNER])) { + $v = $this->getSigner(); + foreach($validationRules[self::FIELD_SIGNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SIGNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNER])) { + $errs[self::FIELD_SIGNER] = []; + } + $errs[self::FIELD_SIGNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TERM])) { + $v = $this->getTerm(); + foreach($validationRules[self::FIELD_TERM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_TERM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TERM])) { + $errs[self::FIELD_TERM] = []; + } + $errs[self::FIELD_TERM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUED_ITEM])) { + $v = $this->getValuedItem(); + foreach($validationRules[self::FIELD_VALUED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_VALUED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUED_ITEM])) { + $errs[self::FIELD_VALUED_ITEM] = []; + } + $errs[self::FIELD_VALUED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCoverage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCoverage.php index eab073c283..fdbfc4efe7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -281,7 +281,7 @@ class FHIRCoverage extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Coverage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverage Constructor @@ -1074,11 +1074,364 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContract())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDependent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEPENDENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssuer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPlan())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PLAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubPlan())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_PLAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubscriber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSCRIBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubscriberId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSCRIBER_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BIN])) { + $v = $this->getBin(); + foreach($validationRules[self::FIELD_BIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_BIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIN])) { + $errs[self::FIELD_BIN] = []; + } + $errs[self::FIELD_BIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRACT])) { + $v = $this->getContract(); + foreach($validationRules[self::FIELD_CONTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_CONTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRACT])) { + $errs[self::FIELD_CONTRACT] = []; + } + $errs[self::FIELD_CONTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDENT])) { + $v = $this->getDependent(); + foreach($validationRules[self::FIELD_DEPENDENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_DEPENDENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDENT])) { + $errs[self::FIELD_DEPENDENT] = []; + } + $errs[self::FIELD_DEPENDENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUER])) { + $v = $this->getIssuer(); + foreach($validationRules[self::FIELD_ISSUER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_ISSUER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUER])) { + $errs[self::FIELD_ISSUER] = []; + } + $errs[self::FIELD_ISSUER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PLAN])) { + $v = $this->getPlan(); + foreach($validationRules[self::FIELD_PLAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_PLAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PLAN])) { + $errs[self::FIELD_PLAN] = []; + } + $errs[self::FIELD_PLAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_PLAN])) { + $v = $this->getSubPlan(); + foreach($validationRules[self::FIELD_SUB_PLAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_SUB_PLAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_PLAN])) { + $errs[self::FIELD_SUB_PLAN] = []; + } + $errs[self::FIELD_SUB_PLAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSCRIBER])) { + $v = $this->getSubscriber(); + foreach($validationRules[self::FIELD_SUBSCRIBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_SUBSCRIBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSCRIBER])) { + $errs[self::FIELD_SUBSCRIBER] = []; + } + $errs[self::FIELD_SUBSCRIBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSCRIBER_ID])) { + $v = $this->getSubscriberId(); + foreach($validationRules[self::FIELD_SUBSCRIBER_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_SUBSCRIBER_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSCRIBER_ID])) { + $errs[self::FIELD_SUBSCRIBER_ID] = []; + } + $errs[self::FIELD_SUBSCRIBER_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDataElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDataElement.php index d69922de53..59536af199 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDataElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDataElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -295,7 +295,7 @@ class FHIRDataElement extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type DataElement * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ELEMENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1304,11 +1304,370 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMapping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStringency())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRINGENCY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAPPING])) { + $v = $this->getMapping(); + foreach($validationRules[self::FIELD_MAPPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_MAPPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAPPING])) { + $errs[self::FIELD_MAPPING] = []; + } + $errs[self::FIELD_MAPPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRINGENCY])) { + $v = $this->getStringency(); + foreach($validationRules[self::FIELD_STRINGENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_STRINGENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRINGENCY])) { + $errs[self::FIELD_STRINGENCY] = []; + } + $errs[self::FIELD_STRINGENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php index 5e43a5fdfd..40df942dd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -230,7 +230,7 @@ class FHIRDetectedIssue extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type DetectedIssue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDetectedIssue Constructor @@ -835,11 +835,296 @@ public function setSeverity(FHIRDetectedIssueSeverity $severity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getImplicated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPLICATED, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMitigation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MITIGATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICATED])) { + $v = $this->getImplicated(); + foreach($validationRules[self::FIELD_IMPLICATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_IMPLICATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICATED])) { + $errs[self::FIELD_IMPLICATED] = []; + } + $errs[self::FIELD_IMPLICATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MITIGATION])) { + $v = $this->getMitigation(); + foreach($validationRules[self::FIELD_MITIGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_MITIGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MITIGATION])) { + $errs[self::FIELD_MITIGATION] = []; + } + $errs[self::FIELD_MITIGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDevice.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDevice.php index 832fb69be6..349cbe5561 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -322,7 +322,7 @@ class FHIRDevice extends FHIRDomainResource implements PHPFHIRContainedTypeInter * Validation map for fields in type Device * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDevice Constructor @@ -1328,11 +1328,400 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExpiry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufactureDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getModel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODEL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOwner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUdi())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UDI] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPIRY])) { + $v = $this->getExpiry(); + foreach($validationRules[self::FIELD_EXPIRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_EXPIRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRY])) { + $errs[self::FIELD_EXPIRY] = []; + } + $errs[self::FIELD_EXPIRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURE_DATE])) { + $v = $this->getManufactureDate(); + foreach($validationRules[self::FIELD_MANUFACTURE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MANUFACTURE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURE_DATE])) { + $errs[self::FIELD_MANUFACTURE_DATE] = []; + } + $errs[self::FIELD_MANUFACTURE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODEL])) { + $v = $this->getModel(); + foreach($validationRules[self::FIELD_MODEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MODEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODEL])) { + $errs[self::FIELD_MODEL] = []; + } + $errs[self::FIELD_MODEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNER])) { + $v = $this->getOwner(); + foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_OWNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNER])) { + $errs[self::FIELD_OWNER] = []; + } + $errs[self::FIELD_OWNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php index 5910d48384..6e3ad4ff28 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -229,7 +229,7 @@ class FHIRDeviceComponent extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type DeviceComponent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceComponent Constructor @@ -792,11 +792,296 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguageCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLastSystemChange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_SYSTEM_CHANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasurementPrinciple())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASUREMENT_PRINCIPLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOperationalStatus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPERATIONAL_STATUS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getParameterGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARAMETER_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getParent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProductionSpecification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRODUCTION_SPECIFICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE_CODE])) { + $v = $this->getLanguageCode(); + foreach($validationRules[self::FIELD_LANGUAGE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_LANGUAGE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE_CODE])) { + $errs[self::FIELD_LANGUAGE_CODE] = []; + } + $errs[self::FIELD_LANGUAGE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_SYSTEM_CHANGE])) { + $v = $this->getLastSystemChange(); + foreach($validationRules[self::FIELD_LAST_SYSTEM_CHANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_LAST_SYSTEM_CHANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_SYSTEM_CHANGE])) { + $errs[self::FIELD_LAST_SYSTEM_CHANGE] = []; + } + $errs[self::FIELD_LAST_SYSTEM_CHANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASUREMENT_PRINCIPLE])) { + $v = $this->getMeasurementPrinciple(); + foreach($validationRules[self::FIELD_MEASUREMENT_PRINCIPLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_MEASUREMENT_PRINCIPLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASUREMENT_PRINCIPLE])) { + $errs[self::FIELD_MEASUREMENT_PRINCIPLE] = []; + } + $errs[self::FIELD_MEASUREMENT_PRINCIPLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATIONAL_STATUS])) { + $v = $this->getOperationalStatus(); + foreach($validationRules[self::FIELD_OPERATIONAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_OPERATIONAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATIONAL_STATUS])) { + $errs[self::FIELD_OPERATIONAL_STATUS] = []; + } + $errs[self::FIELD_OPERATIONAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER_GROUP])) { + $v = $this->getParameterGroup(); + foreach($validationRules[self::FIELD_PARAMETER_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_PARAMETER_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER_GROUP])) { + $errs[self::FIELD_PARAMETER_GROUP] = []; + } + $errs[self::FIELD_PARAMETER_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCTION_SPECIFICATION])) { + $v = $this->getProductionSpecification(); + foreach($validationRules[self::FIELD_PRODUCTION_SPECIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_PRODUCTION_SPECIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCTION_SPECIFICATION])) { + $errs[self::FIELD_PRODUCTION_SPECIFICATION] = []; + } + $errs[self::FIELD_PRODUCTION_SPECIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php index 9dee084019..b1165464e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -242,7 +242,7 @@ class FHIRDeviceMetric extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type DeviceMetric * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetric Constructor @@ -795,11 +795,294 @@ public function setUnit(FHIRCodeableConcept $unit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCalibration())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CALIBRATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getColor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasurementPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASUREMENT_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATIONAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getParent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CALIBRATION])) { + $v = $this->getCalibration(); + foreach($validationRules[self::FIELD_CALIBRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_CALIBRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CALIBRATION])) { + $errs[self::FIELD_CALIBRATION] = []; + } + $errs[self::FIELD_CALIBRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLOR])) { + $v = $this->getColor(); + foreach($validationRules[self::FIELD_COLOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_COLOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLOR])) { + $errs[self::FIELD_COLOR] = []; + } + $errs[self::FIELD_COLOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASUREMENT_PERIOD])) { + $v = $this->getMeasurementPeriod(); + foreach($validationRules[self::FIELD_MEASUREMENT_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_MEASUREMENT_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASUREMENT_PERIOD])) { + $errs[self::FIELD_MEASUREMENT_PERIOD] = []; + } + $errs[self::FIELD_MEASUREMENT_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATIONAL_STATUS])) { + $v = $this->getOperationalStatus(); + foreach($validationRules[self::FIELD_OPERATIONAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_OPERATIONAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATIONAL_STATUS])) { + $errs[self::FIELD_OPERATIONAL_STATUS] = []; + } + $errs[self::FIELD_OPERATIONAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequest.php index ec957a1c4f..86e2be9c8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -322,7 +322,7 @@ class FHIRDeviceUseRequest extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type DeviceUseRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceUseRequest Constructor @@ -1304,11 +1304,402 @@ public function setTimingTiming(FHIRTiming $timingTiming = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySiteCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBodySiteReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIndication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNotes())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrderedOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_ON] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrnReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRN_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecordedOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED_ON] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE_CODEABLE_CONCEPT])) { + $v = $this->getBodySiteCodeableConcept(); + foreach($validationRules[self::FIELD_BODY_SITE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_BODY_SITE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_BODY_SITE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_BODY_SITE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE_REFERENCE])) { + $v = $this->getBodySiteReference(); + foreach($validationRules[self::FIELD_BODY_SITE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_BODY_SITE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE_REFERENCE])) { + $errs[self::FIELD_BODY_SITE_REFERENCE] = []; + } + $errs[self::FIELD_BODY_SITE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION])) { + $v = $this->getIndication(); + foreach($validationRules[self::FIELD_INDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_INDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION])) { + $errs[self::FIELD_INDICATION] = []; + } + $errs[self::FIELD_INDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_ON])) { + $v = $this->getOrderedOn(); + foreach($validationRules[self::FIELD_ORDERED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_ORDERED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_ON])) { + $errs[self::FIELD_ORDERED_ON] = []; + } + $errs[self::FIELD_ORDERED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRN_REASON])) { + $v = $this->getPrnReason(); + foreach($validationRules[self::FIELD_PRN_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_PRN_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRN_REASON])) { + $errs[self::FIELD_PRN_REASON] = []; + } + $errs[self::FIELD_PRN_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED_ON])) { + $v = $this->getRecordedOn(); + foreach($validationRules[self::FIELD_RECORDED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_RECORDED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED_ON])) { + $errs[self::FIELD_RECORDED_ON] = []; + } + $errs[self::FIELD_RECORDED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php index 9b274fc9da..feac4b4342 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -256,7 +256,7 @@ class FHIRDeviceUseStatement extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type DeviceUseStatement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceUseStatement Constructor @@ -969,11 +969,332 @@ public function setWhenUsed(FHIRPeriod $whenUsed = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySiteCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBodySiteReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIndication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNotes())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecordedOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED_ON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenUsed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_USED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE_CODEABLE_CONCEPT])) { + $v = $this->getBodySiteCodeableConcept(); + foreach($validationRules[self::FIELD_BODY_SITE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_BODY_SITE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_BODY_SITE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_BODY_SITE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE_REFERENCE])) { + $v = $this->getBodySiteReference(); + foreach($validationRules[self::FIELD_BODY_SITE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_BODY_SITE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE_REFERENCE])) { + $errs[self::FIELD_BODY_SITE_REFERENCE] = []; + } + $errs[self::FIELD_BODY_SITE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION])) { + $v = $this->getIndication(); + foreach($validationRules[self::FIELD_INDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_INDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION])) { + $errs[self::FIELD_INDICATION] = []; + } + $errs[self::FIELD_INDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED_ON])) { + $v = $this->getRecordedOn(); + foreach($validationRules[self::FIELD_RECORDED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_RECORDED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED_ON])) { + $errs[self::FIELD_RECORDED_ON] = []; + } + $errs[self::FIELD_RECORDED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_USED])) { + $v = $this->getWhenUsed(); + foreach($validationRules[self::FIELD_WHEN_USED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_WHEN_USED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_USED])) { + $errs[self::FIELD_WHEN_USED] = []; + } + $errs[self::FIELD_WHEN_USED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrder.php index 1585b20260..0f55c26c96 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -251,7 +251,7 @@ class FHIRDiagnosticOrder extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type DiagnosticOrder * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticOrder Constructor @@ -1066,11 +1066,340 @@ public function setSupportingInformation(array $supportingInformation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrderer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERER])) { + $v = $this->getOrderer(); + foreach($validationRules[self::FIELD_ORDERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_ORDERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERER])) { + $errs[self::FIELD_ORDERER] = []; + } + $errs[self::FIELD_ORDERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php index 675faa4cfc..a6aae9f32e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -350,7 +350,7 @@ class FHIRDiagnosticReport extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type DiagnosticReport * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReport Constructor @@ -1521,11 +1521,444 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCodedDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODED_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getConclusion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCLUSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImagingStudy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGING_STUDY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPresentedForm())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRESENTED_FORM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUEST, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResult())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESULT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODED_DIAGNOSIS])) { + $v = $this->getCodedDiagnosis(); + foreach($validationRules[self::FIELD_CODED_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CODED_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODED_DIAGNOSIS])) { + $errs[self::FIELD_CODED_DIAGNOSIS] = []; + } + $errs[self::FIELD_CODED_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCLUSION])) { + $v = $this->getConclusion(); + foreach($validationRules[self::FIELD_CONCLUSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CONCLUSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCLUSION])) { + $errs[self::FIELD_CONCLUSION] = []; + } + $errs[self::FIELD_CONCLUSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGE])) { + $v = $this->getImage(); + foreach($validationRules[self::FIELD_IMAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IMAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGE])) { + $errs[self::FIELD_IMAGE] = []; + } + $errs[self::FIELD_IMAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGING_STUDY])) { + $v = $this->getImagingStudy(); + foreach($validationRules[self::FIELD_IMAGING_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IMAGING_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGING_STUDY])) { + $errs[self::FIELD_IMAGING_STUDY] = []; + } + $errs[self::FIELD_IMAGING_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESENTED_FORM])) { + $v = $this->getPresentedForm(); + foreach($validationRules[self::FIELD_PRESENTED_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_PRESENTED_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESENTED_FORM])) { + $errs[self::FIELD_PRESENTED_FORM] = []; + } + $errs[self::FIELD_PRESENTED_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php index 27e1abc147..2b319e9ec1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -259,7 +259,7 @@ class FHIRDocumentManifest extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type DocumentManifest * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CONTENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1068,11 +1068,336 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMasterIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MASTER_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MASTER_IDENTIFIER])) { + $v = $this->getMasterIdentifier(); + foreach($validationRules[self::FIELD_MASTER_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_MASTER_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MASTER_IDENTIFIER])) { + $errs[self::FIELD_MASTER_IDENTIFIER] = []; + } + $errs[self::FIELD_MASTER_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php index fa2ef4aedd..91a8498320 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -326,7 +326,7 @@ class FHIRDocumentReference extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type DocumentReference * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CONTENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1337,11 +1337,421 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthenticator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHENTICATOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getCustodian())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CUSTODIAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOC_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIndexed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDEXED] = $fieldErrs; + } + } + if (null !== ($v = $this->getMasterIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MASTER_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatesTo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATES_TO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHENTICATOR])) { + $v = $this->getAuthenticator(); + foreach($validationRules[self::FIELD_AUTHENTICATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_AUTHENTICATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHENTICATOR])) { + $errs[self::FIELD_AUTHENTICATOR] = []; + } + $errs[self::FIELD_AUTHENTICATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CUSTODIAN])) { + $v = $this->getCustodian(); + foreach($validationRules[self::FIELD_CUSTODIAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CUSTODIAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CUSTODIAN])) { + $errs[self::FIELD_CUSTODIAN] = []; + } + $errs[self::FIELD_CUSTODIAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOC_STATUS])) { + $v = $this->getDocStatus(); + foreach($validationRules[self::FIELD_DOC_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_DOC_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOC_STATUS])) { + $errs[self::FIELD_DOC_STATUS] = []; + } + $errs[self::FIELD_DOC_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDEXED])) { + $v = $this->getIndexed(); + foreach($validationRules[self::FIELD_INDEXED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_INDEXED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDEXED])) { + $errs[self::FIELD_INDEXED] = []; + } + $errs[self::FIELD_INDEXED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MASTER_IDENTIFIER])) { + $v = $this->getMasterIdentifier(); + foreach($validationRules[self::FIELD_MASTER_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_MASTER_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MASTER_IDENTIFIER])) { + $errs[self::FIELD_MASTER_IDENTIFIER] = []; + } + $errs[self::FIELD_MASTER_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATES_TO])) { + $v = $this->getRelatesTo(); + foreach($validationRules[self::FIELD_RELATES_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_RELATES_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATES_TO])) { + $errs[self::FIELD_RELATES_TO] = []; + } + $errs[self::FIELD_RELATES_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php index 91a75220d2..bab9ee56f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -181,7 +181,7 @@ class FHIREligibilityRequest extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type EligibilityRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREligibilityRequest Constructor @@ -560,11 +560,243 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php index b8f88d50a5..679e865350 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -222,7 +222,7 @@ class FHIREligibilityResponse extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type EligibilityResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREligibilityResponse Constructor @@ -762,11 +762,294 @@ public function setRuleset(FHIRCoding $ruleset = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREncounter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREncounter.php index d357809b9d..2d81b3d908 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREncounter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREncounter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -340,7 +340,7 @@ class FHIREncounter extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Encounter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounter Constructor @@ -1493,11 +1493,463 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAppointment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEpisodeOfCare())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EPISODE_OF_CARE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getHospitalization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HOSPITALIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIncomingReferral())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INCOMING_REFERRAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIndication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LENGTH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getServiceProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStatusHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STATUS_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT])) { + $v = $this->getAppointment(); + foreach($validationRules[self::FIELD_APPOINTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_APPOINTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT])) { + $errs[self::FIELD_APPOINTMENT] = []; + } + $errs[self::FIELD_APPOINTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EPISODE_OF_CARE])) { + $v = $this->getEpisodeOfCare(); + foreach($validationRules[self::FIELD_EPISODE_OF_CARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_EPISODE_OF_CARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EPISODE_OF_CARE])) { + $errs[self::FIELD_EPISODE_OF_CARE] = []; + } + $errs[self::FIELD_EPISODE_OF_CARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HOSPITALIZATION])) { + $v = $this->getHospitalization(); + foreach($validationRules[self::FIELD_HOSPITALIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_HOSPITALIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HOSPITALIZATION])) { + $errs[self::FIELD_HOSPITALIZATION] = []; + } + $errs[self::FIELD_HOSPITALIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCOMING_REFERRAL])) { + $v = $this->getIncomingReferral(); + foreach($validationRules[self::FIELD_INCOMING_REFERRAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_INCOMING_REFERRAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCOMING_REFERRAL])) { + $errs[self::FIELD_INCOMING_REFERRAL] = []; + } + $errs[self::FIELD_INCOMING_REFERRAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION])) { + $v = $this->getIndication(); + foreach($validationRules[self::FIELD_INDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_INDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION])) { + $errs[self::FIELD_INDICATION] = []; + } + $errs[self::FIELD_INDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LENGTH])) { + $v = $this->getLength(); + foreach($validationRules[self::FIELD_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LENGTH])) { + $errs[self::FIELD_LENGTH] = []; + } + $errs[self::FIELD_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_PROVIDER])) { + $v = $this->getServiceProvider(); + foreach($validationRules[self::FIELD_SERVICE_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_SERVICE_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_PROVIDER])) { + $errs[self::FIELD_SERVICE_PROVIDER] = []; + } + $errs[self::FIELD_SERVICE_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_HISTORY])) { + $v = $this->getStatusHistory(); + foreach($validationRules[self::FIELD_STATUS_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_STATUS_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_HISTORY])) { + $errs[self::FIELD_STATUS_HISTORY] = []; + } + $errs[self::FIELD_STATUS_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php index 04fa8ee118..c8402c0484 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -217,7 +217,7 @@ class FHIREnrollmentRequest extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type EnrollmentRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREnrollmentRequest Constructor @@ -707,11 +707,294 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php index 64011daef7..170ba5857c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -222,7 +222,7 @@ class FHIREnrollmentResponse extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type EnrollmentResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREnrollmentResponse Constructor @@ -762,11 +762,294 @@ public function setRuleset(FHIRCoding $ruleset = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php index 9bff30aca2..c7e635b12d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -235,7 +235,7 @@ class FHIREpisodeOfCare extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type EpisodeOfCare * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCare Constructor @@ -949,11 +949,321 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCareManager())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARE_MANAGER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareTeam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferralRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERRAL_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStatusHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STATUS_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CARE_MANAGER])) { + $v = $this->getCareManager(); + foreach($validationRules[self::FIELD_CARE_MANAGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_CARE_MANAGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_MANAGER])) { + $errs[self::FIELD_CARE_MANAGER] = []; + } + $errs[self::FIELD_CARE_MANAGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM])) { + $v = $this->getCareTeam(); + foreach($validationRules[self::FIELD_CARE_TEAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_CARE_TEAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM])) { + $errs[self::FIELD_CARE_TEAM] = []; + } + $errs[self::FIELD_CARE_TEAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL_REQUEST])) { + $v = $this->getReferralRequest(); + foreach($validationRules[self::FIELD_REFERRAL_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_REFERRAL_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL_REQUEST])) { + $errs[self::FIELD_REFERRAL_REQUEST] = []; + } + $errs[self::FIELD_REFERRAL_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_HISTORY])) { + $v = $this->getStatusHistory(); + foreach($validationRules[self::FIELD_STATUS_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_STATUS_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_HISTORY])) { + $errs[self::FIELD_STATUS_HISTORY] = []; + } + $errs[self::FIELD_STATUS_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php index 75d597c0e8..ed206c8eff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -223,7 +223,7 @@ class FHIRExplanationOfBenefit extends FHIRDomainResource implements PHPFHIRCont * Validation map for fields in type ExplanationOfBenefit * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefit Constructor @@ -763,11 +763,294 @@ public function setRuleset(FHIRCoding $ruleset = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php index 73615932c0..f7c15cbd83 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -367,7 +367,7 @@ class FHIRFamilyMemberHistory extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type FamilyMemberHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyMemberHistory Constructor @@ -1499,11 +1499,466 @@ public function setStatus(FHIRFamilyHistoryStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgeQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAgeRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAgeString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGE_QUANTITY])) { + $v = $this->getAgeQuantity(); + foreach($validationRules[self::FIELD_AGE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_AGE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_QUANTITY])) { + $errs[self::FIELD_AGE_QUANTITY] = []; + } + $errs[self::FIELD_AGE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGE_RANGE])) { + $v = $this->getAgeRange(); + foreach($validationRules[self::FIELD_AGE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_AGE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_RANGE])) { + $errs[self::FIELD_AGE_RANGE] = []; + } + $errs[self::FIELD_AGE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGE_STRING])) { + $v = $this->getAgeString(); + foreach($validationRules[self::FIELD_AGE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_AGE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_STRING])) { + $errs[self::FIELD_AGE_STRING] = []; + } + $errs[self::FIELD_AGE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_DATE])) { + $v = $this->getBornDate(); + foreach($validationRules[self::FIELD_BORN_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_BORN_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_DATE])) { + $errs[self::FIELD_BORN_DATE] = []; + } + $errs[self::FIELD_BORN_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_PERIOD])) { + $v = $this->getBornPeriod(); + foreach($validationRules[self::FIELD_BORN_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_BORN_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_PERIOD])) { + $errs[self::FIELD_BORN_PERIOD] = []; + } + $errs[self::FIELD_BORN_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_STRING])) { + $v = $this->getBornString(); + foreach($validationRules[self::FIELD_BORN_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_BORN_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_STRING])) { + $errs[self::FIELD_BORN_STRING] = []; + } + $errs[self::FIELD_BORN_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_BOOLEAN])) { + $v = $this->getDeceasedBoolean(); + foreach($validationRules[self::FIELD_DECEASED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_BOOLEAN])) { + $errs[self::FIELD_DECEASED_BOOLEAN] = []; + } + $errs[self::FIELD_DECEASED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_DATE])) { + $v = $this->getDeceasedDate(); + foreach($validationRules[self::FIELD_DECEASED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_DATE])) { + $errs[self::FIELD_DECEASED_DATE] = []; + } + $errs[self::FIELD_DECEASED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_QUANTITY])) { + $v = $this->getDeceasedQuantity(); + foreach($validationRules[self::FIELD_DECEASED_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_QUANTITY])) { + $errs[self::FIELD_DECEASED_QUANTITY] = []; + } + $errs[self::FIELD_DECEASED_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_RANGE])) { + $v = $this->getDeceasedRange(); + foreach($validationRules[self::FIELD_DECEASED_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_RANGE])) { + $errs[self::FIELD_DECEASED_RANGE] = []; + } + $errs[self::FIELD_DECEASED_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_STRING])) { + $v = $this->getDeceasedString(); + foreach($validationRules[self::FIELD_DECEASED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_STRING])) { + $errs[self::FIELD_DECEASED_STRING] = []; + } + $errs[self::FIELD_DECEASED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFlag.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFlag.php index cb57465407..4d1d46224a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFlag.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFlag.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -194,7 +194,7 @@ class FHIRFlag extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Flag * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFlag Constructor @@ -604,11 +604,260 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGoal.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGoal.php index 895c71c992..20fb2d6437 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -307,7 +307,7 @@ class FHIRGoal extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Goal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGoal Constructor @@ -1278,11 +1278,404 @@ public function setTargetQuantity(FHIRDuration $targetQuantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAddresses())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESSES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutcome())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTCOME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStartCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStartDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESSES])) { + $v = $this->getAddresses(); + foreach($validationRules[self::FIELD_ADDRESSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_ADDRESSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESSES])) { + $errs[self::FIELD_ADDRESSES] = []; + } + $errs[self::FIELD_ADDRESSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START_CODEABLE_CONCEPT])) { + $v = $this->getStartCodeableConcept(); + foreach($validationRules[self::FIELD_START_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_START_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START_CODEABLE_CONCEPT])) { + $errs[self::FIELD_START_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_START_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START_DATE])) { + $v = $this->getStartDate(); + foreach($validationRules[self::FIELD_START_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_START_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START_DATE])) { + $errs[self::FIELD_START_DATE] = []; + } + $errs[self::FIELD_START_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_DATE])) { + $v = $this->getStatusDate(); + foreach($validationRules[self::FIELD_STATUS_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_STATUS_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_DATE])) { + $errs[self::FIELD_STATUS_DATE] = []; + } + $errs[self::FIELD_STATUS_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_DATE])) { + $v = $this->getTargetDate(); + foreach($validationRules[self::FIELD_TARGET_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_TARGET_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_DATE])) { + $errs[self::FIELD_TARGET_DATE] = []; + } + $errs[self::FIELD_TARGET_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_QUANTITY])) { + $v = $this->getTargetQuantity(); + foreach($validationRules[self::FIELD_TARGET_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_TARGET_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_QUANTITY])) { + $errs[self::FIELD_TARGET_QUANTITY] = []; + } + $errs[self::FIELD_TARGET_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGroup.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGroup.php index 304591b3b2..36aec43af8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -197,7 +197,7 @@ class FHIRGroup extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroup Constructor @@ -743,11 +743,264 @@ public function setType(FHIRGroupType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActual())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTUAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMember())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTUAL])) { + $v = $this->getActual(); + foreach($validationRules[self::FIELD_ACTUAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_ACTUAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTUAL])) { + $errs[self::FIELD_ACTUAL] = []; + } + $errs[self::FIELD_ACTUAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC])) { + $v = $this->getCharacteristic(); + foreach($validationRules[self::FIELD_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC])) { + $errs[self::FIELD_CHARACTERISTIC] = []; + } + $errs[self::FIELD_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEMBER])) { + $v = $this->getMember(); + foreach($validationRules[self::FIELD_MEMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_MEMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEMBER])) { + $errs[self::FIELD_MEMBER] = []; + } + $errs[self::FIELD_MEMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php index 039f9c59aa..281b975d7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -382,7 +382,7 @@ class FHIRHealthcareService extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type HealthcareService * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareService Constructor @@ -1841,11 +1841,516 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAppointmentRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailabilityExceptions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAvailableTime())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AVAILABLE_TIME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCoverageArea())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COVERAGE_AREA, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEligibility())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELIGIBILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getEligibilityNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELIGIBILITY_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExtraDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXTRA_DETAILS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNotAvailable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOT_AVAILABLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPhoto())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHOTO] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_NAME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProvidedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDED_BY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublicKey())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLIC_KEY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferralMethod())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERRAL_METHOD, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getServiceCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getServiceName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getServiceProvisionCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_PROVISION_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getServiceType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT_REQUIRED])) { + $v = $this->getAppointmentRequired(); + foreach($validationRules[self::FIELD_APPOINTMENT_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_APPOINTMENT_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT_REQUIRED])) { + $errs[self::FIELD_APPOINTMENT_REQUIRED] = []; + } + $errs[self::FIELD_APPOINTMENT_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $v = $this->getAvailabilityExceptions(); + foreach($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_AVAILABILITY_EXCEPTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = []; + } + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_TIME])) { + $v = $this->getAvailableTime(); + foreach($validationRules[self::FIELD_AVAILABLE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_AVAILABLE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_TIME])) { + $errs[self::FIELD_AVAILABLE_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC])) { + $v = $this->getCharacteristic(); + foreach($validationRules[self::FIELD_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC])) { + $errs[self::FIELD_CHARACTERISTIC] = []; + } + $errs[self::FIELD_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE_AREA])) { + $v = $this->getCoverageArea(); + foreach($validationRules[self::FIELD_COVERAGE_AREA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_COVERAGE_AREA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE_AREA])) { + $errs[self::FIELD_COVERAGE_AREA] = []; + } + $errs[self::FIELD_COVERAGE_AREA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELIGIBILITY])) { + $v = $this->getEligibility(); + foreach($validationRules[self::FIELD_ELIGIBILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_ELIGIBILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELIGIBILITY])) { + $errs[self::FIELD_ELIGIBILITY] = []; + } + $errs[self::FIELD_ELIGIBILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELIGIBILITY_NOTE])) { + $v = $this->getEligibilityNote(); + foreach($validationRules[self::FIELD_ELIGIBILITY_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_ELIGIBILITY_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELIGIBILITY_NOTE])) { + $errs[self::FIELD_ELIGIBILITY_NOTE] = []; + } + $errs[self::FIELD_ELIGIBILITY_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTRA_DETAILS])) { + $v = $this->getExtraDetails(); + foreach($validationRules[self::FIELD_EXTRA_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_EXTRA_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTRA_DETAILS])) { + $errs[self::FIELD_EXTRA_DETAILS] = []; + } + $errs[self::FIELD_EXTRA_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_AVAILABLE])) { + $v = $this->getNotAvailable(); + foreach($validationRules[self::FIELD_NOT_AVAILABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_NOT_AVAILABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_AVAILABLE])) { + $errs[self::FIELD_NOT_AVAILABLE] = []; + } + $errs[self::FIELD_NOT_AVAILABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_NAME])) { + $v = $this->getProgramName(); + foreach($validationRules[self::FIELD_PROGRAM_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_PROGRAM_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_NAME])) { + $errs[self::FIELD_PROGRAM_NAME] = []; + } + $errs[self::FIELD_PROGRAM_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDED_BY])) { + $v = $this->getProvidedBy(); + foreach($validationRules[self::FIELD_PROVIDED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_PROVIDED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDED_BY])) { + $errs[self::FIELD_PROVIDED_BY] = []; + } + $errs[self::FIELD_PROVIDED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLIC_KEY])) { + $v = $this->getPublicKey(); + foreach($validationRules[self::FIELD_PUBLIC_KEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_PUBLIC_KEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLIC_KEY])) { + $errs[self::FIELD_PUBLIC_KEY] = []; + } + $errs[self::FIELD_PUBLIC_KEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL_METHOD])) { + $v = $this->getReferralMethod(); + foreach($validationRules[self::FIELD_REFERRAL_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_REFERRAL_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL_METHOD])) { + $errs[self::FIELD_REFERRAL_METHOD] = []; + } + $errs[self::FIELD_REFERRAL_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_CATEGORY])) { + $v = $this->getServiceCategory(); + foreach($validationRules[self::FIELD_SERVICE_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_SERVICE_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_CATEGORY])) { + $errs[self::FIELD_SERVICE_CATEGORY] = []; + } + $errs[self::FIELD_SERVICE_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_NAME])) { + $v = $this->getServiceName(); + foreach($validationRules[self::FIELD_SERVICE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_SERVICE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_NAME])) { + $errs[self::FIELD_SERVICE_NAME] = []; + } + $errs[self::FIELD_SERVICE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_PROVISION_CODE])) { + $v = $this->getServiceProvisionCode(); + foreach($validationRules[self::FIELD_SERVICE_PROVISION_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_SERVICE_PROVISION_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_PROVISION_CODE])) { + $errs[self::FIELD_SERVICE_PROVISION_CODE] = []; + } + $errs[self::FIELD_SERVICE_PROVISION_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_TYPE])) { + $v = $this->getServiceType(); + foreach($validationRules[self::FIELD_SERVICE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_SERVICE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_TYPE])) { + $errs[self::FIELD_SERVICE_TYPE] = []; + } + $errs[self::FIELD_SERVICE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelection.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelection.php index 994490e8e2..c0909164d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelection.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -213,7 +213,7 @@ class FHIRImagingObjectSelection extends FHIRDomainResource implements PHPFHIRCo * Validation map for fields in type ImagingObjectSelection * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_STUDY => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -692,11 +692,243 @@ public function setUid($uid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthoringTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORING_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStudy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STUDY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORING_TIME])) { + $v = $this->getAuthoringTime(); + foreach($validationRules[self::FIELD_AUTHORING_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION, self::FIELD_AUTHORING_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORING_TIME])) { + $errs[self::FIELD_AUTHORING_TIME] = []; + } + $errs[self::FIELD_AUTHORING_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY])) { + $v = $this->getStudy(); + foreach($validationRules[self::FIELD_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION, self::FIELD_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY])) { + $errs[self::FIELD_STUDY] = []; + } + $errs[self::FIELD_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_OBJECT_SELECTION, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php index cc97c35948..ef70d4fde7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -310,7 +310,7 @@ class FHIRImagingStudy extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type ImagingStudy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudy Constructor @@ -1323,11 +1323,404 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccession())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailability())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInterpreter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTERPRETER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModalityList())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODALITY_LIST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNumberOfInstances())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_SERIES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOrder())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ORDER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcedure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReferrer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSeries())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERIES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStarted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STARTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCESSION])) { + $v = $this->getAccession(); + foreach($validationRules[self::FIELD_ACCESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_ACCESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCESSION])) { + $errs[self::FIELD_ACCESSION] = []; + } + $errs[self::FIELD_ACCESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY])) { + $v = $this->getAvailability(); + foreach($validationRules[self::FIELD_AVAILABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_AVAILABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY])) { + $errs[self::FIELD_AVAILABILITY] = []; + } + $errs[self::FIELD_AVAILABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERPRETER])) { + $v = $this->getInterpreter(); + foreach($validationRules[self::FIELD_INTERPRETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_INTERPRETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERPRETER])) { + $errs[self::FIELD_INTERPRETER] = []; + } + $errs[self::FIELD_INTERPRETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODALITY_LIST])) { + $v = $this->getModalityList(); + foreach($validationRules[self::FIELD_MODALITY_LIST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_MODALITY_LIST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODALITY_LIST])) { + $errs[self::FIELD_MODALITY_LIST] = []; + } + $errs[self::FIELD_MODALITY_LIST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_INSTANCES])) { + $v = $this->getNumberOfInstances(); + foreach($validationRules[self::FIELD_NUMBER_OF_INSTANCES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_NUMBER_OF_INSTANCES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_INSTANCES])) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = []; + } + $errs[self::FIELD_NUMBER_OF_INSTANCES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_SERIES])) { + $v = $this->getNumberOfSeries(); + foreach($validationRules[self::FIELD_NUMBER_OF_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_NUMBER_OF_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_SERIES])) { + $errs[self::FIELD_NUMBER_OF_SERIES] = []; + } + $errs[self::FIELD_NUMBER_OF_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDER])) { + $v = $this->getOrder(); + foreach($validationRules[self::FIELD_ORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_ORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDER])) { + $errs[self::FIELD_ORDER] = []; + } + $errs[self::FIELD_ORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRER])) { + $v = $this->getReferrer(); + foreach($validationRules[self::FIELD_REFERRER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_REFERRER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRER])) { + $errs[self::FIELD_REFERRER] = []; + } + $errs[self::FIELD_REFERRER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STARTED])) { + $v = $this->getStarted(); + foreach($validationRules[self::FIELD_STARTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_STARTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STARTED])) { + $errs[self::FIELD_STARTED] = []; + } + $errs[self::FIELD_STARTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunization.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunization.php index b9f24cd8cf..18ed4e7f89 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -366,7 +366,7 @@ class FHIRImmunization extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Immunization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunization Constructor @@ -1502,11 +1502,487 @@ public function setWasNotGiven($wasNotGiven = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpirationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExplanation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPLANATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReaction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReported())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVaccinationProtocol())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VACCINATION_PROTOCOL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVaccineCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VACCINE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWasNotGiven())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WAS_NOT_GIVEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_QUANTITY])) { + $v = $this->getDoseQuantity(); + foreach($validationRules[self::FIELD_DOSE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_DOSE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_QUANTITY])) { + $errs[self::FIELD_DOSE_QUANTITY] = []; + } + $errs[self::FIELD_DOSE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPIRATION_DATE])) { + $v = $this->getExpirationDate(); + foreach($validationRules[self::FIELD_EXPIRATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_EXPIRATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRATION_DATE])) { + $errs[self::FIELD_EXPIRATION_DATE] = []; + } + $errs[self::FIELD_EXPIRATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPLANATION])) { + $v = $this->getExplanation(); + foreach($validationRules[self::FIELD_EXPLANATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_EXPLANATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPLANATION])) { + $errs[self::FIELD_EXPLANATION] = []; + } + $errs[self::FIELD_EXPLANATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REACTION])) { + $v = $this->getReaction(); + foreach($validationRules[self::FIELD_REACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REACTION])) { + $errs[self::FIELD_REACTION] = []; + } + $errs[self::FIELD_REACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTED])) { + $v = $this->getReported(); + foreach($validationRules[self::FIELD_REPORTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REPORTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTED])) { + $errs[self::FIELD_REPORTED] = []; + } + $errs[self::FIELD_REPORTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINATION_PROTOCOL])) { + $v = $this->getVaccinationProtocol(); + foreach($validationRules[self::FIELD_VACCINATION_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_VACCINATION_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINATION_PROTOCOL])) { + $errs[self::FIELD_VACCINATION_PROTOCOL] = []; + } + $errs[self::FIELD_VACCINATION_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINE_CODE])) { + $v = $this->getVaccineCode(); + foreach($validationRules[self::FIELD_VACCINE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_VACCINE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINE_CODE])) { + $errs[self::FIELD_VACCINE_CODE] = []; + } + $errs[self::FIELD_VACCINE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WAS_NOT_GIVEN])) { + $v = $this->getWasNotGiven(); + foreach($validationRules[self::FIELD_WAS_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_WAS_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WAS_NOT_GIVEN])) { + $errs[self::FIELD_WAS_NOT_GIVEN] = []; + } + $errs[self::FIELD_WAS_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php index 33c97211c0..151c0d3ce6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRImmunizationRecommendation extends FHIRDomainResource implements PHPFH * Validation map for fields in type ImmunizationRecommendation * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RECOMMENDATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -365,11 +365,177 @@ public function setRecommendation(array $recommendation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecommendation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECOMMENDATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECOMMENDATION])) { + $v = $this->getRecommendation(); + foreach($validationRules[self::FIELD_RECOMMENDATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_RECOMMENDATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECOMMENDATION])) { + $errs[self::FIELD_RECOMMENDATION] = []; + } + $errs[self::FIELD_RECOMMENDATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php index 318133e35c..aa8d81650c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -345,7 +345,7 @@ class FHIRImplementationGuide extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type ImplementationGuide * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PACKAGE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1584,11 +1584,423 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBinary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BINARY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDependency())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEPENDENCY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFhirVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FHIR_VERSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGlobal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GLOBAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPackage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PACKAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BINARY])) { + $v = $this->getBinary(); + foreach($validationRules[self::FIELD_BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINARY])) { + $errs[self::FIELD_BINARY] = []; + } + $errs[self::FIELD_BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDENCY])) { + $v = $this->getDependency(); + foreach($validationRules[self::FIELD_DEPENDENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_DEPENDENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDENCY])) { + $errs[self::FIELD_DEPENDENCY] = []; + } + $errs[self::FIELD_DEPENDENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GLOBAL])) { + $v = $this->getGlobal(); + foreach($validationRules[self::FIELD_GLOBAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_GLOBAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GLOBAL])) { + $errs[self::FIELD_GLOBAL] = []; + } + $errs[self::FIELD_GLOBAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE])) { + $v = $this->getPackage(); + foreach($validationRules[self::FIELD_PACKAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_PACKAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE])) { + $errs[self::FIELD_PACKAGE] = []; + } + $errs[self::FIELD_PACKAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAGE])) { + $v = $this->getPage(); + foreach($validationRules[self::FIELD_PAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_PAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAGE])) { + $errs[self::FIELD_PAGE] = []; + } + $errs[self::FIELD_PAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRList.php index e3a06eeb96..3d02485a3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -263,7 +263,7 @@ class FHIRList extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type List * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRList Constructor @@ -986,11 +986,347 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEmptyReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EMPTY_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTRY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_BY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EMPTY_REASON])) { + $v = $this->getEmptyReason(); + foreach($validationRules[self::FIELD_EMPTY_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_EMPTY_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EMPTY_REASON])) { + $errs[self::FIELD_EMPTY_REASON] = []; + } + $errs[self::FIELD_EMPTY_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTRY])) { + $v = $this->getEntry(); + foreach($validationRules[self::FIELD_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY])) { + $errs[self::FIELD_ENTRY] = []; + } + $errs[self::FIELD_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_BY])) { + $v = $this->getOrderedBy(); + foreach($validationRules[self::FIELD_ORDERED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ORDERED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_BY])) { + $errs[self::FIELD_ORDERED_BY] = []; + } + $errs[self::FIELD_ORDERED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRLocation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRLocation.php index 0fe1e98962..b91ac7c147 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -252,7 +252,7 @@ class FHIRLocation extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Location * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocation Constructor @@ -916,11 +916,330 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if (null !== ($v = $this->getPhysicalType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHYSICAL_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPosition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHYSICAL_TYPE])) { + $v = $this->getPhysicalType(); + foreach($validationRules[self::FIELD_PHYSICAL_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_PHYSICAL_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHYSICAL_TYPE])) { + $errs[self::FIELD_PHYSICAL_TYPE] = []; + } + $errs[self::FIELD_PHYSICAL_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POSITION])) { + $v = $this->getPosition(); + foreach($validationRules[self::FIELD_POSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_POSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POSITION])) { + $errs[self::FIELD_POSITION] = []; + } + $errs[self::FIELD_POSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedia.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedia.php index ceec739560..c7515ce42f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedia.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedia.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -257,7 +257,7 @@ class FHIRMedia extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Media * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedia Constructor @@ -949,11 +949,328 @@ public function setWidth($width = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrames())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FRAMES] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeight())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEIGHT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOperator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtype())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getView())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VIEW] = $fieldErrs; + } + } + if (null !== ($v = $this->getWidth())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WIDTH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE_NAME])) { + $v = $this->getDeviceName(); + foreach($validationRules[self::FIELD_DEVICE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_DEVICE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE_NAME])) { + $errs[self::FIELD_DEVICE_NAME] = []; + } + $errs[self::FIELD_DEVICE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FRAMES])) { + $v = $this->getFrames(); + foreach($validationRules[self::FIELD_FRAMES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_FRAMES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRAMES])) { + $errs[self::FIELD_FRAMES] = []; + } + $errs[self::FIELD_FRAMES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEIGHT])) { + $v = $this->getHeight(); + foreach($validationRules[self::FIELD_HEIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_HEIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEIGHT])) { + $errs[self::FIELD_HEIGHT] = []; + } + $errs[self::FIELD_HEIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATOR])) { + $v = $this->getOperator(); + foreach($validationRules[self::FIELD_OPERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_OPERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATOR])) { + $errs[self::FIELD_OPERATOR] = []; + } + $errs[self::FIELD_OPERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTYPE])) { + $v = $this->getSubtype(); + foreach($validationRules[self::FIELD_SUBTYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_SUBTYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTYPE])) { + $errs[self::FIELD_SUBTYPE] = []; + } + $errs[self::FIELD_SUBTYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VIEW])) { + $v = $this->getView(); + foreach($validationRules[self::FIELD_VIEW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_VIEW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VIEW])) { + $errs[self::FIELD_VIEW] = []; + } + $errs[self::FIELD_VIEW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WIDTH])) { + $v = $this->getWidth(); + foreach($validationRules[self::FIELD_WIDTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_WIDTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WIDTH])) { + $errs[self::FIELD_WIDTH] = []; + } + $errs[self::FIELD_WIDTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedication.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedication.php index 1b3e67d60d..a4947f5adc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedication.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -154,7 +154,7 @@ class FHIRMedication extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type Medication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedication Constructor @@ -414,11 +414,207 @@ public function setProduct(FHIRMedicationProduct $product = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsBrand())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_BRAND] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPackage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PACKAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProduct())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_BRAND])) { + $v = $this->getIsBrand(); + foreach($validationRules[self::FIELD_IS_BRAND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_IS_BRAND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_BRAND])) { + $errs[self::FIELD_IS_BRAND] = []; + } + $errs[self::FIELD_IS_BRAND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE])) { + $v = $this->getPackage(); + foreach($validationRules[self::FIELD_PACKAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_PACKAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE])) { + $errs[self::FIELD_PACKAGE] = []; + } + $errs[self::FIELD_PACKAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT])) { + $v = $this->getProduct(); + foreach($validationRules[self::FIELD_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT])) { + $errs[self::FIELD_PRODUCT] = []; + } + $errs[self::FIELD_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php index 5052d24b46..e3887d7de8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -325,7 +325,7 @@ class FHIRMedicationAdministration extends FHIRDomainResource implements PHPFHIR * Validation map for fields in type MedicationAdministration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministration Constructor @@ -1271,11 +1271,402 @@ public function setWasNotGiven($wasNotGiven = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEVICE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveTimeDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_TIME_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveTimePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_TIME_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPractitioner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTITIONER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_GIVEN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonNotGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_NOT_GIVEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getWasNotGiven())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WAS_NOT_GIVEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_TIME_DATE_TIME])) { + $v = $this->getEffectiveTimeDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_TIME_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_EFFECTIVE_TIME_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_TIME_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_TIME_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_TIME_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_TIME_PERIOD])) { + $v = $this->getEffectiveTimePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_TIME_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_EFFECTIVE_TIME_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_TIME_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_TIME_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_TIME_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRACTITIONER])) { + $v = $this->getPractitioner(); + foreach($validationRules[self::FIELD_PRACTITIONER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PRACTITIONER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRACTITIONER])) { + $errs[self::FIELD_PRACTITIONER] = []; + } + $errs[self::FIELD_PRACTITIONER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIPTION])) { + $v = $this->getPrescription(); + foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIPTION])) { + $errs[self::FIELD_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_GIVEN])) { + $v = $this->getReasonGiven(); + foreach($validationRules[self::FIELD_REASON_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_REASON_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_GIVEN])) { + $errs[self::FIELD_REASON_GIVEN] = []; + } + $errs[self::FIELD_REASON_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_NOT_GIVEN])) { + $v = $this->getReasonNotGiven(); + foreach($validationRules[self::FIELD_REASON_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_REASON_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_NOT_GIVEN])) { + $errs[self::FIELD_REASON_NOT_GIVEN] = []; + } + $errs[self::FIELD_REASON_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WAS_NOT_GIVEN])) { + $v = $this->getWasNotGiven(); + foreach($validationRules[self::FIELD_WAS_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_WAS_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WAS_NOT_GIVEN])) { + $errs[self::FIELD_WAS_NOT_GIVEN] = []; + } + $errs[self::FIELD_WAS_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php index c742d9982f..cdf08c4ff1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -322,7 +322,7 @@ class FHIRMedicationDispense extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type MedicationDispense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispense Constructor @@ -1234,11 +1234,417 @@ public function setWhenPrepared($whenPrepared = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAuthorizingPrescription())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHORIZING_PRESCRIPTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDaysSupply())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DAYS_SUPPLY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDispenser())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPENSER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDosageInstruction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE_INSTRUCTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReceiver())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECEIVER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstitution())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTITUTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenHandedOver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_HANDED_OVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenPrepared())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_PREPARED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORIZING_PRESCRIPTION])) { + $v = $this->getAuthorizingPrescription(); + foreach($validationRules[self::FIELD_AUTHORIZING_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_AUTHORIZING_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORIZING_PRESCRIPTION])) { + $errs[self::FIELD_AUTHORIZING_PRESCRIPTION] = []; + } + $errs[self::FIELD_AUTHORIZING_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAYS_SUPPLY])) { + $v = $this->getDaysSupply(); + foreach($validationRules[self::FIELD_DAYS_SUPPLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DAYS_SUPPLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAYS_SUPPLY])) { + $errs[self::FIELD_DAYS_SUPPLY] = []; + } + $errs[self::FIELD_DAYS_SUPPLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPENSER])) { + $v = $this->getDispenser(); + foreach($validationRules[self::FIELD_DISPENSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DISPENSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSER])) { + $errs[self::FIELD_DISPENSER] = []; + } + $errs[self::FIELD_DISPENSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE_INSTRUCTION])) { + $v = $this->getDosageInstruction(); + foreach($validationRules[self::FIELD_DOSAGE_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DOSAGE_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE_INSTRUCTION])) { + $errs[self::FIELD_DOSAGE_INSTRUCTION] = []; + } + $errs[self::FIELD_DOSAGE_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTITUTION])) { + $v = $this->getSubstitution(); + foreach($validationRules[self::FIELD_SUBSTITUTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_SUBSTITUTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTITUTION])) { + $errs[self::FIELD_SUBSTITUTION] = []; + } + $errs[self::FIELD_SUBSTITUTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_HANDED_OVER])) { + $v = $this->getWhenHandedOver(); + foreach($validationRules[self::FIELD_WHEN_HANDED_OVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_WHEN_HANDED_OVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_HANDED_OVER])) { + $errs[self::FIELD_WHEN_HANDED_OVER] = []; + } + $errs[self::FIELD_WHEN_HANDED_OVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_PREPARED])) { + $v = $this->getWhenPrepared(); + foreach($validationRules[self::FIELD_WHEN_PREPARED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_WHEN_PREPARED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_PREPARED])) { + $errs[self::FIELD_WHEN_PREPARED] = []; + } + $errs[self::FIELD_WHEN_PREPARED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationOrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationOrder.php index f592d925aa..ab655325a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -340,7 +340,7 @@ class FHIRMedicationOrder extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type MedicationOrder * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationOrder Constructor @@ -1253,11 +1253,415 @@ public function setSubstitution(FHIRMedicationOrderSubstitution $substitution = } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDateEnded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_ENDED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateWritten())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_WRITTEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDispenseRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPENSE_REQUEST] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDosageInstruction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE_INSTRUCTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescriber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriorPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIOR_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonEnded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_ENDED] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstitution())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTITUTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE_ENDED])) { + $v = $this->getDateEnded(); + foreach($validationRules[self::FIELD_DATE_ENDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_DATE_ENDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_ENDED])) { + $errs[self::FIELD_DATE_ENDED] = []; + } + $errs[self::FIELD_DATE_ENDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_WRITTEN])) { + $v = $this->getDateWritten(); + foreach($validationRules[self::FIELD_DATE_WRITTEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_DATE_WRITTEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_WRITTEN])) { + $errs[self::FIELD_DATE_WRITTEN] = []; + } + $errs[self::FIELD_DATE_WRITTEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPENSE_REQUEST])) { + $v = $this->getDispenseRequest(); + foreach($validationRules[self::FIELD_DISPENSE_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_DISPENSE_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSE_REQUEST])) { + $errs[self::FIELD_DISPENSE_REQUEST] = []; + } + $errs[self::FIELD_DISPENSE_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE_INSTRUCTION])) { + $v = $this->getDosageInstruction(); + foreach($validationRules[self::FIELD_DOSAGE_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_DOSAGE_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE_INSTRUCTION])) { + $errs[self::FIELD_DOSAGE_INSTRUCTION] = []; + } + $errs[self::FIELD_DOSAGE_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIBER])) { + $v = $this->getPrescriber(); + foreach($validationRules[self::FIELD_PRESCRIBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_PRESCRIBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIBER])) { + $errs[self::FIELD_PRESCRIBER] = []; + } + $errs[self::FIELD_PRESCRIBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIOR_PRESCRIPTION])) { + $v = $this->getPriorPrescription(); + foreach($validationRules[self::FIELD_PRIOR_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_PRIOR_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIOR_PRESCRIPTION])) { + $errs[self::FIELD_PRIOR_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRIOR_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_ENDED])) { + $v = $this->getReasonEnded(); + foreach($validationRules[self::FIELD_REASON_ENDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_REASON_ENDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_ENDED])) { + $errs[self::FIELD_REASON_ENDED] = []; + } + $errs[self::FIELD_REASON_ENDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTITUTION])) { + $v = $this->getSubstitution(); + foreach($validationRules[self::FIELD_SUBSTITUTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER, self::FIELD_SUBSTITUTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTITUTION])) { + $errs[self::FIELD_SUBSTITUTION] = []; + } + $errs[self::FIELD_SUBSTITUTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php index c4bc875eda..16eaf69adf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -351,7 +351,7 @@ class FHIRMedicationStatement extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type MedicationStatement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatement Constructor @@ -1357,11 +1357,402 @@ public function setWasNotTaken($wasNotTaken = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDateAsserted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_ASSERTED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDosage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInformationSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INFORMATION_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonForUseCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_FOR_USE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonForUseReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_FOR_USE_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonNotTaken())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_NOT_TAKEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getWasNotTaken())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WAS_NOT_TAKEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE_ASSERTED])) { + $v = $this->getDateAsserted(); + foreach($validationRules[self::FIELD_DATE_ASSERTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_DATE_ASSERTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_ASSERTED])) { + $errs[self::FIELD_DATE_ASSERTED] = []; + } + $errs[self::FIELD_DATE_ASSERTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORMATION_SOURCE])) { + $v = $this->getInformationSource(); + foreach($validationRules[self::FIELD_INFORMATION_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_INFORMATION_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORMATION_SOURCE])) { + $errs[self::FIELD_INFORMATION_SOURCE] = []; + } + $errs[self::FIELD_INFORMATION_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_FOR_USE_CODEABLE_CONCEPT])) { + $v = $this->getReasonForUseCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_FOR_USE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_REASON_FOR_USE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_FOR_USE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_FOR_USE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_FOR_USE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_FOR_USE_REFERENCE])) { + $v = $this->getReasonForUseReference(); + foreach($validationRules[self::FIELD_REASON_FOR_USE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_REASON_FOR_USE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_FOR_USE_REFERENCE])) { + $errs[self::FIELD_REASON_FOR_USE_REFERENCE] = []; + } + $errs[self::FIELD_REASON_FOR_USE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_NOT_TAKEN])) { + $v = $this->getReasonNotTaken(); + foreach($validationRules[self::FIELD_REASON_NOT_TAKEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_REASON_NOT_TAKEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_NOT_TAKEN])) { + $errs[self::FIELD_REASON_NOT_TAKEN] = []; + } + $errs[self::FIELD_REASON_NOT_TAKEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WAS_NOT_TAKEN])) { + $v = $this->getWasNotTaken(); + foreach($validationRules[self::FIELD_WAS_NOT_TAKEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_WAS_NOT_TAKEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WAS_NOT_TAKEN])) { + $errs[self::FIELD_WAS_NOT_TAKEN] = []; + } + $errs[self::FIELD_WAS_NOT_TAKEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php index 6e4342acfb..6486a57cd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -247,7 +247,7 @@ class FHIRMessageHeader extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type MessageHeader * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeader Constructor @@ -839,11 +839,313 @@ public function setTimestamp($timestamp = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getData())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDestination())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESTINATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getReceiver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimestamp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMESTAMP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMESTAMP])) { + $v = $this->getTimestamp(); + foreach($validationRules[self::FIELD_TIMESTAMP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_TIMESTAMP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMESTAMP])) { + $errs[self::FIELD_TIMESTAMP] = []; + } + $errs[self::FIELD_TIMESTAMP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php index 4fcdbfb842..049e2ef1a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -277,7 +277,7 @@ class FHIRNamingSystem extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type NamingSystem * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_UNIQUE_ID => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1144,11 +1144,349 @@ public function setUseContext(array $useContext = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReplacedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPLACED_BY] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUniqueId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UNIQUE_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACED_BY])) { + $v = $this->getReplacedBy(); + foreach($validationRules[self::FIELD_REPLACED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_REPLACED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACED_BY])) { + $errs[self::FIELD_REPLACED_BY] = []; + } + $errs[self::FIELD_REPLACED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIQUE_ID])) { + $v = $this->getUniqueId(); + foreach($validationRules[self::FIELD_UNIQUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_UNIQUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIQUE_ID])) { + $errs[self::FIELD_UNIQUE_ID] = []; + } + $errs[self::FIELD_UNIQUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php index f32ebb7034..84ddebbec1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -261,7 +261,7 @@ class FHIRNutritionOrder extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type NutritionOrder * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrder Constructor @@ -1034,11 +1034,336 @@ public function setSupplement(array $supplement = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAllergyIntolerance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALLERGY_INTOLERANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnteralFormula())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERAL_FORMULA] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExcludeFoodModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCLUDE_FOOD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFoodPreferenceModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOOD_PREFERENCE_MODIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOralDiet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORAL_DIET] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupplement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPLEMENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALLERGY_INTOLERANCE])) { + $v = $this->getAllergyIntolerance(); + foreach($validationRules[self::FIELD_ALLERGY_INTOLERANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ALLERGY_INTOLERANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLERGY_INTOLERANCE])) { + $errs[self::FIELD_ALLERGY_INTOLERANCE] = []; + } + $errs[self::FIELD_ALLERGY_INTOLERANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERAL_FORMULA])) { + $v = $this->getEnteralFormula(); + foreach($validationRules[self::FIELD_ENTERAL_FORMULA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ENTERAL_FORMULA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERAL_FORMULA])) { + $errs[self::FIELD_ENTERAL_FORMULA] = []; + } + $errs[self::FIELD_ENTERAL_FORMULA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE_FOOD_MODIFIER])) { + $v = $this->getExcludeFoodModifier(); + foreach($validationRules[self::FIELD_EXCLUDE_FOOD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_EXCLUDE_FOOD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE_FOOD_MODIFIER])) { + $errs[self::FIELD_EXCLUDE_FOOD_MODIFIER] = []; + } + $errs[self::FIELD_EXCLUDE_FOOD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOOD_PREFERENCE_MODIFIER])) { + $v = $this->getFoodPreferenceModifier(); + foreach($validationRules[self::FIELD_FOOD_PREFERENCE_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_FOOD_PREFERENCE_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOOD_PREFERENCE_MODIFIER])) { + $errs[self::FIELD_FOOD_PREFERENCE_MODIFIER] = []; + } + $errs[self::FIELD_FOOD_PREFERENCE_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORAL_DIET])) { + $v = $this->getOralDiet(); + foreach($validationRules[self::FIELD_ORAL_DIET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ORAL_DIET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORAL_DIET])) { + $errs[self::FIELD_ORAL_DIET] = []; + } + $errs[self::FIELD_ORAL_DIET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERER])) { + $v = $this->getOrderer(); + foreach($validationRules[self::FIELD_ORDERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ORDERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERER])) { + $errs[self::FIELD_ORDERER] = []; + } + $errs[self::FIELD_ORDERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLEMENT])) { + $v = $this->getSupplement(); + foreach($validationRules[self::FIELD_SUPPLEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_SUPPLEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLEMENT])) { + $errs[self::FIELD_SUPPLEMENT] = []; + } + $errs[self::FIELD_SUPPLEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRObservation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRObservation.php index e421b34529..fbda44c7b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRObservation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRObservation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -524,7 +524,7 @@ class FHIRObservation extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type Observation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservation Constructor @@ -2138,11 +2138,642 @@ public function setValueTime($valueTime = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComments())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENTS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPONENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDataAbsentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ABSENT_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInterpretation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTERPRETATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReferenceRange())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_RANGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecimen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENTS])) { + $v = $this->getComments(); + foreach($validationRules[self::FIELD_COMMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_COMMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENTS])) { + $errs[self::FIELD_COMMENTS] = []; + } + $errs[self::FIELD_COMMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPONENT])) { + $v = $this->getComponent(); + foreach($validationRules[self::FIELD_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPONENT])) { + $errs[self::FIELD_COMPONENT] = []; + } + $errs[self::FIELD_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_ABSENT_REASON])) { + $v = $this->getDataAbsentReason(); + foreach($validationRules[self::FIELD_DATA_ABSENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_DATA_ABSENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_ABSENT_REASON])) { + $errs[self::FIELD_DATA_ABSENT_REASON] = []; + } + $errs[self::FIELD_DATA_ABSENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERPRETATION])) { + $v = $this->getInterpretation(); + foreach($validationRules[self::FIELD_INTERPRETATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_INTERPRETATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERPRETATION])) { + $errs[self::FIELD_INTERPRETATION] = []; + } + $errs[self::FIELD_INTERPRETATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_RANGE])) { + $v = $this->getReferenceRange(); + foreach($validationRules[self::FIELD_REFERENCE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_REFERENCE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_RANGE])) { + $errs[self::FIELD_REFERENCE_RANGE] = []; + } + $errs[self::FIELD_REFERENCE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php index b9284d4235..65e6b30956 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -358,7 +358,7 @@ class FHIROperationDefinition extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type OperationDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinition Constructor @@ -1638,11 +1638,451 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdempotent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDEMPOTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getInstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotes())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOTES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDEMPOTENT])) { + $v = $this->getIdempotent(); + foreach($validationRules[self::FIELD_IDEMPOTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_IDEMPOTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDEMPOTENT])) { + $errs[self::FIELD_IDEMPOTENT] = []; + } + $errs[self::FIELD_IDEMPOTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php index 0d287bcf37..2d613c074f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIROperationOutcome extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type OperationOutcome * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ISSUE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -223,11 +223,141 @@ public function setIssue(array $issue = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getIssue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ISSUE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ISSUE])) { + $v = $this->getIssue(); + foreach($validationRules[self::FIELD_ISSUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME, self::FIELD_ISSUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUE])) { + $errs[self::FIELD_ISSUE] = []; + } + $errs[self::FIELD_ISSUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrder.php index fcdca4a396..7405723cb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -202,7 +202,7 @@ class FHIROrder extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Order * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_DETAIL => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -690,11 +690,279 @@ public function setWhen(FHIROrderWhen $when = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN])) { + $v = $this->getWhen(); + foreach($validationRules[self::FIELD_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER, self::FIELD_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN])) { + $errs[self::FIELD_WHEN] = []; + } + $errs[self::FIELD_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrderResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrderResponse.php index 60248d1bfa..a66139bfdf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -185,7 +185,7 @@ class FHIROrderResponse extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type OrderResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrderResponse Constructor @@ -649,11 +649,245 @@ public function setWho(FHIRReference $who = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFulfillment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FULFILLMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrderStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDER_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getWho())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FULFILLMENT])) { + $v = $this->getFulfillment(); + foreach($validationRules[self::FIELD_FULFILLMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_FULFILLMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FULFILLMENT])) { + $errs[self::FIELD_FULFILLMENT] = []; + } + $errs[self::FIELD_FULFILLMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDER_STATUS])) { + $v = $this->getOrderStatus(); + foreach($validationRules[self::FIELD_ORDER_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_ORDER_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDER_STATUS])) { + $errs[self::FIELD_ORDER_STATUS] = []; + } + $errs[self::FIELD_ORDER_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO])) { + $v = $this->getWho(); + foreach($validationRules[self::FIELD_WHO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORDER_RESPONSE, self::FIELD_WHO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO])) { + $errs[self::FIELD_WHO] = []; + } + $errs[self::FIELD_WHO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrganization.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrganization.php index 9908b69a1d..f731e19ea3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrganization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrganization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -199,7 +199,7 @@ class FHIROrganization extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Organization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrganization Constructor @@ -752,11 +752,266 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPatient.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPatient.php index 28d383a999..b3170ad23a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPatient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPatient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -344,7 +344,7 @@ class FHIRPatient extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Patient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatient Constructor @@ -1610,11 +1610,463 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAnimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareProvider())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_PROVIDER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCommunication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDeceasedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaritalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MARITAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultipleBirthBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultipleBirthInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANIMAL])) { + $v = $this->getAnimal(); + foreach($validationRules[self::FIELD_ANIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ANIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANIMAL])) { + $errs[self::FIELD_ANIMAL] = []; + } + $errs[self::FIELD_ANIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_PROVIDER])) { + $v = $this->getCareProvider(); + foreach($validationRules[self::FIELD_CARE_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_CARE_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_PROVIDER])) { + $errs[self::FIELD_CARE_PROVIDER] = []; + } + $errs[self::FIELD_CARE_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION])) { + $v = $this->getCommunication(); + foreach($validationRules[self::FIELD_COMMUNICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_COMMUNICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION])) { + $errs[self::FIELD_COMMUNICATION] = []; + } + $errs[self::FIELD_COMMUNICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_BOOLEAN])) { + $v = $this->getDeceasedBoolean(); + foreach($validationRules[self::FIELD_DECEASED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_DECEASED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_BOOLEAN])) { + $errs[self::FIELD_DECEASED_BOOLEAN] = []; + } + $errs[self::FIELD_DECEASED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_DATE_TIME])) { + $v = $this->getDeceasedDateTime(); + foreach($validationRules[self::FIELD_DECEASED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_DECEASED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_DATE_TIME])) { + $errs[self::FIELD_DECEASED_DATE_TIME] = []; + } + $errs[self::FIELD_DECEASED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MARITAL_STATUS])) { + $v = $this->getMaritalStatus(); + foreach($validationRules[self::FIELD_MARITAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MARITAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MARITAL_STATUS])) { + $errs[self::FIELD_MARITAL_STATUS] = []; + } + $errs[self::FIELD_MARITAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $v = $this->getMultipleBirthBoolean(); + foreach($validationRules[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MULTIPLE_BIRTH_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = []; + } + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $v = $this->getMultipleBirthInteger(); + foreach($validationRules[self::FIELD_MULTIPLE_BIRTH_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MULTIPLE_BIRTH_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER] = []; + } + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php index 187bbf35e1..a03b370e9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -217,7 +217,7 @@ class FHIRPaymentNotice extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type PaymentNotice * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentNotice Constructor @@ -707,11 +707,294 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_STATUS])) { + $v = $this->getPaymentStatus(); + foreach($validationRules[self::FIELD_PAYMENT_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_PAYMENT_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_STATUS])) { + $errs[self::FIELD_PAYMENT_STATUS] = []; + } + $errs[self::FIELD_PAYMENT_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php index 9c8175673e..50be3a34b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -281,7 +281,7 @@ class FHIRPaymentReconciliation extends FHIRDomainResource implements PHPFHIRCon * Validation map for fields in type PaymentReconciliation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentReconciliation Constructor @@ -1068,11 +1068,383 @@ public function setTotal(FHIRMoney $total = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPerson.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPerson.php index d5b70a56e9..2ca7dc56ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -223,7 +223,7 @@ class FHIRPerson extends FHIRDomainResource implements PHPFHIRContainedTypeInter * Validation map for fields in type Person * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPerson Constructor @@ -906,11 +906,302 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPhoto())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHOTO] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPractitioner.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPractitioner.php index 6ed318380a..4f31bbbffc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPractitioner.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPractitioner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -238,7 +238,7 @@ class FHIRPractitioner extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Practitioner * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitioner Constructor @@ -1038,11 +1038,323 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCommunication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPractitionerRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRACTITIONER_ROLE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getQualification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUALIFICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION])) { + $v = $this->getCommunication(); + foreach($validationRules[self::FIELD_COMMUNICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_COMMUNICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION])) { + $errs[self::FIELD_COMMUNICATION] = []; + } + $errs[self::FIELD_COMMUNICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRACTITIONER_ROLE])) { + $v = $this->getPractitionerRole(); + foreach($validationRules[self::FIELD_PRACTITIONER_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_PRACTITIONER_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRACTITIONER_ROLE])) { + $errs[self::FIELD_PRACTITIONER_ROLE] = []; + } + $errs[self::FIELD_PRACTITIONER_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFICATION])) { + $v = $this->getQualification(); + foreach($validationRules[self::FIELD_QUALIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_QUALIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFICATION])) { + $errs[self::FIELD_QUALIFICATION] = []; + } + $errs[self::FIELD_QUALIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedure.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedure.php index 173f8ba798..9af9ea4c1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -411,7 +411,7 @@ class FHIRProcedure extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Procedure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedure Constructor @@ -1830,11 +1830,533 @@ public function setUsed(array $used = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComplication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPLICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFocalDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOCAL_DEVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFollowUp())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOLLOW_UP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotPerformed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_PERFORMED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNotes())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMED_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonNotPerformed())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_NOT_PERFORMED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPORT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUsed())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USED, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPLICATION])) { + $v = $this->getComplication(); + foreach($validationRules[self::FIELD_COMPLICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_COMPLICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPLICATION])) { + $errs[self::FIELD_COMPLICATION] = []; + } + $errs[self::FIELD_COMPLICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL_DEVICE])) { + $v = $this->getFocalDevice(); + foreach($validationRules[self::FIELD_FOCAL_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_FOCAL_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL_DEVICE])) { + $errs[self::FIELD_FOCAL_DEVICE] = []; + } + $errs[self::FIELD_FOCAL_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOLLOW_UP])) { + $v = $this->getFollowUp(); + foreach($validationRules[self::FIELD_FOLLOW_UP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_FOLLOW_UP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOLLOW_UP])) { + $errs[self::FIELD_FOLLOW_UP] = []; + } + $errs[self::FIELD_FOLLOW_UP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_PERFORMED])) { + $v = $this->getNotPerformed(); + foreach($validationRules[self::FIELD_NOT_PERFORMED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_NOT_PERFORMED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_PERFORMED])) { + $errs[self::FIELD_NOT_PERFORMED] = []; + } + $errs[self::FIELD_NOT_PERFORMED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMED_DATE_TIME])) { + $v = $this->getPerformedDateTime(); + foreach($validationRules[self::FIELD_PERFORMED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMED_DATE_TIME])) { + $errs[self::FIELD_PERFORMED_DATE_TIME] = []; + } + $errs[self::FIELD_PERFORMED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMED_PERIOD])) { + $v = $this->getPerformedPeriod(); + foreach($validationRules[self::FIELD_PERFORMED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMED_PERIOD])) { + $errs[self::FIELD_PERFORMED_PERIOD] = []; + } + $errs[self::FIELD_PERFORMED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_NOT_PERFORMED])) { + $v = $this->getReasonNotPerformed(); + foreach($validationRules[self::FIELD_REASON_NOT_PERFORMED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REASON_NOT_PERFORMED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_NOT_PERFORMED])) { + $errs[self::FIELD_REASON_NOT_PERFORMED] = []; + } + $errs[self::FIELD_REASON_NOT_PERFORMED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORT])) { + $v = $this->getReport(); + foreach($validationRules[self::FIELD_REPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORT])) { + $errs[self::FIELD_REPORT] = []; + } + $errs[self::FIELD_REPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED])) { + $v = $this->getUsed(); + foreach($validationRules[self::FIELD_USED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_USED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED])) { + $errs[self::FIELD_USED] = []; + } + $errs[self::FIELD_USED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php index ac6e2fa55f..9fd3dd2204 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -344,7 +344,7 @@ class FHIRProcedureRequest extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type ProcedureRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureRequest Constructor @@ -1332,11 +1332,434 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNotes())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrderedOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_ON] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_ON])) { + $v = $this->getOrderedOn(); + foreach($validationRules[self::FIELD_ORDERED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_ORDERED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_ON])) { + $errs[self::FIELD_ORDERED_ON] = []; + } + $errs[self::FIELD_ORDERED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERER])) { + $v = $this->getOrderer(); + foreach($validationRules[self::FIELD_ORDERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_ORDERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERER])) { + $errs[self::FIELD_ORDERER] = []; + } + $errs[self::FIELD_ORDERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_DATE_TIME])) { + $v = $this->getScheduledDateTime(); + foreach($validationRules[self::FIELD_SCHEDULED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_SCHEDULED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_DATE_TIME])) { + $errs[self::FIELD_SCHEDULED_DATE_TIME] = []; + } + $errs[self::FIELD_SCHEDULED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_PERIOD])) { + $v = $this->getScheduledPeriod(); + foreach($validationRules[self::FIELD_SCHEDULED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_SCHEDULED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_PERIOD])) { + $errs[self::FIELD_SCHEDULED_PERIOD] = []; + } + $errs[self::FIELD_SCHEDULED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_TIMING])) { + $v = $this->getScheduledTiming(); + foreach($validationRules[self::FIELD_SCHEDULED_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_SCHEDULED_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_TIMING])) { + $errs[self::FIELD_SCHEDULED_TIMING] = []; + } + $errs[self::FIELD_SCHEDULED_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php index fb9c76af39..0e214ccc58 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -300,7 +300,7 @@ class FHIRProcessRequest extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type ProcessRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcessRequest Constructor @@ -1245,11 +1245,402 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNullify())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NULLIFY] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCLUDE])) { + $v = $this->getInclude(); + foreach($validationRules[self::FIELD_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCLUDE])) { + $errs[self::FIELD_INCLUDE] = []; + } + $errs[self::FIELD_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NULLIFY])) { + $v = $this->getNullify(); + foreach($validationRules[self::FIELD_NULLIFY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_NULLIFY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NULLIFY])) { + $errs[self::FIELD_NULLIFY] = []; + } + $errs[self::FIELD_NULLIFY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php index c02095735e..70554dbf95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -256,7 +256,7 @@ class FHIRProcessResponse extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type ProcessResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcessResponse Constructor @@ -955,11 +955,349 @@ public function setRuleset(FHIRCoding $ruleset = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getError())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ERROR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNotes())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ERROR])) { + $v = $this->getError(); + foreach($validationRules[self::FIELD_ERROR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_ERROR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ERROR])) { + $errs[self::FIELD_ERROR] = []; + } + $errs[self::FIELD_ERROR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTES])) { + $v = $this->getNotes(); + foreach($validationRules[self::FIELD_NOTES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_NOTES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTES])) { + $errs[self::FIELD_NOTES] = []; + } + $errs[self::FIELD_NOTES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) { + $v = $this->getOriginalRuleset(); + foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) { + $errs[self::FIELD_ORIGINAL_RULESET] = []; + } + $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProvenance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProvenance.php index eeb09286e2..373e5ba3e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProvenance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProvenance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -253,7 +253,7 @@ class FHIRProvenance extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type Provenance * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_TARGET => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1032,11 +1032,304 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActivity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEntity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POLICY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSignature())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SIGNATURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVITY])) { + $v = $this->getActivity(); + foreach($validationRules[self::FIELD_ACTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_ACTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVITY])) { + $errs[self::FIELD_ACTIVITY] = []; + } + $errs[self::FIELD_ACTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY])) { + $v = $this->getPolicy(); + foreach($validationRules[self::FIELD_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY])) { + $errs[self::FIELD_POLICY] = []; + } + $errs[self::FIELD_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED])) { + $v = $this->getRecorded(); + foreach($validationRules[self::FIELD_RECORDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_RECORDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED])) { + $errs[self::FIELD_RECORDED] = []; + } + $errs[self::FIELD_RECORDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNATURE])) { + $v = $this->getSignature(); + foreach($validationRules[self::FIELD_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNATURE])) { + $errs[self::FIELD_SIGNATURE] = []; + } + $errs[self::FIELD_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php index 0c40cc5429..7caa5095c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -206,7 +206,7 @@ class FHIRQuestionnaire extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type Questionnaire * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaire Constructor @@ -804,11 +804,264 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubjectType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_TYPE])) { + $v = $this->getSubjectType(); + foreach($validationRules[self::FIELD_SUBJECT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_SUBJECT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_TYPE])) { + $errs[self::FIELD_SUBJECT_TYPE] = []; + } + $errs[self::FIELD_SUBJECT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php index 9947faf2bf..b6120567ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -214,7 +214,7 @@ class FHIRQuestionnaireResponse extends FHIRDomainResource implements PHPFHIRCon * Validation map for fields in type QuestionnaireResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponse Constructor @@ -658,11 +658,275 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthored())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuestionnaire())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTIONNAIRE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED])) { + $v = $this->getAuthored(); + foreach($validationRules[self::FIELD_AUTHORED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_AUTHORED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED])) { + $errs[self::FIELD_AUTHORED] = []; + } + $errs[self::FIELD_AUTHORED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUESTIONNAIRE])) { + $v = $this->getQuestionnaire(); + foreach($validationRules[self::FIELD_QUESTIONNAIRE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_QUESTIONNAIRE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUESTIONNAIRE])) { + $errs[self::FIELD_QUESTIONNAIRE] = []; + } + $errs[self::FIELD_QUESTIONNAIRE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php index 50004677d5..0fec1c1bbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -319,7 +319,7 @@ class FHIRReferralRequest extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type ReferralRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReferralRequest Constructor @@ -1262,11 +1262,402 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateSent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_SENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFulfillmentTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FULFILLMENT_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getServiceRequested())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_REQUESTED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecialty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIALTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_SENT])) { + $v = $this->getDateSent(); + foreach($validationRules[self::FIELD_DATE_SENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_DATE_SENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_SENT])) { + $errs[self::FIELD_DATE_SENT] = []; + } + $errs[self::FIELD_DATE_SENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FULFILLMENT_TIME])) { + $v = $this->getFulfillmentTime(); + foreach($validationRules[self::FIELD_FULFILLMENT_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_FULFILLMENT_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FULFILLMENT_TIME])) { + $errs[self::FIELD_FULFILLMENT_TIME] = []; + } + $errs[self::FIELD_FULFILLMENT_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_REQUESTED])) { + $v = $this->getServiceRequested(); + foreach($validationRules[self::FIELD_SERVICE_REQUESTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_SERVICE_REQUESTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_REQUESTED])) { + $errs[self::FIELD_SERVICE_REQUESTED] = []; + } + $errs[self::FIELD_SERVICE_REQUESTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php index dd19ea0784..d0511fb305 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -227,7 +227,7 @@ class FHIRRelatedPerson extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type RelatedPerson * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRelatedPerson Constructor @@ -858,11 +858,300 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php index 654adedf4f..8147d47d56 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -220,7 +220,7 @@ class FHIRRiskAssessment extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type RiskAssessment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskAssessment Constructor @@ -771,11 +771,296 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMitigation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MITIGATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrediction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PREDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASIS])) { + $v = $this->getBasis(); + foreach($validationRules[self::FIELD_BASIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_BASIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASIS])) { + $errs[self::FIELD_BASIS] = []; + } + $errs[self::FIELD_BASIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MITIGATION])) { + $v = $this->getMitigation(); + foreach($validationRules[self::FIELD_MITIGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_MITIGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MITIGATION])) { + $errs[self::FIELD_MITIGATION] = []; + } + $errs[self::FIELD_MITIGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREDICTION])) { + $v = $this->getPrediction(); + foreach($validationRules[self::FIELD_PREDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_PREDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREDICTION])) { + $errs[self::FIELD_PREDICTION] = []; + } + $errs[self::FIELD_PREDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSchedule.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSchedule.php index 6be5676fa8..0bfb14178e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSchedule.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSchedule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -161,7 +161,7 @@ class FHIRSchedule extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Schedule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSchedule Constructor @@ -513,11 +513,211 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPlanningHorizon())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PLANNING_HORIZON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PLANNING_HORIZON])) { + $v = $this->getPlanningHorizon(); + foreach($validationRules[self::FIELD_PLANNING_HORIZON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_PLANNING_HORIZON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PLANNING_HORIZON])) { + $errs[self::FIELD_PLANNING_HORIZON] = []; + } + $errs[self::FIELD_PLANNING_HORIZON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php index 831e8668b4..49f3c44001 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -305,7 +305,7 @@ class FHIRSearchParameter extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type SearchParameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchParameter Constructor @@ -1349,11 +1349,381 @@ public function setXpathUsage(FHIRXPathUsageType $xpathUsage = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpathUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH_USAGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH])) { + $v = $this->getXpath(); + foreach($validationRules[self::FIELD_XPATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_XPATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH])) { + $errs[self::FIELD_XPATH] = []; + } + $errs[self::FIELD_XPATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH_USAGE])) { + $v = $this->getXpathUsage(); + foreach($validationRules[self::FIELD_XPATH_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_XPATH_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH_USAGE])) { + $errs[self::FIELD_XPATH_USAGE] = []; + } + $errs[self::FIELD_XPATH_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSlot.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSlot.php index 51cbd156fe..4ccd9a777f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSlot.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSlot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -202,7 +202,7 @@ class FHIRSlot extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Slot * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSlot Constructor @@ -712,11 +712,260 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getFreeBusyType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FREE_BUSY_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOverbooked())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OVERBOOKED] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FREE_BUSY_TYPE])) { + $v = $this->getFreeBusyType(); + foreach($validationRules[self::FIELD_FREE_BUSY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_FREE_BUSY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FREE_BUSY_TYPE])) { + $errs[self::FIELD_FREE_BUSY_TYPE] = []; + } + $errs[self::FIELD_FREE_BUSY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OVERBOOKED])) { + $v = $this->getOverbooked(); + foreach($validationRules[self::FIELD_OVERBOOKED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_OVERBOOKED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OVERBOOKED])) { + $errs[self::FIELD_OVERBOOKED] = []; + } + $errs[self::FIELD_OVERBOOKED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSpecimen.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSpecimen.php index ded8e028eb..12ea01e8fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSpecimen.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSpecimen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -218,7 +218,7 @@ class FHIRSpecimen extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Specimen * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimen Constructor @@ -827,11 +827,300 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccessionIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCESSION_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollection())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContainer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReceivedTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVED_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTreatment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TREATMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCESSION_IDENTIFIER])) { + $v = $this->getAccessionIdentifier(); + foreach($validationRules[self::FIELD_ACCESSION_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_ACCESSION_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCESSION_IDENTIFIER])) { + $errs[self::FIELD_ACCESSION_IDENTIFIER] = []; + } + $errs[self::FIELD_ACCESSION_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTION])) { + $v = $this->getCollection(); + foreach($validationRules[self::FIELD_COLLECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_COLLECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTION])) { + $errs[self::FIELD_COLLECTION] = []; + } + $errs[self::FIELD_COLLECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINER])) { + $v = $this->getContainer(); + foreach($validationRules[self::FIELD_CONTAINER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_CONTAINER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINER])) { + $errs[self::FIELD_CONTAINER] = []; + } + $errs[self::FIELD_CONTAINER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVED_TIME])) { + $v = $this->getReceivedTime(); + foreach($validationRules[self::FIELD_RECEIVED_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_RECEIVED_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVED_TIME])) { + $errs[self::FIELD_RECEIVED_TIME] = []; + } + $errs[self::FIELD_RECEIVED_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TREATMENT])) { + $v = $this->getTreatment(); + foreach($validationRules[self::FIELD_TREATMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_TREATMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TREATMENT])) { + $errs[self::FIELD_TREATMENT] = []; + } + $errs[self::FIELD_TREATMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php index 21537f3924..93037e3109 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -458,7 +458,7 @@ class FHIRStructureDefinition extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type StructureDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinition Constructor @@ -2156,11 +2156,559 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbstract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABSTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getConstrainedType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONSTRAINED_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContextType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDifferential())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIFFERENTIAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFhirVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FHIR_VERSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMapping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSnapshot())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SNAPSHOT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABSTRACT])) { + $v = $this->getAbstract(); + foreach($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_ABSTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABSTRACT])) { + $errs[self::FIELD_ABSTRACT] = []; + } + $errs[self::FIELD_ABSTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONSTRAINED_TYPE])) { + $v = $this->getConstrainedType(); + foreach($validationRules[self::FIELD_CONSTRAINED_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONSTRAINED_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONSTRAINED_TYPE])) { + $errs[self::FIELD_CONSTRAINED_TYPE] = []; + } + $errs[self::FIELD_CONSTRAINED_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT_TYPE])) { + $v = $this->getContextType(); + foreach($validationRules[self::FIELD_CONTEXT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONTEXT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT_TYPE])) { + $errs[self::FIELD_CONTEXT_TYPE] = []; + } + $errs[self::FIELD_CONTEXT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIFFERENTIAL])) { + $v = $this->getDifferential(); + foreach($validationRules[self::FIELD_DIFFERENTIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DIFFERENTIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIFFERENTIAL])) { + $errs[self::FIELD_DIFFERENTIAL] = []; + } + $errs[self::FIELD_DIFFERENTIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAPPING])) { + $v = $this->getMapping(); + foreach($validationRules[self::FIELD_MAPPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_MAPPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAPPING])) { + $errs[self::FIELD_MAPPING] = []; + } + $errs[self::FIELD_MAPPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SNAPSHOT])) { + $v = $this->getSnapshot(); + foreach($validationRules[self::FIELD_SNAPSHOT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_SNAPSHOT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SNAPSHOT])) { + $errs[self::FIELD_SNAPSHOT] = []; + } + $errs[self::FIELD_SNAPSHOT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubscription.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubscription.php index 295ded7500..172bf71e23 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubscription.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubscription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -207,7 +207,7 @@ class FHIRSubscription extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Subscription * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscription Constructor @@ -761,11 +761,262 @@ public function setTag(array $tag = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getChannel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHANNEL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCriteria())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITERIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getError())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ERROR] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTag())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TAG, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CHANNEL])) { + $v = $this->getChannel(); + foreach($validationRules[self::FIELD_CHANNEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_CHANNEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHANNEL])) { + $errs[self::FIELD_CHANNEL] = []; + } + $errs[self::FIELD_CHANNEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITERIA])) { + $v = $this->getCriteria(); + foreach($validationRules[self::FIELD_CRITERIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_CRITERIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITERIA])) { + $errs[self::FIELD_CRITERIA] = []; + } + $errs[self::FIELD_CRITERIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ERROR])) { + $v = $this->getError(); + foreach($validationRules[self::FIELD_ERROR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_ERROR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ERROR])) { + $errs[self::FIELD_ERROR] = []; + } + $errs[self::FIELD_ERROR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TAG])) { + $v = $this->getTag(); + foreach($validationRules[self::FIELD_TAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_TAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TAG])) { + $errs[self::FIELD_TAG] = []; + } + $errs[self::FIELD_TAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubstance.php index 267b556de2..e14fbac31f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -165,7 +165,7 @@ class FHIRSubstance extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Substance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstance Constructor @@ -609,11 +609,232 @@ public function setInstance(array $instance = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php index 71add66423..bc8ca273fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -230,7 +230,7 @@ class FHIRSupplyDelivery extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type SupplyDelivery * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyDelivery Constructor @@ -769,11 +769,311 @@ public function setWhenPrepared(FHIRPeriod $whenPrepared = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReceiver())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECEIVER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSuppliedItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLIED_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenPrepared())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_PREPARED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIED_ITEM])) { + $v = $this->getSuppliedItem(); + foreach($validationRules[self::FIELD_SUPPLIED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_SUPPLIED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIED_ITEM])) { + $errs[self::FIELD_SUPPLIED_ITEM] = []; + } + $errs[self::FIELD_SUPPLIED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIER])) { + $v = $this->getSupplier(); + foreach($validationRules[self::FIELD_SUPPLIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_SUPPLIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIER])) { + $errs[self::FIELD_SUPPLIER] = []; + } + $errs[self::FIELD_SUPPLIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_PREPARED])) { + $v = $this->getWhenPrepared(); + foreach($validationRules[self::FIELD_WHEN_PREPARED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_WHEN_PREPARED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_PREPARED])) { + $errs[self::FIELD_WHEN_PREPARED] = []; + } + $errs[self::FIELD_WHEN_PREPARED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php index 82f70e028c..ec38cef32a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -232,7 +232,7 @@ class FHIRSupplyRequest extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type SupplyRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyRequest Constructor @@ -775,11 +775,311 @@ public function setWhen(FHIRSupplyRequestWhen $when = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderedItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupplier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPLIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getWhen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_ITEM])) { + $v = $this->getOrderedItem(); + foreach($validationRules[self::FIELD_ORDERED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_ORDERED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_ITEM])) { + $errs[self::FIELD_ORDERED_ITEM] = []; + } + $errs[self::FIELD_ORDERED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIER])) { + $v = $this->getSupplier(); + foreach($validationRules[self::FIELD_SUPPLIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_SUPPLIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIER])) { + $errs[self::FIELD_SUPPLIER] = []; + } + $errs[self::FIELD_SUPPLIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN])) { + $v = $this->getWhen(); + foreach($validationRules[self::FIELD_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN])) { + $errs[self::FIELD_WHEN] = []; + } + $errs[self::FIELD_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRTestScript.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRTestScript.php index ece75ed082..036e6dc488 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRTestScript.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRTestScript.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -380,7 +380,7 @@ class FHIRTestScript extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type TestScript * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScript Constructor @@ -1723,11 +1723,491 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFixture())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FIXTURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMetadata())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METADATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultiserver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTISERVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSetup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SETUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTeardown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEARDOWN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getVariable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VARIABLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXTURE])) { + $v = $this->getFixture(); + foreach($validationRules[self::FIELD_FIXTURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_FIXTURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXTURE])) { + $errs[self::FIELD_FIXTURE] = []; + } + $errs[self::FIELD_FIXTURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METADATA])) { + $v = $this->getMetadata(); + foreach($validationRules[self::FIELD_METADATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_METADATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METADATA])) { + $errs[self::FIELD_METADATA] = []; + } + $errs[self::FIELD_METADATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTISERVER])) { + $v = $this->getMultiserver(); + foreach($validationRules[self::FIELD_MULTISERVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_MULTISERVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTISERVER])) { + $errs[self::FIELD_MULTISERVER] = []; + } + $errs[self::FIELD_MULTISERVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SETUP])) { + $v = $this->getSetup(); + foreach($validationRules[self::FIELD_SETUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_SETUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SETUP])) { + $errs[self::FIELD_SETUP] = []; + } + $errs[self::FIELD_SETUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEARDOWN])) { + $v = $this->getTeardown(); + foreach($validationRules[self::FIELD_TEARDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_TEARDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEARDOWN])) { + $errs[self::FIELD_TEARDOWN] = []; + } + $errs[self::FIELD_TEARDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEST])) { + $v = $this->getTest(); + foreach($validationRules[self::FIELD_TEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_TEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEST])) { + $errs[self::FIELD_TEST] = []; + } + $errs[self::FIELD_TEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIABLE])) { + $v = $this->getVariable(); + foreach($validationRules[self::FIELD_VARIABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_VARIABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIABLE])) { + $errs[self::FIELD_VARIABLE] = []; + } + $errs[self::FIELD_VARIABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRValueSet.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRValueSet.php index 1ec4925ba7..17594e2d43 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRValueSet.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRValueSet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -361,7 +361,7 @@ class FHIRValueSet extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type ValueSet * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSet Constructor @@ -1544,11 +1544,449 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCodeSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpansion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPANSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExtensible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXTENSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getImmutable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUTABLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLockedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCKED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE_SYSTEM])) { + $v = $this->getCodeSystem(); + foreach($validationRules[self::FIELD_CODE_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_CODE_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_SYSTEM])) { + $errs[self::FIELD_CODE_SYSTEM] = []; + } + $errs[self::FIELD_CODE_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPOSE])) { + $v = $this->getCompose(); + foreach($validationRules[self::FIELD_COMPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_COMPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPOSE])) { + $errs[self::FIELD_COMPOSE] = []; + } + $errs[self::FIELD_COMPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPANSION])) { + $v = $this->getExpansion(); + foreach($validationRules[self::FIELD_EXPANSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXPANSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPANSION])) { + $errs[self::FIELD_EXPANSION] = []; + } + $errs[self::FIELD_EXPANSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSIBLE])) { + $v = $this->getExtensible(); + foreach($validationRules[self::FIELD_EXTENSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXTENSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSIBLE])) { + $errs[self::FIELD_EXTENSIBLE] = []; + } + $errs[self::FIELD_EXTENSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMMUTABLE])) { + $v = $this->getImmutable(); + foreach($validationRules[self::FIELD_IMMUTABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_IMMUTABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMMUTABLE])) { + $errs[self::FIELD_IMMUTABLE] = []; + } + $errs[self::FIELD_IMMUTABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCKED_DATE])) { + $v = $this->getLockedDate(); + foreach($validationRules[self::FIELD_LOCKED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_LOCKED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCKED_DATE])) { + $errs[self::FIELD_LOCKED_DATE] = []; + } + $errs[self::FIELD_LOCKED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php index 22a0a27f44..59d7cc5922 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -193,7 +193,7 @@ class FHIRVisionPrescription extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type VisionPrescription * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionPrescription Constructor @@ -645,11 +645,262 @@ public function setReasonReference(FHIRReference $reasonReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDateWritten())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_WRITTEN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDispense())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DISPENSE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescriber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE_WRITTEN])) { + $v = $this->getDateWritten(); + foreach($validationRules[self::FIELD_DATE_WRITTEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_DATE_WRITTEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_WRITTEN])) { + $errs[self::FIELD_DATE_WRITTEN] = []; + } + $errs[self::FIELD_DATE_WRITTEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPENSE])) { + $v = $this->getDispense(); + foreach($validationRules[self::FIELD_DISPENSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_DISPENSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSE])) { + $errs[self::FIELD_DISPENSE] = []; + } + $errs[self::FIELD_DISPENSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIBER])) { + $v = $this->getPrescriber(); + foreach($validationRules[self::FIELD_PRESCRIBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_PRESCRIBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIBER])) { + $errs[self::FIELD_PRESCRIBER] = []; + } + $errs[self::FIELD_PRESCRIBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRParameters.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRParameters.php index 25e14195d3..018083f7bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRParameters.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRParameters.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRParameters extends FHIRResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Parameters * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParameters Constructor @@ -224,11 +224,93 @@ public function setParameter(array $parameter = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResourceContainer.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResourceContainer.php index 1326d09190..811cb1d9ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResourceContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResourceContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -164,6 +164,7 @@ class FHIRResourceContainer implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_CONTAINER; @@ -1191,7 +1192,7 @@ class FHIRResourceContainer implements PHPFHIRCommentContainerInterface, PHPFHIR * Validation map for fields in type ResourceContainer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceContainer Constructor @@ -4514,11 +4515,496 @@ public function setVisionPrescription(FHIRVisionPrescription $VisionPrescription } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllergyIntolerance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLERGY_INTOLERANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointmentResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuditEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUDIT_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBasic())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASIC] = $fieldErrs; + } + } + if (null !== ($v = $this->getBinary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBundle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUNDLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCarePlan())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARE_PLAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaim())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getClinicalImpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_IMPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCommunication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMUNICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCommunicationRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMUNICATION_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getComposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getConceptMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCEPT_MAP] = $fieldErrs; + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getConformance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFORMANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataElement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ELEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetectedIssue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETECTED_ISSUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceComponent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_COMPONENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceMetric())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_METRIC] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceUseRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_USE_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceUseStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_USE_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosticOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTIC_ORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosticReport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTIC_REPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentManifest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT_MANIFEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEligibilityRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELIGIBILITY_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getEligibilityResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELIGIBILITY_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnrollmentRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENROLLMENT_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnrollmentResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENROLLMENT_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEpisodeOfCare())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EPISODE_OF_CARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExplanationOfBenefit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPLANATION_OF_BENEFIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFamilyMemberHistory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FAMILY_MEMBER_HISTORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFlag())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FLAG] = $fieldErrs; + } + } + if (null !== ($v = $this->getGoal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GOAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getHealthcareService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEALTHCARE_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getImagingObjectSelection())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMAGING_OBJECT_SELECTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getImagingStudy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMAGING_STUDY] = $fieldErrs; + } + } + if (null !== ($v = $this->getImmunization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUNIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getImmunizationRecommendation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUNIZATION_RECOMMENDATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getImplementationGuide())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLEMENTATION_GUIDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getList())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIST] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedia())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationAdministration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_ADMINISTRATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationDispense())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_DISPENSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_ORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMessageHeader())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE_HEADER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNamingSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAMING_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getNutritionOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUTRITION_ORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getObservation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDER_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getParameters())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARAMETERS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentNotice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_NOTICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentReconciliation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_RECONCILIATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerson())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERSON] = $fieldErrs; + } + } + if (null !== ($v = $this->getPractitioner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTITIONER] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedureRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcessRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCESS_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcessResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCESS_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvenance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVENANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuestionnaire())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTIONNAIRE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuestionnaireResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTIONNAIRE_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferralRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRAL_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelatedPerson())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATED_PERSON] = $fieldErrs; + } + } + if (null !== ($v = $this->getRiskAssessment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RISK_ASSESSMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSearchParameter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH_PARAMETER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSlot())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLOT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecimen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getStructureDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRUCTURE_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubscription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplyDelivery())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLY_DELIVERY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplyRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLY_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getTestScript())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEST_SCRIPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET] = $fieldErrs; + } + } + if (null !== ($v = $this->getVisionPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VISION_PRESCRIPTION] = $fieldErrs; + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRSampledDataDataTypePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRSampledDataDataTypePrimitive.php index e3cd209d7e..3a03244791 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRSampledDataDataTypePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRSampledDataDataTypePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type SampledDataDataType-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^((-{0,1}\\d*\\.{0,1}\\d+)|[EUL])( ((-{0,1}\\d*\\.{0,1}\\d+)|[EUL]))*$/', ], @@ -168,11 +170,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive.php index 0089a0ed72..d91ec84bdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRStringPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRStringPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type string-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, ], @@ -168,11 +170,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAccountStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAccountStatusList.php index d65d6a9ca8..e5ec354093 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAccountStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAccountStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAccountStatusList extends FHIRStringPrimitive * Validation map for fields in type AccountStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRActionListList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRActionListList.php index 4b2c1f37a2..35aaf8c631 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRActionListList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRActionListList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionListList extends FHIRStringPrimitive * Validation map for fields in type ActionList-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['cancel','poll','reprocess','status',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressTypeList.php index 120ebc9fc6..68f594c840 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAddressTypeList extends FHIRStringPrimitive * Validation map for fields in type AddressType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['postal','physical','both',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressUseList.php index 0ee0dfffce..74a37b5094 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAddressUseList extends FHIRStringPrimitive * Validation map for fields in type AddressUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['home','work','temp','old',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAdministrativeGenderList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAdministrativeGenderList.php index c29d62914e..5b50683cf8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAdministrativeGenderList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAdministrativeGenderList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAdministrativeGenderList extends FHIRStringPrimitive * Validation map for fields in type AdministrativeGender-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['male','female','other','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAggregationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAggregationModeList.php index 39827ba5de..a485c3e3db 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAggregationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAggregationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAggregationModeList extends FHIRStringPrimitive * Validation map for fields in type AggregationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['contained','referenced','bundled',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryList.php index 0082363ac4..710312aae9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceCategoryList extends FHIRStringPrimitive * Validation map for fields in type AllergyIntoleranceCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['food','medication','environment','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyList.php index cff2991b02..598f52f438 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceCertaintyList extends FHIRStringPrimitive * Validation map for fields in type AllergyIntoleranceCertainty-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['unlikely','likely','confirmed',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityList.php index c4e695f06a..04fab818fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceCriticalityList extends FHIRStringPrimitive * Validation map for fields in type AllergyIntoleranceCriticality-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['CRITL','CRITH','CRITU',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityList.php index 36ea9d96d7..6dd4bc81a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceSeverityList extends FHIRStringPrimitive * Validation map for fields in type AllergyIntoleranceSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['mild','moderate','severe',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusList.php index 1326f54a1a..455d13ed19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceStatusList extends FHIRStringPrimitive * Validation map for fields in type AllergyIntoleranceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','unconfirmed','confirmed','inactive','resolved','refuted','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeList.php index af052f0769..1ba4c5bbbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceTypeList extends FHIRStringPrimitive * Validation map for fields in type AllergyIntoleranceType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['allergy','intolerance',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAnswerFormatList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAnswerFormatList.php index f487c6fa31..02f64ef2d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAnswerFormatList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAnswerFormatList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAnswerFormatList extends FHIRStringPrimitive * Validation map for fields in type AnswerFormat-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['boolean','decimal','integer','date','dateTime','instant','time','string','text','url','choice','open-choice','attachment','reference','quantity',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAppointmentStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAppointmentStatusList.php index ed9511e7cf..69fdcce8ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAppointmentStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAppointmentStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAppointmentStatusList extends FHIRStringPrimitive * Validation map for fields in type AppointmentStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','pending','booked','arrived','fulfilled','cancelled','noshow',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionDirectionTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionDirectionTypeList.php index 7c16c031b1..901b52957c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionDirectionTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionDirectionTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAssertionDirectionTypeList extends FHIRStringPrimitive * Validation map for fields in type AssertionDirectionType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['response','request',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionOperatorTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionOperatorTypeList.php index 2ead6f8a00..c7bc78b2a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionOperatorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionOperatorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAssertionOperatorTypeList extends FHIRStringPrimitive * Validation map for fields in type AssertionOperatorType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['equals','notEquals','in','notIn','greaterThan','lessThan','empty','notEmpty','contains','notContains',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionResponseTypesList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionResponseTypesList.php index cbe40dd25d..ae7fe6cc68 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionResponseTypesList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionResponseTypesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAssertionResponseTypesList extends FHIRStringPrimitive * Validation map for fields in type AssertionResponseTypes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['okay','created','noContent','notModified','bad','forbidden','notFound','methodNotAllowed','conflict','gone','preconditionFailed','unprocessable',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventActionList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventActionList.php index f540244254..f109bc99b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAuditEventActionList extends FHIRStringPrimitive * Validation map for fields in type AuditEventAction-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['C','R','U','D','E',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventOutcomeList.php index f705e2bd67..808d936c8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAuditEventOutcomeList extends FHIRStringPrimitive * Validation map for fields in type AuditEventOutcome-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['0','4','8','12',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeList.php index 515394aa88..dfb4a2e972 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAuditEventParticipantNetworkTypeList extends FHIRStringPrimitive * Validation map for fields in type AuditEventParticipantNetworkType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['1','2','3','4','5',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBindingStrengthList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBindingStrengthList.php index 209e152b6f..9ab49c8536 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBindingStrengthList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBindingStrengthList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBindingStrengthList extends FHIRStringPrimitive * Validation map for fields in type BindingStrength-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['required','extensible','preferred','example',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBundleTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBundleTypeList.php index 7d5b9857bf..193791e6f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBundleTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBundleTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBundleTypeList extends FHIRStringPrimitive * Validation map for fields in type BundleType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['document','message','transaction','transaction-response','batch','batch-response','history','searchset','collection',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php index 0bb2fd53ec..e2f7d2a7a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCarePlanActivityStatusList extends FHIRStringPrimitive * Validation map for fields in type CarePlanActivityStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-started','scheduled','in-progress','on-hold','completed','cancelled',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanRelationshipList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanRelationshipList.php index 5212d03dd7..759be95d9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanRelationshipList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanRelationshipList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCarePlanRelationshipList extends FHIRStringPrimitive * Validation map for fields in type CarePlanRelationship-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['includes','replaces','fulfills',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanStatusList.php index 6e31d59072..df04f42147 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCarePlanStatusList extends FHIRStringPrimitive * Validation map for fields in type CarePlanStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','draft','active','completed','cancelled',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClaimTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClaimTypeList.php index d34f118b35..8250faf1c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClaimTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClaimTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRClaimTypeList extends FHIRStringPrimitive * Validation map for fields in type ClaimType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['institutional','oral','pharmacy','professional','vision',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClinicalImpressionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClinicalImpressionStatusList.php index c6ca9a0dd7..0963e00bcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClinicalImpressionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClinicalImpressionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRClinicalImpressionStatusList extends FHIRStringPrimitive * Validation map for fields in type ClinicalImpressionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','completed','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationRequestStatusList.php index 92f57a8f24..3a738eaaf0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCommunicationRequestStatusList extends FHIRStringPrimitive * Validation map for fields in type CommunicationRequestStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','planned','requested','received','accepted','in-progress','completed','suspended','rejected','failed',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationStatusList.php index f08c692090..690d256914 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCommunicationStatusList extends FHIRStringPrimitive * Validation map for fields in type CommunicationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','completed','suspended','rejected','failed',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php index 5f0a33cb2d..3a8117051f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCompositionAttestationModeList extends FHIRStringPrimitive * Validation map for fields in type CompositionAttestationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['personal','professional','legal','official',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionStatusList.php index 7cf4c19b54..28a4ae1b3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCompositionStatusList extends FHIRStringPrimitive * Validation map for fields in type CompositionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['preliminary','final','amended','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php index a9915f4a50..62f44a47d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConceptMapEquivalenceList extends FHIRStringPrimitive * Validation map for fields in type ConceptMapEquivalence-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['equivalent','equal','wider','subsumes','narrower','specializes','inexact','unmatched','disjoint',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionVerificationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionVerificationStatusList.php index c395515963..d7d6126f00 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionVerificationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionVerificationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConditionVerificationStatusList extends FHIRStringPrimitive * Validation map for fields in type ConditionVerificationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['provisional','differential','confirmed','refuted','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionalDeleteStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionalDeleteStatusList.php index 6f629037f3..6479ebf526 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionalDeleteStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionalDeleteStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConditionalDeleteStatusList extends FHIRStringPrimitive * Validation map for fields in type ConditionalDeleteStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-supported','single','multiple',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceEventModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceEventModeList.php index 144813012a..4de8cebaee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceEventModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceEventModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConformanceEventModeList extends FHIRStringPrimitive * Validation map for fields in type ConformanceEventMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['sender','receiver',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceResourceStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceResourceStatusList.php index 56ceb35bd5..51b8b23153 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceResourceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceResourceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConformanceResourceStatusList extends FHIRStringPrimitive * Validation map for fields in type ConformanceResourceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','retired',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceStatementKindList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceStatementKindList.php index d928cc5529..20c9aa92f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceStatementKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceStatementKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConformanceStatementKindList extends FHIRStringPrimitive * Validation map for fields in type ConformanceStatementKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['instance','capability','requirements',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConstraintSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConstraintSeverityList.php index 941503478a..a443625601 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConstraintSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConstraintSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConstraintSeverityList extends FHIRStringPrimitive * Validation map for fields in type ConstraintSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['error','warning',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointSystemList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointSystemList.php index afa4f04790..b1b78d0adf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointSystemList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointSystemList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContactPointSystemList extends FHIRStringPrimitive * Validation map for fields in type ContactPointSystem-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['phone','fax','email','pager','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointUseList.php index 496f7456ba..244ff53d74 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContactPointUseList extends FHIRStringPrimitive * Validation map for fields in type ContactPointUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['home','work','temp','old','mobile',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContentTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContentTypeList.php index 6310c4d088..73952d3ff5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContentTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContentTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContentTypeList extends FHIRStringPrimitive * Validation map for fields in type ContentType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['xml','json',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDataElementStringencyList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDataElementStringencyList.php index 996cd02204..a88b955202 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDataElementStringencyList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDataElementStringencyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDataElementStringencyList extends FHIRStringPrimitive * Validation map for fields in type DataElementStringency-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['comparable','fully-specified','equivalent','convertable','scaleable','flexible',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDaysOfWeekList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDaysOfWeekList.php index 83c9164651..ca9d63cf05 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDaysOfWeekList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDaysOfWeekList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDaysOfWeekList extends FHIRStringPrimitive * Validation map for fields in type DaysOfWeek-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['mon','tue','wed','thu','fri','sat','sun',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDetectedIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDetectedIssueSeverityList.php index 41c3eca07f..ce6af027a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDetectedIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDetectedIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDetectedIssueSeverityList extends FHIRStringPrimitive * Validation map for fields in type DetectedIssueSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['high','moderate','low',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateList.php index 7a8cacca51..d80db811d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricCalibrationStateList extends FHIRStringPrimitive * Validation map for fields in type DeviceMetricCalibrationState-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-calibrated','calibration-required','calibrated','unspecified',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeList.php index 7786131123..9b28870ab9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricCalibrationTypeList extends FHIRStringPrimitive * Validation map for fields in type DeviceMetricCalibrationType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['unspecified','offset','gain','two-point',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCategoryList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCategoryList.php index 8c0911bb91..ceca527f0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricCategoryList extends FHIRStringPrimitive * Validation map for fields in type DeviceMetricCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['measurement','setting','calculation','unspecified',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricColorList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricColorList.php index 8ef7ce3eca..7f2b94cfd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricColorList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricColorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricColorList extends FHIRStringPrimitive * Validation map for fields in type DeviceMetricColor-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['black','red','green','yellow','blue','magenta','cyan','white',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusList.php index 89a00ca9b8..012a1c689f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricOperationalStatusList extends FHIRStringPrimitive * Validation map for fields in type DeviceMetricOperationalStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['on','off','standby',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceStatusList.php index cb9867d997..060ab41785 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceStatusList extends FHIRStringPrimitive * Validation map for fields in type DeviceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['available','not-available','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityList.php index d6fb4653e9..3a424a6b00 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceUseRequestPriorityList extends FHIRStringPrimitive * Validation map for fields in type DeviceUseRequestPriority-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['routine','urgent','stat','asap',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestStatusList.php index f44114f436..e6ab741ec1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceUseRequestStatusList extends FHIRStringPrimitive * Validation map for fields in type DeviceUseRequestStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','planned','requested','received','accepted','in-progress','completed','suspended','rejected','aborted',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php index d5106980fe..9838b031c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDiagnosticOrderPriorityList extends FHIRStringPrimitive * Validation map for fields in type DiagnosticOrderPriority-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['routine','urgent','stat','asap',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php index 5935a5a421..8abba84346 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDiagnosticOrderStatusList extends FHIRStringPrimitive * Validation map for fields in type DiagnosticOrderStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','draft','planned','requested','received','accepted','in-progress','review','completed','cancelled','suspended','rejected','failed',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php index bd92ee8604..c61a5b0727 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDiagnosticReportStatusList extends FHIRStringPrimitive * Validation map for fields in type DiagnosticReportStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['registered','partial','final','corrected','appended','cancelled','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDigitalMediaTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDigitalMediaTypeList.php index 7af34a43dd..0fb42bdd24 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDigitalMediaTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDigitalMediaTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDigitalMediaTypeList extends FHIRStringPrimitive * Validation map for fields in type DigitalMediaType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['photo','video','audio',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentModeList.php index 52e6abeaa1..ce2cd4043d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentModeList extends FHIRStringPrimitive * Validation map for fields in type DocumentMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['producer','consumer',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php index 43ee96618a..f34cee5aa0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentReferenceStatusList extends FHIRStringPrimitive * Validation map for fields in type DocumentReferenceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['current','superseded','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php index 64dc0c7711..622797dbe9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentRelationshipTypeList extends FHIRStringPrimitive * Validation map for fields in type DocumentRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['replaces','transforms','signs','appends',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterClassList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterClassList.php index 014df8bcd6..776e833d8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterClassList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterClassList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREncounterClassList extends FHIRStringPrimitive * Validation map for fields in type EncounterClass-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['inpatient','outpatient','ambulatory','emergency','home','field','daytime','virtual','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterLocationStatusList.php index c227e0c1f2..2030cdfec2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREncounterLocationStatusList extends FHIRStringPrimitive * Validation map for fields in type EncounterLocationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','active','reserved','completed',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterStateList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterStateList.php index d298fad9a8..99b7520dc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREncounterStateList extends FHIRStringPrimitive * Validation map for fields in type EncounterState-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','arrived','in-progress','onleave','finished','cancelled',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREpisodeOfCareStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREpisodeOfCareStatusList.php index 6984a4e0e1..46b041e60e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREpisodeOfCareStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREpisodeOfCareStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREpisodeOfCareStatusList extends FHIRStringPrimitive * Validation map for fields in type EpisodeOfCareStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','waitlist','active','onhold','finished','cancelled',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREventTimingList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREventTimingList.php index f12044f2f1..c28cd5459f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREventTimingList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREventTimingList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREventTimingList extends FHIRStringPrimitive * Validation map for fields in type EventTiming-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['HS','WAKE','C','CM','CD','CV','AC','ACM','ACD','ACV','PC','PCM','PCD','PCV',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRExtensionContextList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRExtensionContextList.php index 531cdf142f..139ab82035 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRExtensionContextList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRExtensionContextList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRExtensionContextList extends FHIRStringPrimitive * Validation map for fields in type ExtensionContext-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['resource','datatype','mapping','extension',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFamilyHistoryStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFamilyHistoryStatusList.php index c7af6887b1..45b83c6716 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFamilyHistoryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFamilyHistoryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFamilyHistoryStatusList extends FHIRStringPrimitive * Validation map for fields in type FamilyHistoryStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['partial','completed','entered-in-error','health-unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFilterOperatorList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFilterOperatorList.php index bb77e5f637..ac08052ad3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFilterOperatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFilterOperatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFilterOperatorList extends FHIRStringPrimitive * Validation map for fields in type FilterOperator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['=','is-a','is-not-a','regex','in','not-in',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFlagStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFlagStatusList.php index bd56085c63..e38e2df1ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFlagStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFlagStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFlagStatusList extends FHIRStringPrimitive * Validation map for fields in type FlagStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGoalStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGoalStatusList.php index 5384814ba5..1ffb8edd8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGoalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGoalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGoalStatusList extends FHIRStringPrimitive * Validation map for fields in type GoalStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','planned','accepted','rejected','in-progress','achieved','sustaining','on-hold','cancelled',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGroupTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGroupTypeList.php index f7aff3f908..3c9bbe95bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGroupTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGroupTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGroupTypeList extends FHIRStringPrimitive * Validation map for fields in type GroupType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['person','animal','practitioner','device','medication','substance',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideDependencyTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideDependencyTypeList.php index f86f7609f2..037349bb4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideDependencyTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideDependencyTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGuideDependencyTypeList extends FHIRStringPrimitive * Validation map for fields in type GuideDependencyType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['reference','inclusion',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuidePageKindList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuidePageKindList.php index 8a4630aef7..f3b60aa81a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuidePageKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuidePageKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGuidePageKindList extends FHIRStringPrimitive * Validation map for fields in type GuidePageKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['page','example','list','include','directory','dictionary','toc','resource',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideResourcePurposeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideResourcePurposeList.php index 46d92e1760..0b21403bb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideResourcePurposeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideResourcePurposeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGuideResourcePurposeList extends FHIRStringPrimitive * Validation map for fields in type GuideResourcePurpose-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['example','terminology','profile','extension','dictionary','logical',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRHTTPVerbList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRHTTPVerbList.php index 8678c537c1..196f3ce072 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRHTTPVerbList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRHTTPVerbList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRHTTPVerbList extends FHIRStringPrimitive * Validation map for fields in type HTTPVerb-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['GET','POST','PUT','DELETE',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentifierUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentifierUseList.php index 1a8f178c7b..728c5a79b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentifierUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentifierUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIdentifierUseList extends FHIRStringPrimitive * Validation map for fields in type IdentifierUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['usual','official','temp','secondary',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentityAssuranceLevelList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentityAssuranceLevelList.php index 8f13b838e4..3a4fd8feda 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentityAssuranceLevelList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentityAssuranceLevelList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIdentityAssuranceLevelList extends FHIRStringPrimitive * Validation map for fields in type IdentityAssuranceLevel-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['level1','level2','level3','level4',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php index 2bffa86027..fe45c77dce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRInstanceAvailabilityList extends FHIRStringPrimitive * Validation map for fields in type InstanceAvailability-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['ONLINE','OFFLINE','NEARLINE','UNAVAILABLE',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueSeverityList.php index f8a66c4a47..32c9000cbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIssueSeverityList extends FHIRStringPrimitive * Validation map for fields in type IssueSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['fatal','error','warning','information',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueTypeList.php index bbe31891b3..5282015fd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIssueTypeList extends FHIRStringPrimitive * Validation map for fields in type IssueType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['invalid','structure','required','value','invariant','security','login','unknown','expired','forbidden','suppressed','processing','not-supported','duplicate','not-found','too-long','code-invalid','extension','too-costly','business-rule','conflict','incomplete','transient','lock-error','no-store','exception','timeout','throttled','informational',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLinkTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLinkTypeList.php index 983eed3070..4c6970c43b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLinkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLinkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLinkTypeList extends FHIRStringPrimitive * Validation map for fields in type LinkType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['replace','refer','seealso',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListModeList.php index e22f7d78b5..ebc826ccef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRListModeList extends FHIRStringPrimitive * Validation map for fields in type ListMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['working','snapshot','changes',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListStatusList.php index 84b98ebc7e..83f3e50cee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRListStatusList extends FHIRStringPrimitive * Validation map for fields in type ListStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['current','retired','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationModeList.php index 6b04e1d1b9..20b7a5120f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLocationModeList extends FHIRStringPrimitive * Validation map for fields in type LocationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['instance','kind',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationStatusList.php index 8b735e281c..c050ae0b3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLocationStatusList extends FHIRStringPrimitive * Validation map for fields in type LocationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','suspended','inactive',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMeasmnt_PrincipleList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMeasmnt_PrincipleList.php index c3ee43322e..6752fe3c67 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMeasmnt_PrincipleList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMeasmnt_PrincipleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMeasmnt_PrincipleList extends FHIRStringPrimitive * Validation map for fields in type Measmnt-Principle-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['other','chemical','electrical','impedance','nuclear','optical','thermal','biological','mechanical','acoustical','manual',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php index 51800187b9..58b7d8076c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationAdministrationStatusList extends FHIRStringPrimitive * Validation map for fields in type MedicationAdministrationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','on-hold','completed','entered-in-error','stopped',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php index 792ddd1455..59c2c6ee20 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationDispenseStatusList extends FHIRStringPrimitive * Validation map for fields in type MedicationDispenseStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','on-hold','completed','entered-in-error','stopped',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationOrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationOrderStatusList.php index d49234d200..b4999b76fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationOrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationOrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationOrderStatusList extends FHIRStringPrimitive * Validation map for fields in type MedicationOrderStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','on-hold','completed','entered-in-error','stopped','draft',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationStatementStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationStatementStatusList.php index 496932f3e9..3af0035e84 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationStatementStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationStatementStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationStatementStatusList extends FHIRStringPrimitive * Validation map for fields in type MedicationStatementStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','completed','entered-in-error','intended',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php index 3eb2aa2cf9..19ed12b0c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMessageSignificanceCategoryList extends FHIRStringPrimitive * Validation map for fields in type MessageSignificanceCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Consequence','Currency','Notification',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNameUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNameUseList.php index 13bf3ac760..0a7ec4b253 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNameUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNameUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNameUseList extends FHIRStringPrimitive * Validation map for fields in type NameUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['usual','official','temp','nickname','anonymous','old','maiden',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeList.php index 618f58fdb0..64c87a8643 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNamingSystemIdentifierTypeList extends FHIRStringPrimitive * Validation map for fields in type NamingSystemIdentifierType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['oid','uuid','uri','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemTypeList.php index d5060986f3..0f937bacbe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNamingSystemTypeList extends FHIRStringPrimitive * Validation map for fields in type NamingSystemType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['codesystem','identifier','root',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNarrativeStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNarrativeStatusList.php index 45965900ab..49dcb375a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNarrativeStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNarrativeStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNarrativeStatusList extends FHIRStringPrimitive * Validation map for fields in type NarrativeStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['generated','extensions','additional','empty',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNoteTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNoteTypeList.php index aaee426941..22169f4fa2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNoteTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNoteTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNoteTypeList extends FHIRStringPrimitive * Validation map for fields in type NoteType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['display','print','printoper',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNutritionOrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNutritionOrderStatusList.php index 2c1a4c4b58..819b03939c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNutritionOrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNutritionOrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNutritionOrderStatusList extends FHIRStringPrimitive * Validation map for fields in type NutritionOrderStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','draft','planned','requested','active','on-hold','completed','cancelled',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php index a8513888ff..6ddab13a79 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRObservationRelationshipTypeList extends FHIRStringPrimitive * Validation map for fields in type ObservationRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['has-member','derived-from','sequel-to','replaces','qualified-by','interfered-by',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationStatusList.php index cdc9252a19..aab9845c0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRObservationStatusList extends FHIRStringPrimitive * Validation map for fields in type ObservationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['registered','preliminary','final','amended','cancelled','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationKindList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationKindList.php index 69c0944d75..2b224ea535 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIROperationKindList extends FHIRStringPrimitive * Validation map for fields in type OperationKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['operation','query',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationParameterUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationParameterUseList.php index 78136d746e..2714212b5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationParameterUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationParameterUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIROperationParameterUseList extends FHIRStringPrimitive * Validation map for fields in type OperationParameterUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in','out',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROrderStatusList.php index 34c465fbc8..9e7df0e1ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIROrderStatusList extends FHIRStringPrimitive * Validation map for fields in type OrderStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['pending','review','rejected','error','accepted','cancelled','replaced','aborted','completed',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantRequiredList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantRequiredList.php index 87794beb81..b07586122d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantRequiredList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantRequiredList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRParticipantRequiredList extends FHIRStringPrimitive * Validation map for fields in type ParticipantRequired-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['required','optional','information-only',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantStatusList.php index 257b0e5f62..8a7a13bdf3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRParticipantStatusList extends FHIRStringPrimitive * Validation map for fields in type ParticipantStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['accepted','declined','tentative','in-process','completed','needs-action',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipationStatusList.php index e7d8d2b388..bb483ac33d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRParticipationStatusList extends FHIRStringPrimitive * Validation map for fields in type ParticipationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['accepted','declined','tentative','needs-action',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestPriorityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestPriorityList.php index 1f60a1e78e..2f6e09573b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRProcedureRequestPriorityList extends FHIRStringPrimitive * Validation map for fields in type ProcedureRequestPriority-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['routine','urgent','stat','asap',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestStatusList.php index 2a2e165e3a..d81daf7c4f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRProcedureRequestStatusList extends FHIRStringPrimitive * Validation map for fields in type ProcedureRequestStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','draft','requested','received','accepted','in-progress','completed','suspended','rejected','aborted',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureStatusList.php index 845900af43..8551f37b20 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRProcedureStatusList extends FHIRStringPrimitive * Validation map for fields in type ProcedureStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','aborted','completed','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRPropertyRepresentationList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRPropertyRepresentationList.php index 2edc82f871..7d55f95e04 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRPropertyRepresentationList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRPropertyRepresentationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRPropertyRepresentationList extends FHIRStringPrimitive * Validation map for fields in type PropertyRepresentation-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['xmlAttr',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php index 7eb967a0a6..f0572ddecc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRProvenanceEntityRoleList extends FHIRStringPrimitive * Validation map for fields in type ProvenanceEntityRole-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['derivation','revision','quotation','source',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuantityComparatorList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuantityComparatorList.php index 431b661dbf..b004fc8af7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuantityComparatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuantityComparatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuantityComparatorList extends FHIRStringPrimitive * Validation map for fields in type QuantityComparator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['<','<=','>=','>',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusList.php index 4d851f9e5d..5f6c4ac477 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuestionnaireResponseStatusList extends FHIRStringPrimitive * Validation map for fields in type QuestionnaireResponseStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','completed','amended',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php index b18bebb03c..53ec59a1ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuestionnaireStatusList extends FHIRStringPrimitive * Validation map for fields in type QuestionnaireStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','published','retired',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRReferralStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRReferralStatusList.php index d10bee3b0c..4d2a93c547 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRReferralStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRReferralStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRReferralStatusList extends FHIRStringPrimitive * Validation map for fields in type ReferralStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','requested','active','cancelled','accepted','rejected','completed',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRemittanceOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRemittanceOutcomeList.php index 2f15c64170..4bf5ea627f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRemittanceOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRemittanceOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRemittanceOutcomeList extends FHIRStringPrimitive * Validation map for fields in type RemittanceOutcome-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['complete','error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResourceVersionPolicyList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResourceVersionPolicyList.php index 23bcc3a0db..dfe2fea070 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResourceVersionPolicyList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResourceVersionPolicyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResourceVersionPolicyList extends FHIRStringPrimitive * Validation map for fields in type ResourceVersionPolicy-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['no-version','versioned','versioned-update',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResponseTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResponseTypeList.php index 889ddf9ba8..ba8ede2a56 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResponseTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResponseTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResponseTypeList extends FHIRStringPrimitive * Validation map for fields in type ResponseType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['ok','transient-error','fatal-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php index a6eab52f87..32a395abe6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRestfulConformanceModeList extends FHIRStringPrimitive * Validation map for fields in type RestfulConformanceMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['client','server',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchEntryModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchEntryModeList.php index f4676dca53..3ff70e33bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchEntryModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchEntryModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchEntryModeList extends FHIRStringPrimitive * Validation map for fields in type SearchEntryMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['match','include','outcome',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchModifierCodeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchModifierCodeList.php index c614442ba1..7729c3ee13 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchModifierCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchModifierCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchModifierCodeList extends FHIRStringPrimitive * Validation map for fields in type SearchModifierCode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['missing','exact','contains','not','text','in','not-in','below','above','type',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchParamTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchParamTypeList.php index aca3356e57..49867c5b85 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchParamTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchParamTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchParamTypeList extends FHIRStringPrimitive * Validation map for fields in type SearchParamType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['number','date','string','token','reference','composite','quantity','uri',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlicingRulesList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlicingRulesList.php index a29da36cae..d4350a9fad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlicingRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlicingRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSlicingRulesList extends FHIRStringPrimitive * Validation map for fields in type SlicingRules-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['closed','open','openAtEnd',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlotStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlotStatusList.php index 08c057e702..cbe8434bbe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlotStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlotStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSlotStatusList extends FHIRStringPrimitive * Validation map for fields in type SlotStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['busy','free','busy-unavailable','busy-tentative',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSpecimenStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSpecimenStatusList.php index 060da066d8..cfd16d9159 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSpecimenStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSpecimenStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSpecimenStatusList extends FHIRStringPrimitive * Validation map for fields in type SpecimenStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['available','unavailable','unsatisfactory','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRStructureDefinitionKindList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRStructureDefinitionKindList.php index 2930ee3cdd..28edbf9274 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRStructureDefinitionKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRStructureDefinitionKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureDefinitionKindList extends FHIRStringPrimitive * Validation map for fields in type StructureDefinitionKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['datatype','resource','logical',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionChannelTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionChannelTypeList.php index 63ed766fcb..cc7d59c7b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionChannelTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionChannelTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSubscriptionChannelTypeList extends FHIRStringPrimitive * Validation map for fields in type SubscriptionChannelType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['rest-hook','websocket','email','sms','message',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionStatusList.php index d5d3c6632e..71ea5db46f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSubscriptionStatusList extends FHIRStringPrimitive * Validation map for fields in type SubscriptionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['requested','active','error','off',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyDeliveryStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyDeliveryStatusList.php index c645dbc56c..0b4b2f42d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyDeliveryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyDeliveryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSupplyDeliveryStatusList extends FHIRStringPrimitive * Validation map for fields in type SupplyDeliveryStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','completed','abandoned',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyRequestStatusList.php index 5011680c08..40cf8e78cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSupplyRequestStatusList extends FHIRStringPrimitive * Validation map for fields in type SupplyRequestStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['requested','completed','failed','cancelled',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSystemRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSystemRestfulInteractionList.php index ba969b3bd9..5a508f879c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSystemRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSystemRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSystemRestfulInteractionList extends FHIRStringPrimitive * Validation map for fields in type SystemRestfulInteraction-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['transaction','search-system','history-system',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTransactionModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTransactionModeList.php index b9984cce24..835ed4977b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTransactionModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTransactionModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTransactionModeList extends FHIRStringPrimitive * Validation map for fields in type TransactionMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-supported','batch','transaction','both',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTypeRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTypeRestfulInteractionList.php index d8543f6245..8fbd2c96fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTypeRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTypeRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTypeRestfulInteractionList extends FHIRStringPrimitive * Validation map for fields in type TypeRestfulInteraction-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['read','vread','update','delete','history-instance','validate','history-type','create','search-type',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnitsOfTimeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnitsOfTimeList.php index 0bab44f091..4fb3d5fdb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnitsOfTimeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnitsOfTimeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRUnitsOfTimeList extends FHIRStringPrimitive * Validation map for fields in type UnitsOfTime-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['s','min','h','d','wk','mo','a',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnknownContentCodeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnknownContentCodeList.php index 43de64b0b1..691b3c673f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnknownContentCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnknownContentCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRUnknownContentCodeList extends FHIRStringPrimitive * Validation map for fields in type UnknownContentCode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['no','extensions','elements','both',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUseList.php index 0530b57699..7f4dc297e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRUseList extends FHIRStringPrimitive * Validation map for fields in type Use-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['complete','proposed','exploratory','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionBaseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionBaseList.php index 1161d24dd3..30a072abbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionBaseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionBaseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRVisionBaseList extends FHIRStringPrimitive * Validation map for fields in type VisionBase-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['up','down','in','out',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionEyesList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionEyesList.php index 5a631a104f..7004dee8aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionEyesList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionEyesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRVisionEyesList extends FHIRStringPrimitive * Validation map for fields in type VisionEyes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['right','left',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRXPathUsageTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRXPathUsageTypeList.php index 20a400f401..f3baae3644 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRXPathUsageTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRXPathUsageTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRXPathUsageTypeList extends FHIRStringPrimitive * Validation map for fields in type XPathUsageType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['normal','phonetic','nearby','distance','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRTimePrimitive.php index 2085d74876..4496bad158 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRTimePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TIME_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRTimePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type time-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?$/', ], @@ -177,7 +179,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -188,11 +190,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIME_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUnsignedIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUnsignedIntPrimitive.php index 98f1af10c7..d697de80c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUnsignedIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUnsignedIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRUnsignedIntPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRUnsignedIntPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type unsignedInt-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[0]|([1-9][0-9]*)$/', ], @@ -181,11 +183,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUriPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUriPrimitive.php index 453f907ebc..e64cf504cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUriPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUriPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRUriPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_URI_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRUriPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type uri-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUriPrimitive Constructor @@ -164,11 +166,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_URI_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUuidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUuidPrimitive.php index 7e5068195a..af3d3b31f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUuidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUuidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRUuidPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UUID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRUuidPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type uuid-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,11 +171,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UUID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRAutoloader.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRAutoloader.php index 3d762cce4b..feb1566cdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRAutoloader.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRAutoloader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -79,6 +79,9 @@ if (!trait_exists('\DCarbone\PHPFHIRGenerated\DSTU2\PHPFHIRCommentContainerTrait', false)) { require __DIR__ . DIRECTORY_SEPARATOR . 'PHPFHIRCommentContainerTrait.php'; } +if (!trait_exists('\DCarbone\PHPFHIRGenerated\DSTU2\PHPFHIRValidationAssertionsTrait', false)) { + require __DIR__ . DIRECTORY_SEPARATOR . 'PHPFHIRValidationAssertionsTrait.php'; +} // common classes if (!class_exists('\DCarbone\PHPFHIRGenerated\DSTU2\PHPFHIRConstants', false)) { diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerInterface.php index 25fc4996be..d3c2488d26 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerTrait.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerTrait.php index ef5376ddfa..b3183a5384 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerTrait.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerTrait.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRConstants.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRConstants.php index 7bfb691bf6..0ef1d736fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRConstants.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRConstants.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ abstract class PHPFHIRConstants const SOURCE_GENERATION_DATE = 'Sat, Oct 24, 2015 07:41+1100'; // PHPFHIR - const CODE_GENERATION_DATE = 'December 7th, 2019 16:36+0000'; + const CODE_GENERATION_DATE = 'December 22nd, 2019 07:25+0000'; // Common const JSON_FIELD_RESOURCE_TYPE = 'resourceType'; @@ -92,6 +92,8 @@ abstract class PHPFHIRConstants const INT_MAX = 2147483648; const INT_MIN = -2147483648; + const UNLIMITED = -1; + // Validation const VALIDATE_ENUM = 0x1; const VALIDATE_MIN_LENGTH = 0x2; diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRContainedTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRContainedTypeInterface.php index 9fb93aa80a..ccc3fd2ad3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRContainedTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRContainedTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParser.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParser.php index 44a9613c8f..93e760de5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParser.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParser.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParserConfig.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParserConfig.php index 6a2016c40e..25683fb27b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParserConfig.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParserConfig.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php index 9c7940eb74..f916b5becd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBooleanPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBooleanPrimitiveTest.php index c2a5fbd053..0a4cf93031 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBooleanPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBooleanPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRCodePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRCodePrimitiveTest.php index efeb44fc50..ff7d86f441 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRCodePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRCodePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDatePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDatePrimitiveTest.php index feee619f90..53221e12cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDatePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDatePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDateTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDateTimePrimitiveTest.php index 73757eabcc..b8823fcc80 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDateTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDateTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDecimalPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDecimalPrimitiveTest.php index 20d924acd7..9fcb1ffb82 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDecimalPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDecimalPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php index e68494476b..2a3569efb9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRActionListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRActionListTest.php index f0b0a6e423..4959fd4168 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTest.php index bd7618c6dd..bcc791da11 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php index 86fb45b2b5..390cae1acc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php index 9d09c2130f..8de4ecdfb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php index 5495fda7b6..7b06d8b678 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php index b107aa56c3..3c29b271c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php index d81f6191e9..fe2adba2e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCertaintyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCertaintyTest.php index 96900c65dc..38bfc5b3f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCertaintyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCertaintyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php index 898fddc280..294fb5fe5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php index 0f3d9e7561..446db30f80 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceStatusTest.php index 2c15841352..f6dd94ae8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php index 5b5ddd2d2c..3be28f17cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php index 2701de71c3..b22b6f9f33 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnswerFormatTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnswerFormatTest.php index 8705907fdc..f9987264a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnswerFormatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnswerFormatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php index eadcd6ec55..97142368ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php index 810b0f42b0..9428e90834 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php index 7dd09c2c23..0b2efc9a26 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php index a76f8718ac..a30aeb156f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php index 0a03043d4d..b4baf356c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php index baa1d1e6c7..3ca7d45e93 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php index 7ec0061d14..bdc036afcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventParticipantNetworkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventParticipantNetworkTypeTest.php index c4ce104e74..8906246c86 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventParticipantNetworkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventParticipantNetworkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php index 8f2d8f762f..a8b8f05b16 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php index 86b8f6fc43..b2c680358a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php index 29cf342be8..f27ebde439 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEventTest.php index 71d1191fea..c8f8e1a698 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php index 12a8c88926..16374be772 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObjectTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObjectTest.php index 21c6be4772..2517859fe9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObjectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObjectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipantTest.php index 1dfb17c881..71dea4c291 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php index 21d54e76a5..2d7bc82558 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php index deeabb24e9..9bcfa6365e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php index 6455511200..cd6391908d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php index 730da34d3a..c6e9f6b640 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php index 16e6348a27..c2c3c576aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php index 4e30f10496..661a620655 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php index 873714b13c..0ae519bc0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php index 136ec62095..3ba32360c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php index c4713d411f..77f5847a19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlanTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlanTest.php index 316cb50e5a..c469572741 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverageTest.php index c54dcda6d0..3b71bfe644 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php index 3a6876a297..3625e3dd02 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php index f444737521..50d030eef5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php index 70d9365526..7ca7afa740 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeethTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeethTest.php index 0c9d76757e..26465b425d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeethTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeethTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php index 1de9016451..437a607bc4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesisTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesisTest.php index 2822dda75a..2983268c3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php index d813268b5d..2f604c4058 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php index 4fd7341a3f..552d035739 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1Test.php index 04fe3473ee..bff0077911 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2Test.php index 5a72a885a9..ff7199f2c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3Test.php index e47ad23181..a9b924c226 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4Test.php index 124c36feae..f5917eb903 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php index 9c0847db9f..f9615f31d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverageTest.php index d8266410ed..2078a2b4e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php index c2486b7ec4..d766ea65d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php index 3074b07574..cbd73d69fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php index 157471b90a..f68ce748a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php index ff017498d9..82ba1b67ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNoteTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNoteTest.php index 26fb857a99..0656542925 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php index 201428a5bb..a1fb37fc3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php index 8a24c76266..3c0a202273 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationsTest.php index 0916feaa5d..372b955c7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOutTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOutTest.php index 8134b099b3..113b01e3b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOutTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOutTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php index 99b4df0d3a..3287af94c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php index 354e2e4ccb..8947f3fb2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php index 8abf525718..16d114695a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php index 75a6c153c0..e37483dfd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php index 4c4133394c..a9ce13b0e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContactTest.php index fe39d1ab6c..3f9ee76c1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php index 999362bc65..11aca10ea5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php index 02bd363151..08f981fb69 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php index a206ab6e33..7ffdf80556 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php index bf75a6c017..d41e4826f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php index ccef6b671a..3444db0d3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php index b687073c2f..c3bfd375bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContactTest.php index e61a457419..4f89c0ed98 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php index 9175cb47cb..48f0ccbaae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpointTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpointTest.php index b7b8889bb0..7ba9768df1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php index 6c0b6dc6eb..0ad9506a10 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php index e0d45b4ed3..f4c0a6970d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1Test.php index f813525699..c3970f3d9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteractionTest.php index 5669dcaec1..a505438b08 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php index 4d4d69f259..61ad33d0c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php index 9354b751b8..20d27ef960 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php index f5865b67ae..015611e4db 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php index 3e92373e69..e5f7519ad0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php index c68ebb60ef..bda13cb5cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php index af119f916d..4eb54f0480 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php index ec71ea803b..5a0a98319c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1Test.php index 0c3d10e82a..2eb8ea1f1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActorTest.php index 2ea39326cc..950e4b2e3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php index 4f4e47e897..062287ccaf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php index 382c2e3884..ba35b22ddf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php index 26ce4865b8..527c2117b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php index 1bf31bace7..0dafffc0bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php index 82fce33486..f384a3038d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php index 0ba68e62ed..577203f246 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php index 6cf99a052c..1bb5c667a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContactTest.php index f44f98e6a9..06a733e16f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php index 88175ce1bc..7d5de68ac5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php index aa3b906f35..c970bd37fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php index 83696a336e..d34b571a4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php index 9f21a10e25..c9c28b30e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php index f8f23f20c8..b84f0dfea7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php index 05b3275682..2966a27ae4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php index 3ef1cef29b..4c2115fd34 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php index 7d9d8a391e..f4e1a78412 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php index 0a0dfd3b91..f603e194ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php index d6349ef068..eaa2544fe8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php index db5dc1c486..76ab0312b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php index eb6b110a4d..00c07b4f7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php index 2c53b9ef5e..0bd9858557 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php index 97aad68795..60da20649e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php index e946355bbb..fb09233d9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php index 1fc9349af0..ab24304ec1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php index a8b6fb3e41..4207555340 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeamTest.php index c640260056..b137eb97d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php index 00674129b5..663aaae594 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php index ddcd99644f..ee709c5bce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcomeTest.php index bb811cd106..78db999c2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php index db225822b4..5421db837d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php index 2066952d32..5b360546e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php index 0dc07cfbea..90e3ea0d46 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php index 9877787507..9813bf9cec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceTypeTest.php index 3d28f084fa..ff67f5c2a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFramesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFramesTest.php index 51fab99074..f7e02f1807 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFramesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFramesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstanceTest.php index 55f92f951b..e5912a2204 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeriesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeriesTest.php index 47b0fbbed9..14730edabd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudyTest.php index 1cd0c3e9ea..f5c725dac0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php index 14f88326d0..4a91bc4ed8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php index 7dc94aaa58..557069ca78 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php index 596ce13429..8426e6494f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php index 9b611603ca..06c97c3eb5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php index 0863003941..b11eff8ca1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php index 26598d87da..95a8b2c881 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php index 547d1103b6..ddfda98497 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php index c49e5cc9f5..7eba4bae66 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContactTest.php index a24b1bf944..aa36ec9eb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php index ebc7192ef4..07f0c05bd3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php index 0dc231a608..fe790c5ca5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php index 7ad10e27ad..0604be33de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php index 1d2669c7ea..c6161139fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php index 7033081af7..20b43d5e7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php index c8ce035d2b..f8edb7717a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php index 416290c619..0b0d225c9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php index 77f647e1ef..d781bbd1b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php index 589338be44..7b7cd23bcf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php index 5ae6fb43af..3cda8048a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php index 85342742b1..30710882bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php index 273247a26a..dbd3273c48 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php index a9ef0ccb5a..88aca7f1a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstructionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstructionTest.php index 6a486bf8e6..6e50a2bd26 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstructionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstructionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php index b4f294461c..52406f3c63 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequestTest.php index 748668ca71..d6f7721613 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstructionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstructionTest.php index b9ac35a2ee..e3425120ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstructionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstructionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitutionTest.php index ec4e0d8a25..3fc73ace2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php index d360db68b1..7d1686d8a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php index f96e02fe00..c2a289d0b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php index f85f2bbb17..6c535c68f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php index 6907066fa8..8bd2823500 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContactTest.php index b68c757d5a..74c0b44de3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php index a99ef338ef..94665b88be 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php index 5d20989fa0..5c4a0179bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php index 2a5b6cbf14..9e8fc9a680 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php index 8ca0df5981..e6208009a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php index 0046ffb00e..328f2df4da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php index 7b17b781c3..7631ef1ba6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php index 4fb864e442..eee72141d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php index 40e36d77ca..c7910b3a21 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php index 14f0714ddf..6fcfe04309 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php index b0373cde06..0e092cbb8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php index cabfe8c684..4a4161b657 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContactTest.php index 53d2d533b3..56ca2ef745 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php index 682d2964ac..ca84f6bf2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php index 5a39e116f9..c70e0d30c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php index eb6904a9bd..c58ac4ebbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php index bacf959e0b..3be8a3cc00 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php index cfa039ae0c..8ab82c8e46 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php index d7d24c3fb8..34de95e3cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php index a1cd872284..795c502ffc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php index 16ac1e581b..faaee5a182 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php index cd427ba91c..d41a5ce768 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php index 3374f45f67..28c0bb0dbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNoteTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNoteTest.php index c8df02bdb2..3bdd43b3b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php index f06ac99f80..0688949586 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRoleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRoleTest.php index 28a2c85d01..4637078882 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php index 83b2138e24..ad12ee1f0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php index a0f660e862..9080ea7b6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php index ae1e3251ce..2b6aaaea82 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php index 2bf306130a..c03960ab28 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotesTest.php index ae1386766f..a07ec21547 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php index 2519e9757d..d93aefa762 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php index 9413694e28..11131b9581 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgentTest.php index d297a462d9..a3939644a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php index 9fdd6e10a1..b721b90d66 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php index 81c9555d31..c025d70501 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php index 79a342a7db..e1d5b647e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroupTest.php index 3d24eb1c7b..5e283c83a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestionTest.php index 48585b4a35..a436e7526c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php index 09eb78b41d..3123fb0b79 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContactTest.php index 3a26a946bc..a1adc51d5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php index 2b51c229ab..d979f187d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php index 8de07ab907..e285606594 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php index 138eb6b68e..aba936059f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContactTest.php index 74a39382c7..c105290313 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php index f1eb7908d6..b8e4a56501 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php index e6ae3f98f9..7da734a5e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php index bdeff11e9c..227e6c1074 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php index 3108b03902..c02d120a35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php index 418a1e6a51..7508a7f160 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php index d78e4c80c2..0c02c4c699 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhenTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhenTest.php index 0ee6e27a18..575b922585 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php index ce35d8ea97..d555ba6fa7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php index 461e0c7d0d..a6f7d923f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php index a6ca4367c4..ea3f5734e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php index a66e7f1661..2af385f57d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php index e37017ca08..5acbd8573f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContactTest.php index 875e6724c6..2f96f63188 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php index 882ea42ac3..4141ba5db0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php index 2284882405..4d37979c33 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php index 7f4ed8564e..817427dee7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php index 389e776573..f26e12861a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php index 9153495800..ddf5fcbd15 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php index d3dbcbf297..5fcf4d7369 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php index 6c43964dcd..068cebe3da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php index 834db355f5..a3a3167920 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php index 45999fab54..cee382e543 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystemTest.php index 4150f304d8..791f5bf26c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php index a3fa69976f..58d90be593 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1Test.php index 0e53ea289c..b77cb220f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php index 641cd4d3a6..435892ad0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContactTest.php index db854dbfbd..1c18dfadc1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php index eb2288898b..af63429284 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php index d3ed5713cc..b44c97aef6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php index 908c1b204a..82d0f168dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php index cace76bcbf..dfea4aba4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php index bd04649395..4887a0c936 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php index 2e892e8144..c0faa78642 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php index c100202cdd..452e07d878 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php index 3ee7351a5a..93fd0723db 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php index cea51588e4..8e51568f4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php index c8efa95327..b17b180f17 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php index 1ebf769026..3720433036 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php index 47295e0498..d9f0580aa7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php index fee776d879..e93e777ce8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanRelationshipTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanRelationshipTest.php index 63d7db8778..7d1d005ee7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanRelationshipTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanRelationshipTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php index e783ffb037..04b1e0f3b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClaimTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClaimTypeTest.php index 2f5acb812b..4b21327023 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClaimTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClaimTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php index ccf5700990..790d41fb62 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeTest.php index b68418f921..3ce4f3c93b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php index d73cc1dd6f..58f279b975 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodingTest.php index 4d89ab8e06..dc3b60316b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationRequestStatusTest.php index 593c810cd9..89283ac682 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationStatusTest.php index e80f67be2c..5903e82bc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php index afaf58ef48..37c151fd64 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php index a26d14d92f..39207b016e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php index 138ef3ce11..c589f442e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php index ceac01f6d8..2f8194ef96 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php index f7d94a2d56..6778b9904d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php index ce838b435c..3e9eb98681 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceResourceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceResourceStatusTest.php index a8c1d4504d..5c8824b570 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceResourceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceResourceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceStatementKindTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceStatementKindTest.php index dce44c6dfd..a08dc67b53 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceStatementKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceStatementKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php index 979af3a535..0c9cd4958a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php index e925cbda88..f08054fcaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php index 15d74dd4c8..0c7eccb422 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php index 19a8f143bd..a8a9c7429a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php index 6551e46579..c7e60bc727 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php index 4a27f03582..f421437b75 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTest.php index 6949f44d02..4c975071b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php index 9b08b56d73..a668e72bc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php index a7875001e9..eea4fcf036 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php index c60d00df83..057a3adefe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php index e0eb61f0a6..817854c18a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php index 74ad890e5b..9f536ad2d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php index e39f8e75a1..6d228d5134 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php index e832d6549a..c58dfe0609 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php index f742f85545..b12c9f357c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php index d110f5c6cb..2bacbe7c17 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceStatusTest.php index c94129fbdf..00731d17cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestPriorityTest.php index f1fbdb2d2b..d5487b62d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestStatusTest.php index a5e80238e5..57e125331e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php index c1eddc05ff..40380720c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php index da2274172d..a46dfabc14 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php index 2ef6c65ca3..b6efe8b2ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php index 75d2b806d5..fa6ddb80d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php index 825ef6e680..6ce7153199 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php index 0100461867..f394aeff01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php index fdb295d7a6..2bbeec1012 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php index 2417333033..0c27ad7f06 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php index 32d8218713..b22ee4e3a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php index 98fe62383e..97ec03ffb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php index 3ddff1e5da..4fac17b288 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php index dc9ee806c8..d867574155 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php index a6d9eba5f7..81980d0f5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php index 8b0d47ade3..132958f624 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php index 156b6bfb44..0cbc85e035 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php index 8dfaafbee1..a4a94f72c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php index 705996476d..8117ac5f5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php index e8631f06bb..ea69c1f3c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php index 2cf1a09586..edccb518a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php index 415c371106..7948be0e65 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php index 5f1fdb9521..4eaf5d5491 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php index 7ccdfebacb..9498430a46 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php index 34bc08badf..eaaa913e17 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php index 823226dc26..cc49a59f73 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php index aa41ffb045..7bec1704a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php index 92ca59f5b9..052567903e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php index 58d45fcc04..bc21fc9934 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php index 824aabe3a4..d3df1fdf14 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideResourcePurposeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideResourcePurposeTest.php index 4bbdc4a4d1..2e33a5b99e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideResourcePurposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideResourcePurposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php index 200bd1ff40..b2e81798bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php index c08790f7dd..d7bd432884 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdTest.php index ff906540e4..1f1dda0514 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php index a03f12ac35..10c565fb21 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php index 8e968b9015..c0fed396fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php index 57a6d97477..fe2f99ef28 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php index fb11ae5769..108db628e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstantTest.php index 45ee1476bd..b7b88f366c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php index 4bc73bb4f5..1869669ec8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php index 6457951183..812ca0d4df 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php index f69d23ebb9..2bcf4ff7b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php index d622c8f454..0e253f99d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListModeTest.php index aea24ab784..4931de2e7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php index ef0793b775..a45e2bd2fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php index 9271272695..da158c5984 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php index 0edfd0b8ba..304210094f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php index a665b42a9c..30aab441b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMeasmnt_PrincipleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMeasmnt_PrincipleTest.php index b01bc5fe70..6a31878edc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMeasmnt_PrincipleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMeasmnt_PrincipleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php index 3acc0c2634..c5056978f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php index da7e306a91..32e80a29b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationOrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationOrderStatusTest.php index c40ba21379..2ce01c20cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationOrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationOrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php index fd1573b3cd..de0e5e5215 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php index 9635af8ef5..98d59b1aba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMetaTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMetaTest.php index d71360e6e8..872ecc6040 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMetaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMetaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php index c1853283ad..6e4c3fe273 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php index 5028c2aa83..18a46a3e87 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php index 17417be644..ebad1ba4c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php index 5428a429c5..34540536dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php index 49d43c4141..cced208904 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php index 43586a90cd..2b7d7964d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php index f06533814f..85d096bac3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php index 493566247d..cce93897e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php index 32665d4eb7..272b1233aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROidTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROidTest.php index 6800aad2f2..5b12c1713f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php index 2d1abf98d5..9a3a5ae43e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php index 0a0f8b09ba..dc54fb4d02 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROrderStatusTest.php index 90308d7243..9e550cbc95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php index eaf9843f79..ed5445a4e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantStatusTest.php index 08e229cc9d..270cffcd91 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php index a4a491e6ee..46853aa0ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php index 91cc1cf888..367e3e1977 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php index 863e81ef2d..954d3f7154 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestPriorityTest.php index 75bda4eabd..6b2fa9db68 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestStatusTest.php index db603a6624..1accb55658 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureStatusTest.php index 76ea2ef678..052ccd0f1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php index 836f0fd3a5..188127e0ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php index a3d1f73fa7..139340b17d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php index 21e1414e52..adfc6213b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php index 0b41104ce3..117c49a210 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php index 07f17f6824..c0a7676b67 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php index 57b22fc2d7..187ca10baa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php index b0387b6f73..ce5ced4f7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRSimpleQuantityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRSimpleQuantityTest.php index 7a16e17b4c..dab1728a8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRSimpleQuantityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRSimpleQuantityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php index 1c99f64c27..e335972f8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php index 41df63eaf2..6d9726bf09 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php index e645d464f2..6bf4051d7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php index a0a65600f6..e48a0214fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRangeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRangeTest.php index da5dcdcf87..1231b59a5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRatioTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRatioTest.php index 5d28667ff5..4b966a36b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRatioTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRatioTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php index 960da4aadf..32319077a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferralStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferralStatusTest.php index 8d3835828c..dde3473825 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferralStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferralStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php index dab8352b7a..adce5f6c02 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php index 97251304f8..6f29d624f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php index eaf6c14968..e1f131e01c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php index 20f6c9a422..a18eb293d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php index 4c46507d3b..7c5785453a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php index df22942a59..d8258fc1d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php index 25deee26e3..6a0908486a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php index 4da2afe41d..d00b2e0d44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php index 9697eb2b34..06455d6bde 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php index 5cc8f53109..dedef2f9e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php index 985cf4be23..a2e1ad4d17 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php index f1cae617a2..135c781b80 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php index 7181e895a0..f22ac8a51e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStringTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStringTest.php index e58d8aec8d..a0260241e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStringTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStringTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php index 3f9372a330..7a439377d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php index 536deafcdf..31ab20e06a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php index f33026c606..fcd9c0206c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php index 4f594e816d..df35c872fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php index cc6787d9fc..a582d19139 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php index cd078247f4..47afade5bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimeTest.php index d09a00b042..60d2ea09d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php index d22cad6854..3cb909fe9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimingTest.php index 8b646d58d0..4727c58395 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTransactionModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTransactionModeTest.php index 749ddc725b..af72a6d132 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTransactionModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTransactionModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php index 17be4650d7..bdaf498d2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php index 12706e6d67..b258ca076c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php index b34a10cf76..8424b2d72b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php index cb56ec0ce6..227ca58017 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUriTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUriTest.php index d07335b230..7a43f4854b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUriTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUriTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUseTest.php index 0b59259512..015e2c3bfd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUuidTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUuidTest.php index 7818ad4c68..5d5355b5a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUuidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUuidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php index 11d768174e..6b23fcd6b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php index 2b5a15cb04..fe15d458a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php index e59eeb5052..a21a5a0645 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElementTest.php index d7a4fd331d..9445674070 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIdPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIdPrimitiveTest.php index f14d3167a6..b6d7207dc1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIdPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIdPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRInstantPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRInstantPrimitiveTest.php index a61dc75920..c794aee5e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRInstantPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRInstantPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIntegerPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIntegerPrimitiveTest.php index 9c2bd9aca8..6c95266317 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIntegerPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIntegerPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php index 8dc182f5bb..80f83185bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIROidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIROidPrimitiveTest.php index f451fa5358..4d1d77110b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIROidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIROidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php index 81f95fb885..63eaf335c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php index edfa354860..751660586d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBundleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBundleTest.php index 025a038046..764dd6d83a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBundleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBundleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php index b2b5f219a0..add0efed1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRAccount', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Account/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php index ffdfcd0362..f18cddc511 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRAllergyIntolerance', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/AllergyIntolerance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php index c543ef7ba0..146b312232 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRAppointmentResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/AppointmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php index 2813393143..feb7981a55 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRAppointment', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Appointment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php index 030ef6eae1..94ed9a98de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRAuditEvent', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/AuditEvent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php index bbdf03448c..1883f1afa0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRBasic', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Basic/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php index ec01da786a..593e4089b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRBodySite', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/BodySite/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php index 7d46354c7f..46b3fa975a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRCarePlan', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/CarePlan/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php index 113d7cda3e..520236042c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRClaimResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ClaimResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php index 5f872259ad..a60a30d254 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRClaim', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Claim/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php index a30f7e086b..5f7af4a7c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRClinicalImpression', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ClinicalImpression/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php index 80a70bc808..af990b8763 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRCommunicationRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/CommunicationRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php index ec30048647..4c5cd33b0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRCommunication', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Communication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php index 8492423e50..5d7ecb5a01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRComposition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Composition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php index 9ee21b06a0..ee4af91f1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRConceptMap', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ConceptMap/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php index c4de99826a..708d8f0faa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRCondition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Condition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConformanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConformanceTest.php index a9b5925ae0..00d1a50d5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConformanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConformanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRConformance', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Conformance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php index 1816ee28a2..3b13138e03 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRContract', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Contract/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php index f62d340113..524795b3ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRCoverage', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Coverage/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php index 28af3a04fd..483e8d0e3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDataElement', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/DataElement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php index 4deac95f60..e85fd23ad0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDetectedIssue', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/DetectedIssue/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php index 616843c599..3fcdb85105 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDeviceComponent', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceComponent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php index 376a12c501..281660ca9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDeviceMetric', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceMetric/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php index 282644f747..73d2ac13de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDevice', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Device/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequestTest.php index 5527203c94..6625f17996 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDeviceUseRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceUseRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php index 5212bb6938..5bb9b865cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDeviceUseStatement', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceUseStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrderTest.php index bc19d7012a..060620a0cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDiagnosticOrder', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/DiagnosticOrder/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php index 3331babacc..72049822c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDiagnosticReport', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/DiagnosticReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php index 6610ab390e..e725cd2bf9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDocumentManifest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/DocumentManifest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php index ec7a2d5249..901a8b9b36 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRDocumentReference', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/DocumentReference/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php index de953cf98f..2c7b24de36 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIREligibilityRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/EligibilityRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php index 495d8d483a..dabe2ac374 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIREligibilityResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/EligibilityResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php index f55486b802..224a25e052 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIREncounter', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Encounter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php index 6d36ef6940..1cf79f565b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIREnrollmentRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/EnrollmentRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php index 03e1b556b9..b2b0114386 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIREnrollmentResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/EnrollmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php index d849c64b2e..8edc265088 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIREpisodeOfCare', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/EpisodeOfCare/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php index 05466ff94d..94f0e70f9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRExplanationOfBenefit', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ExplanationOfBenefit/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php index d84f84609a..f227c289d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRFamilyMemberHistory', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/FamilyMemberHistory/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php index dedf328bb4..73331de770 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRFlag', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Flag/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php index ab72f7bc66..3e6360478a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRGoal', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Goal/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php index c5ba4d07f5..0c6ae828eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRGroup', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Group/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php index 767d074b3c..58455bc593 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRHealthcareService', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/HealthcareService/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelectionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelectionTest.php index 7f26e53a7e..d8a4df5b3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRImagingObjectSelection', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ImagingObjectSelection/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php index e01dfef272..cd78166abb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRImagingStudy', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ImagingStudy/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php index 9b3c2727c4..6e6a115c45 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRImmunizationRecommendation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ImmunizationRecommendation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php index 15076c22f6..bc1cbd097d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRImmunization', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Immunization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php index 7c9b2180d2..6019fa95d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRImplementationGuide', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ImplementationGuide/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php index 85afcc71e6..eb542a5582 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRList', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/List/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php index 115fb473b7..7fb4427db2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRLocation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Location/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php index 329d07f7f1..3729411967 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRMedia', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Media/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php index c13235c57b..ef2f8b25f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRMedicationAdministration', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationAdministration/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php index ee425bf683..7098614bfb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRMedicationDispense', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationDispense/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationOrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationOrderTest.php index 81a66da8de..f59ae107b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRMedicationOrder', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationOrder/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php index 312bd81cf4..65e5397fee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRMedicationStatement', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php index 56dd2ea651..c2c24011e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRMedication', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Medication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php index 96881100e7..b82b0e94b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRMessageHeader', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/MessageHeader/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php index e687127cb8..30fca596cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRNamingSystem', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/NamingSystem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php index 74af2543f1..24589ce884 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRNutritionOrder', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/NutritionOrder/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php index f50f7652ff..23c28b85b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRObservation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Observation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php index 947cc0426c..1dbdea7628 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIROperationDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/OperationDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php index b512e549ee..0ce955b8d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIROperationOutcome', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/OperationOutcome/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderResponseTest.php index 79aef1e188..31b6fced9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIROrderResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/OrderResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderTest.php index e8613fc825..4c69ecbc2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIROrder', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Order/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php index 47cfc319c9..528433c193 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIROrganization', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Organization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php index 39c697d9ba..32d11b9c31 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRPatient', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Patient/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php index d79ba88f51..15c402ac0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRPaymentNotice', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/PaymentNotice/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php index c65e016a02..e507f3c2c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRPaymentReconciliation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/PaymentReconciliation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php index 218dadf76a..1043319554 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRPerson', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Person/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php index 94295aec09..9bc0739c7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRPractitioner', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Practitioner/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php index 43c33960d3..508a891943 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRProcedureRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ProcedureRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php index 00009c9b46..8365a9ad35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRProcedure', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Procedure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php index 5d4887c2e8..98496e8b12 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRProcessRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ProcessRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php index b9170b5844..40f1394e73 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRProcessResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ProcessResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php index f07920f591..cf1f4688c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRProvenance', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Provenance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php index be262ccb0b..4a043cc063 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRQuestionnaireResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/QuestionnaireResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php index 30de01e7fb..2d840abad9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRQuestionnaire', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Questionnaire/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php index 515a2fc576..296f8fed0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRReferralRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ReferralRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php index aeb8189786..4ef37a8ee7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRRelatedPerson', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/RelatedPerson/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php index 24e7caed39..574bf5aadb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRRiskAssessment', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/RiskAssessment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php index 4dbc33e438..d61b98bede 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRSchedule', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Schedule/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php index 65811829dc..0d68aa8aff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRSearchParameter', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/SearchParameter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php index 5bac06e632..c07678a13b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRSlot', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Slot/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php index 1e6b0c2d6e..12b7833b24 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRSpecimen', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Specimen/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php index 756f6b24a4..f16280550b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRStructureDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/StructureDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php index 8791fce44a..0b7af365c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRSubscription', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Subscription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php index 65e14625cd..dca8802d89 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRSubstance', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/Substance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php index 70e317d5f1..4eed6f3fe3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRSupplyDelivery', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/SupplyDelivery/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php index 5f16c9b7d5..8d19a27784 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRSupplyRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/SupplyRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php index 7b5cd116f1..17d64867ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRTestScript', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/TestScript/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php index a2b2aed3f9..16aeb86d04 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRValueSet', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/ValueSet/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php index 42a6e7bc15..bb2800fd36 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU2\FHIRResource\FHIRDomainResource\FHIRVisionPrescription', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu2/VisionPrescription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php index 3a0016de7d..6d6821d31f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRParametersTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRParametersTest.php index 2073e0c258..5f336031ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRParametersTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRParametersTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceContainerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceContainerTest.php index 6f1c7f8442..8838411328 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceTest.php index a28f9a1b41..7aba728b80 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php index 04e7b49395..07592992b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAccountStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAccountStatusListTest.php index 3c710c5f4d..af5519bff8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAccountStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAccountStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRActionListListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRActionListListTest.php index 5ff45de40c..708b4e5628 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRActionListListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRActionListListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressTypeListTest.php index c63c5aed0e..b782cae583 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php index 7c215cfee7..8de799644a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAdministrativeGenderListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAdministrativeGenderListTest.php index 6f2ab83b1e..ff4c1ce6e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAdministrativeGenderListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAdministrativeGenderListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php index 3753c7b19c..23a5f73ed6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryListTest.php index fd50609951..508c5a93eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyListTest.php index 266c6c76a4..409bb97ce6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityListTest.php index 2495e4cece..c3cbc1a392 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityListTest.php index 232f013b5c..02b5f7be6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusListTest.php index 86f38448a4..5219c14d1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeListTest.php index f9b676a6b2..001a3b077b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAnswerFormatListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAnswerFormatListTest.php index fb35960ab8..3de739e04b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAnswerFormatListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAnswerFormatListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAppointmentStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAppointmentStatusListTest.php index 60b9f5fa82..44eaf1e706 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAppointmentStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAppointmentStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionDirectionTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionDirectionTypeListTest.php index ddb0da3f78..661ca32220 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionDirectionTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionDirectionTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionOperatorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionOperatorTypeListTest.php index b47fdc9def..a26932bfee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionOperatorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionOperatorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionResponseTypesListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionResponseTypesListTest.php index 289826a3b8..55e2a094d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionResponseTypesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionResponseTypesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventActionListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventActionListTest.php index ec7493bc1a..0b19bfa623 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventOutcomeListTest.php index 63e29b8de1..2a5d275e19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeListTest.php index 53b218c9a5..961a04c130 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingStrengthListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingStrengthListTest.php index cc90772e5e..13c1e7ce0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingStrengthListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingStrengthListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBundleTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBundleTypeListTest.php index cf8cc99f87..1176bc905a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBundleTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBundleTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php index 80b26e79da..1987febaf2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanRelationshipListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanRelationshipListTest.php index 6bf1de36b3..390c3c97e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanRelationshipListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanRelationshipListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php index 47c3cbd9c5..7058c87cda 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClaimTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClaimTypeListTest.php index 9b0ac86bde..3bd85ca0c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClaimTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClaimTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClinicalImpressionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClinicalImpressionStatusListTest.php index c506049cc1..c6ce35be30 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClinicalImpressionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClinicalImpressionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationRequestStatusListTest.php index 83c11000ae..6bb670abf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationStatusListTest.php index 81ab93387a..9122c5fe98 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php index db73543b29..93383ecfda 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php index 979b3f833c..ff5365fbe0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php index 410d5bcadc..13530133e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionVerificationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionVerificationStatusListTest.php index bae9ff958c..5486ec8a6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionVerificationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionVerificationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionalDeleteStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionalDeleteStatusListTest.php index 31ebb7063e..ef8ff82d11 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionalDeleteStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionalDeleteStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php index 3ba98ab62e..9d2094aecb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceResourceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceResourceStatusListTest.php index 2823fdb480..4ce1b36c88 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceResourceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceResourceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementKindListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementKindListTest.php index 22dbe962ba..a51f118044 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php index f20d10d426..647704dfe1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointSystemListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointSystemListTest.php index 6ba0822017..6959c51002 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointSystemListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointSystemListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointUseListTest.php index 4876a24b88..8c90c9893c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContentTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContentTypeListTest.php index 543335497e..1de64d93a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContentTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContentTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDataElementStringencyListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDataElementStringencyListTest.php index 81eab40572..19584eb700 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDataElementStringencyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDataElementStringencyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDaysOfWeekListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDaysOfWeekListTest.php index 2a38e8c1b1..ecd2285b89 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDaysOfWeekListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDaysOfWeekListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDetectedIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDetectedIssueSeverityListTest.php index 7b03de17e4..266c35b3a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDetectedIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDetectedIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateListTest.php index 109b172268..2be86d02f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeListTest.php index 01fba35d4c..50edd65b0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCategoryListTest.php index de857e1067..04dd650294 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricColorListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricColorListTest.php index 67660f5190..f5287d0c37 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricColorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricColorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusListTest.php index e0e8888d8f..525e08caaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceStatusListTest.php index 22a65c0c7b..0d4006cb3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityListTest.php index 95f0494f2e..cfb8bac286 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestStatusListTest.php index 296b01857b..19c94bcc95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php index 885ef313ca..d55f9d8e6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php index d8b67757e8..f7869e435a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php index 78a20b28ba..6d8a2a398c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDigitalMediaTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDigitalMediaTypeListTest.php index 809c22a702..6a60ee1e99 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDigitalMediaTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDigitalMediaTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php index e699e75222..c592b0e953 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php index c8c7f7969c..72ebc64aab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php index 38cfdad252..6aab7257be 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php index 181d2d2450..1e54560c49 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterLocationStatusListTest.php index 5b269601d0..414d4eb335 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php index 3a6a34cec6..5b28cc2865 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREpisodeOfCareStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREpisodeOfCareStatusListTest.php index 872dffdce4..08ddcbc7c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREpisodeOfCareStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREpisodeOfCareStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php index beda621998..911f99c3bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php index 87a4d1e38e..d4d3ceb8ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFamilyHistoryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFamilyHistoryStatusListTest.php index 35d69242c9..b923812f3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFamilyHistoryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFamilyHistoryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php index bc656e1f33..fa667467e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFlagStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFlagStatusListTest.php index db47afe579..c8f2374f1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFlagStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFlagStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGoalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGoalStatusListTest.php index 7209138257..163c5ff6d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGoalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGoalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php index e16731c805..e1a737d32a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideDependencyTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideDependencyTypeListTest.php index fe80438654..1ca12cf0d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideDependencyTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideDependencyTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuidePageKindListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuidePageKindListTest.php index 865d81d1bf..9657692057 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuidePageKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuidePageKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideResourcePurposeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideResourcePurposeListTest.php index 2bce40b630..e7138c219e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideResourcePurposeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideResourcePurposeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRHTTPVerbListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRHTTPVerbListTest.php index d460528840..de4887c954 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRHTTPVerbListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRHTTPVerbListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php index c11d0585a3..6940cc52d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentityAssuranceLevelListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentityAssuranceLevelListTest.php index cc9bd5c9dd..4a22b1f0c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentityAssuranceLevelListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentityAssuranceLevelListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php index ed48449c93..2914d47c7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php index 3a1c995747..98858f67ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueTypeListTest.php index 6694752af9..b5095a989c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php index 0a0ae5aa91..0c83f7aae8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php index 9250078f95..bf539153e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListStatusListTest.php index 8cd33eeb53..cebde77a1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php index 114bf7605a..6bcb94d78e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php index fe33a930c4..d236020258 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMeasmnt_PrincipleListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMeasmnt_PrincipleListTest.php index a81e728e85..9bf9243f19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMeasmnt_PrincipleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMeasmnt_PrincipleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php index 2782a3f2df..aed30b30ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php index a5af1809fb..7243b7e99b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationOrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationOrderStatusListTest.php index 0e2c1291da..dbaf9889bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationOrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationOrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationStatementStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationStatementStatusListTest.php index c3e70dbca2..48e7517f3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationStatementStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationStatementStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php index 0c28f187a9..d4806e5527 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php index ac2ded6985..e73d18eaab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeListTest.php index f6c9493c6b..0404378fbd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemTypeListTest.php index dfd7eb07d7..40bde1b441 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php index 81e314d7e5..668bcf8d86 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNoteTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNoteTypeListTest.php index ada02ea7bf..e4ec1de9bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNoteTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNoteTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNutritionOrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNutritionOrderStatusListTest.php index e17d972196..0543061c57 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNutritionOrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNutritionOrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php index 2a671fedfe..a486ae2529 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php index 469d3751f5..3c382b7e9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationKindListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationKindListTest.php index bdd025aa5d..3922c5bb56 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationParameterUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationParameterUseListTest.php index 365adfeb51..cbfba90ff8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationParameterUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationParameterUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROrderStatusListTest.php index 34b6018978..9a1676b040 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantRequiredListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantRequiredListTest.php index 35bbd6af61..47f0abb513 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantRequiredListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantRequiredListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantStatusListTest.php index a125d1b59b..b7c6691bfb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipationStatusListTest.php index 763f6eda12..39ca6fc332 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestPriorityListTest.php index 4ffe9bb4dc..897a56316c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestStatusListTest.php index 0e3a281b74..e469036ea4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureStatusListTest.php index 6492c60c10..3f4f657e4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php index e57d8c35d1..109393d989 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php index 9c2a06d7f1..4ec8b24ca3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityComparatorListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityComparatorListTest.php index debac4b287..3c45b2a221 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityComparatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityComparatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusListTest.php index 01d23f39b1..29c87607bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php index ea0b6391b8..a47c730f6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRReferralStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRReferralStatusListTest.php index f6ca293ea3..0f1e2711c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRReferralStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRReferralStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRemittanceOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRemittanceOutcomeListTest.php index 5b6b1859da..d200b52189 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRemittanceOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRemittanceOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceVersionPolicyListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceVersionPolicyListTest.php index fa3d3706f5..01d59c0ed7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceVersionPolicyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceVersionPolicyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php index 788e41bfd2..4021c57575 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php index 2f3e904aad..d0f5fb4b35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchEntryModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchEntryModeListTest.php index 48219d1f7c..6923d8f175 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchEntryModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchEntryModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchModifierCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchModifierCodeListTest.php index 0443cd26e1..0083d706c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchModifierCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchModifierCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php index 6bcfcb721a..919f09f19c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php index b4ba6c1b50..a3c051cbb9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlotStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlotStatusListTest.php index 58343128bb..b40cff37b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlotStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlotStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSpecimenStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSpecimenStatusListTest.php index 7c12ea75c0..2687524fca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSpecimenStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSpecimenStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRStructureDefinitionKindListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRStructureDefinitionKindListTest.php index b4b4c10c44..e1b8b3c434 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRStructureDefinitionKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRStructureDefinitionKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionChannelTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionChannelTypeListTest.php index a186b10bcf..3f2c1c29be 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionChannelTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionChannelTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionStatusListTest.php index 9016174373..0afcabec8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDeliveryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDeliveryStatusListTest.php index 0e020cb19b..859da71289 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDeliveryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDeliveryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyRequestStatusListTest.php index 73a9452a08..9770325452 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSystemRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSystemRestfulInteractionListTest.php index 13e822bb8d..d9583c1e0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSystemRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSystemRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTransactionModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTransactionModeListTest.php index 7f13cdfedb..e07a5559ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTransactionModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTransactionModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTypeRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTypeRestfulInteractionListTest.php index 411a035553..5277b00900 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTypeRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTypeRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php index f4e6285047..2c782ec924 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnknownContentCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnknownContentCodeListTest.php index ee6d3d225b..701cc934f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnknownContentCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnknownContentCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUseListTest.php index 4650879c6c..3debf3c484 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionBaseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionBaseListTest.php index ccf709a5dc..2d74858bfc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionBaseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionBaseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionEyesListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionEyesListTest.php index 918be56061..723723935a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionEyesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionEyesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRXPathUsageTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRXPathUsageTypeListTest.php index 3506b332ca..70ee3e4aa9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRXPathUsageTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRXPathUsageTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitiveTest.php index a4ca43c773..758ab77330 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRTimePrimitiveTest.php index f6ef9f3ee8..56634a0bb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php index 631d6f1c86..df39cc21ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUriPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUriPrimitiveTest.php index d0b6fb72d4..ca982a6a33 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUriPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUriPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUuidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUuidPrimitiveTest.php index b4bc11bbcf..b61a9e3130 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUuidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUuidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRConstantsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRConstantsTest.php index 1236aab9ae..928d6961f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRConstantsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRConstantsTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRTypeMapTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRTypeMapTest.php index e9b8950b4c..4fed3aa49d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRTypeMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRTypeMapTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeInterface.php index 56d8ae3bf9..4e14ae4cd8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -97,12 +97,18 @@ public function _setFHIRXMLNamespace($xmlNamespace); */ public function _getFHIRXMLElementDefinition(); + /** + * Must return an associative array in structure ["field" => ["rule" => {constraint}]] to be used during validation + * @return array + */ + public function _getValidationRules(); + /** * Must return associative array where, if there are validation errors, the keys are the names of fields within the * type that failed validation. The value must be a string message describing the manner of error * @return array */ - public function _validationErrors(); + public function _getValidationErrors(); /** * @param \SimpleXMLElement|string|null $sxe diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeMap.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeMap.php index 8e37fea400..a2af26c4f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeMap.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:36+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRValidationAssertionsTrait.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRValidationAssertionsTrait.php new file mode 100644 index 0000000000..28665f126d --- /dev/null +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRValidationAssertionsTrait.php @@ -0,0 +1,219 @@ += $expected) { + return null; + } + if (null === $value || !is_array($value) || [] === $value) { + return sprintf('Field "%s" on type "%s" must have at least %d elements, but it is empty', $fieldName, $typeName, $expected); + } + if ($expected > ($cnt = count($value))) { + return sprintf('Field "%s" on type "%s" must have at least %d elements, %d seen.', $fieldName, $typeName, $expected, $cnt); + } + return null; + } + + /** + * Asserts that a given collection field has no more than the specified number of elements + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|array $value + * @return null|string + */ + protected function _assertMaxOccurs($typeName, $fieldName, $expected, $value) + { + if (PHPFHIRConstants::UNLIMITED === $expected || null === $value || !is_array($value) || [] === $value || $expected >= ($cnt = count($value))) { + return null; + } + return sprintf('Field "%s" on type "%s" must have no more than %d elements, %d seen', $fieldName, $typeName, $expected, $cnt); + } + + /** + * Asserts that a given string value is at least x characters long + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|string $value + * @return null|string + */ + protected function _assertMinLength($typeName, $fieldName, $expected, $value) + { + if (0 === $expected) { + return null; + } + if (null === $value || !is_string($value) || '' === $value) { + return sprintf('Field "%s" on type "%s" must be at least %d characters long, but it is empty', $fieldName, $typeName, $expected); + } + if ($expected > ($cnt = strlen($value))) { + return sprintf('Field "%s" on type "%s" must be at least %d characters long, %d seen.', $fieldName, $typeName, $expected, $cnt); + } + return null; + } + + /** + * Asserts that a given string value is no more than x characters long + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|string $value + * @return null|string + */ + protected function _assertMaxLength($typeName, $fieldName, $expected, $value) + { + if (PHPFHIRConstants::UNLIMITED === $expected || null === $value || !is_string($value) || '' === $value || $expected <= ($cnt = strlen($value))) { + return null; + } + return sprintf('Field "%s" on type "%s" must be no more than %d characters long, %d seen', $fieldName, $typeName, $expected, $cnt); + } + + /** + * Asserts that a given value is within the expected list of values + * @param string $typeName + * @param string $fieldName + * @param array $expected + * @param mixed $value + * @return null|string + */ + protected function _assertValueInEnum($typeName, $fieldName, array $expected, $value) + { + if ([] === $expected || in_array($value, $expected, true)) { + return null; + } + return sprintf( + 'Field "%s" on type "%s" value "%s" not in allowed list: [%s]', + $fieldName, + $typeName, + var_export($value, true), + implode( + ', ', + array_map( + function($v) { return var_export($v, true); }, + $expected + ) + ) + ); + } + + /** + * Asserts that a given string value matches the specified pattern + * @param string $typeName + * @param string $fieldName + * @param string $pattern + * @param null|string $value + * @return null|string + */ + protected function _assertPatternMatch($typeName, $fieldName, $pattern, $value) + { + if (null === $value || !is_string($pattern) || '' === $pattern || (bool)preg_match($pattern, $value)) { + return null; + } + return sprintf('Field "%s" on type "%s" value of "%s" does not match pattern: %s', $fieldName, $typeName, $value, $pattern); + } + + /** + * @param string $typeName + * @param string $fieldName + * @param string $ruleName + * @param mixed $constraint + * @param mixed $value + * @return null|string + */ + protected function _performValidation($typeName, $fieldName, $ruleName, $constraint, $value) + { + switch($ruleName) { + case PHPFHIRConstants::VALIDATE_ENUM: + return $this->_assertValueInEnum($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MIN_LENGTH: + return $this->_assertMinLength($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MAX_LENGTH: + return $this->_assertMaxLength($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MIN_OCCURS: + return $this->_assertMinOccurs($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MAX_OCCURS: + return $this->_assertMaxOccurs($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_PATTERN: + return $this->_assertPatternMatch($typeName, $fieldName, $constraint, $value); + + default: + return sprintf('Type "%s" specifies unknown validation for field "%s": Name "%s"; Constraint "%s"', $typeName, $fieldName, $ruleName, var_export($constraint, true)); + } + } +} diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRBase64BinaryPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRBase64BinaryPrimitive.php index 40d2d8139f..653db18977 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRBase64BinaryPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRBase64BinaryPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BASE_64BINARY_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type base64Binary-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^(\\s*([0-9a-zA-Z\\+\\/=]){4}\\s*)+$/', ], @@ -182,12 +184,38 @@ public function _writeToFile($fileHandle) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASE_64BINARY_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRBooleanPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRBooleanPrimitive.php index 36d690477f..f2c75e20db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRBooleanPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRBooleanPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BOOLEAN_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type boolean-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^true|false$/', ], @@ -168,12 +170,38 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BOOLEAN_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCanonicalPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCanonicalPrimitive.php index c783be6377..ff34cff6e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCanonicalPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCanonicalPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRCanonicalPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CANONICAL_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRCanonicalPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type canonical-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^\\S*$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,12 +171,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CANONICAL_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive.php index b9878a1b46..134b4f5d07 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRCodePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRCodePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type code-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[^\\s]+(\\s[^\\s]+)*$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,12 +171,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAccountStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAccountStatusList.php index dc80ad2788..16609377d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAccountStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAccountStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAccountStatusList extends FHIRCodePrimitive * Validation map for fields in type AccountStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error','on-hold','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php index 8d9c50186d..ab83982c0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionCardinalityBehaviorList extends FHIRCodePrimitive * Validation map for fields in type ActionCardinalityBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['single','multiple',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionConditionKindList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionConditionKindList.php index b7a7db5e01..4960de23bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionConditionKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionConditionKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionConditionKindList extends FHIRCodePrimitive * Validation map for fields in type ActionConditionKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['applicability','start','stop',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php index d5d2c4e419..763068b40e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionGroupingBehaviorList extends FHIRCodePrimitive * Validation map for fields in type ActionGroupingBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['visual-group','logical-group','sentence-group',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionParticipantTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionParticipantTypeList.php index 9ed18f06db..8e7f0ce8c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionParticipantTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionParticipantTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionParticipantTypeList extends FHIRCodePrimitive * Validation map for fields in type ActionParticipantType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['patient','practitioner','related-person','device',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php index 2d16f6833b..fba9f2459e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionPrecheckBehaviorList extends FHIRCodePrimitive * Validation map for fields in type ActionPrecheckBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['yes','no',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php index 0b5e14d3ed..98b3b4c542 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionRelationshipTypeList extends FHIRCodePrimitive * Validation map for fields in type ActionRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['before-start','before','before-end','concurrent-with-start','concurrent','concurrent-with-end','after-start','after','after-end',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php index e41a564d8e..a3ecce7751 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionRequiredBehaviorList extends FHIRCodePrimitive * Validation map for fields in type ActionRequiredBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['must','could','must-unless-documented',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php index dbfa8a7cd1..3397686de9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionSelectionBehaviorList extends FHIRCodePrimitive * Validation map for fields in type ActionSelectionBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['any','all','all-or-none','exactly-one','at-most-one','one-or-more',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressTypeList.php index 745f8a6e6a..987298ff63 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAddressTypeList extends FHIRCodePrimitive * Validation map for fields in type AddressType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['postal','physical','both',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressUseList.php index 834277458c..2ee4582cac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAddressUseList extends FHIRCodePrimitive * Validation map for fields in type AddressUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['home','work','temp','old','billing',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdministrativeGenderList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdministrativeGenderList.php index f412b61823..56a73e21af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdministrativeGenderList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdministrativeGenderList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAdministrativeGenderList extends FHIRCodePrimitive * Validation map for fields in type AdministrativeGender-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['male','female','other','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdverseEventActualityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdverseEventActualityList.php index b4c4d93b9e..dedcd8b288 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdverseEventActualityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdverseEventActualityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAdverseEventActualityList extends FHIRCodePrimitive * Validation map for fields in type AdverseEventActuality-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['actual','potential',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAggregationModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAggregationModeList.php index 8da4ce3903..66024c8027 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAggregationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAggregationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAggregationModeList extends FHIRCodePrimitive * Validation map for fields in type AggregationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['contained','referenced','bundled',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php index 00fb5f65eb..e852d88f8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceCategoryList extends FHIRCodePrimitive * Validation map for fields in type AllergyIntoleranceCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['food','medication','environment','biologic',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php index 10c3845d63..dfb8bbccf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceCriticalityList extends FHIRCodePrimitive * Validation map for fields in type AllergyIntoleranceCriticality-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['low','high','unable-to-assess',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php index 106acde4c6..82c1513968 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceSeverityList extends FHIRCodePrimitive * Validation map for fields in type AllergyIntoleranceSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['mild','moderate','severe',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php index ddc381f579..ffaf75c56a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceTypeList extends FHIRCodePrimitive * Validation map for fields in type AllergyIntoleranceType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['allergy','intolerance',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAppointmentStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAppointmentStatusList.php index 3dd86cee39..d93a930287 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAppointmentStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAppointmentStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAppointmentStatusList extends FHIRCodePrimitive * Validation map for fields in type AppointmentStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','pending','booked','arrived','fulfilled','cancelled','noshow','entered-in-error','checked-in','waitlist',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php index 056236b031..7ba207ef32 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAssertionDirectionTypeList extends FHIRCodePrimitive * Validation map for fields in type AssertionDirectionType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['response','request',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php index d6b48fdf2c..8e27f006b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAssertionOperatorTypeList extends FHIRCodePrimitive * Validation map for fields in type AssertionOperatorType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['equals','notEquals','in','notIn','greaterThan','lessThan','empty','notEmpty','contains','notContains','eval',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php index 2974037ba5..324822e45d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAssertionResponseTypesList extends FHIRCodePrimitive * Validation map for fields in type AssertionResponseTypes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['okay','created','noContent','notModified','bad','forbidden','notFound','methodNotAllowed','conflict','gone','preconditionFailed','unprocessable',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventActionList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventActionList.php index 88e256987a..5d504d05ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAuditEventActionList extends FHIRCodePrimitive * Validation map for fields in type AuditEventAction-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['C','R','U','D','E',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php index f51b04e132..7b9f50b523 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAuditEventAgentNetworkTypeList extends FHIRCodePrimitive * Validation map for fields in type AuditEventAgentNetworkType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['1','2','3','4','5',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php index 8444fa1f0e..7b659b394c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAuditEventOutcomeList extends FHIRCodePrimitive * Validation map for fields in type AuditEventOutcome-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['0','4','8','12',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBindingStrengthList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBindingStrengthList.php index f8fe392069..6fb5aa8084 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBindingStrengthList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBindingStrengthList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBindingStrengthList extends FHIRCodePrimitive * Validation map for fields in type BindingStrength-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['required','extensible','preferred','example',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryList.php index 0f7bd9cc0a..ded6ab73d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBiologicallyDerivedProductCategoryList extends FHIRCodePrimitive * Validation map for fields in type BiologicallyDerivedProductCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['organ','tissue','fluid','cells','biologicalAgent',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusList.php index 62414529a2..d1ee665b79 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBiologicallyDerivedProductStatusList extends FHIRCodePrimitive * Validation map for fields in type BiologicallyDerivedProductStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['available','unavailable',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleList.php index d29d52caa7..9fe393296b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBiologicallyDerivedProductStorageScaleList extends FHIRCodePrimitive * Validation map for fields in type BiologicallyDerivedProductStorageScale-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['farenheit','celsius','kelvin',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBundleTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBundleTypeList.php index 15a04aae09..d8e20644e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBundleTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBundleTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBundleTypeList extends FHIRCodePrimitive * Validation map for fields in type BundleType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['document','message','transaction','transaction-response','batch','batch-response','history','searchset','collection',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php index 3e1b0c9194..605d4c3b01 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCapabilityStatementKindList extends FHIRCodePrimitive * Validation map for fields in type CapabilityStatementKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['instance','capability','requirements',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityKindList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityKindList.php index 6bd8ad4ff4..7ca81eb36d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCarePlanActivityKindList extends FHIRCodePrimitive * Validation map for fields in type CarePlanActivityKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Appointment','CommunicationRequest','DeviceRequest','MedicationRequest','NutritionOrder','Task','ServiceRequest','VisionPrescription',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php index 12b288869b..4a3c9ca887 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCarePlanActivityStatusList extends FHIRCodePrimitive * Validation map for fields in type CarePlanActivityStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-started','scheduled','in-progress','on-hold','completed','cancelled','stopped','unknown','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanIntentList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanIntentList.php index 4f4bc9bcc8..a20f200faa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCarePlanIntentList extends FHIRCodePrimitive * Validation map for fields in type CarePlanIntent-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposal','plan','order','option',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCareTeamStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCareTeamStatusList.php index 7910ceb6f1..2b6e3f6b80 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCareTeamStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCareTeamStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCareTeamStatusList extends FHIRCodePrimitive * Validation map for fields in type CareTeamStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','active','suspended','inactive','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeList.php index 7e613f39d8..a8d933977e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCatalogEntryRelationTypeList extends FHIRCodePrimitive * Validation map for fields in type CatalogEntryRelationType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['triggers','is-replaced-by',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRChargeItemStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRChargeItemStatusList.php index 541a5f1b5e..9ab65a3497 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRChargeItemStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRChargeItemStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRChargeItemStatusList extends FHIRCodePrimitive * Validation map for fields in type ChargeItemStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','billable','not-billable','aborted','billed','entered-in-error','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClaimProcessingCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClaimProcessingCodesList.php index dc953dfff1..ae80df8e69 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClaimProcessingCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClaimProcessingCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRClaimProcessingCodesList extends FHIRCodePrimitive * Validation map for fields in type ClaimProcessingCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['queued','complete','error','partial',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php index ab483a0b3f..f08e2d09e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRClinicalImpressionStatusList extends FHIRCodePrimitive * Validation map for fields in type ClinicalImpressionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','completed','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSearchSupportList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSearchSupportList.php index 59267afb97..4abc0f9902 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSearchSupportList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSearchSupportList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCodeSearchSupportList extends FHIRCodePrimitive * Validation map for fields in type CodeSearchSupport-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['explicit','all',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php index 944b7b557a..d4608b6028 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCodeSystemContentModeList extends FHIRCodePrimitive * Validation map for fields in type CodeSystemContentMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-present','example','fragment','complete','supplement',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php index 0495293e6c..55930a8e6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCodeSystemHierarchyMeaningList extends FHIRCodePrimitive * Validation map for fields in type CodeSystemHierarchyMeaning-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['grouped-by','is-a','part-of','classified-with',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompartmentTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompartmentTypeList.php index cbe5a06748..1da8588781 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompartmentTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompartmentTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCompartmentTypeList extends FHIRCodePrimitive * Validation map for fields in type CompartmentType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Patient','Encounter','RelatedPerson','Practitioner','Device',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php index 7c922acc0b..9eed0c86ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCompositionAttestationModeList extends FHIRCodePrimitive * Validation map for fields in type CompositionAttestationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['personal','professional','legal','official',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionStatusList.php index de79c348ef..80dd27e6f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCompositionStatusList extends FHIRCodePrimitive * Validation map for fields in type CompositionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['preliminary','final','amended','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php index 6e40492530..ba42375335 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConceptMapEquivalenceList extends FHIRCodePrimitive * Validation map for fields in type ConceptMapEquivalence-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['relatedto','equivalent','equal','wider','subsumes','narrower','specializes','inexact','unmatched','disjoint',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php index 67b60176da..5917eba30f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConceptMapGroupUnmappedModeList extends FHIRCodePrimitive * Validation map for fields in type ConceptMapGroupUnmappedMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['provided','fixed','other-map',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php index dc04c2c75a..884664f9ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConditionalDeleteStatusList extends FHIRCodePrimitive * Validation map for fields in type ConditionalDeleteStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-supported','single','multiple',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalReadStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalReadStatusList.php index 846b96e803..dcaf836373 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalReadStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalReadStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConditionalReadStatusList extends FHIRCodePrimitive * Validation map for fields in type ConditionalReadStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-supported','modified-since','not-match','full-support',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentDataMeaningList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentDataMeaningList.php index 1720164b4e..ce6423c20c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentDataMeaningList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentDataMeaningList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConsentDataMeaningList extends FHIRCodePrimitive * Validation map for fields in type ConsentDataMeaning-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['instance','related','dependents','authoredby',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentProvisionTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentProvisionTypeList.php index 87da0317db..8258f689fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentProvisionTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentProvisionTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConsentProvisionTypeList extends FHIRCodePrimitive * Validation map for fields in type ConsentProvisionType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['deny','permit',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentStateList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentStateList.php index 16bf446c73..3d889cb907 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConsentStateList extends FHIRCodePrimitive * Validation map for fields in type ConsentState-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','proposed','active','rejected','inactive','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConstraintSeverityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConstraintSeverityList.php index a8f33bf08f..20322d19ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConstraintSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConstraintSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConstraintSeverityList extends FHIRCodePrimitive * Validation map for fields in type ConstraintSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['error','warning',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointSystemList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointSystemList.php index 2e2f83d367..f5c1a72411 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointSystemList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointSystemList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContactPointSystemList extends FHIRCodePrimitive * Validation map for fields in type ContactPointSystem-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['phone','fax','email','pager','url','sms','other',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointUseList.php index 388c9b39f3..ca7e856e82 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContactPointUseList extends FHIRCodePrimitive * Validation map for fields in type ContactPointUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['home','work','temp','old','mobile',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesList.php index 48d0134994..f6a4671182 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContractResourcePublicationStatusCodesList extends FHIRCodePrimitive * Validation map for fields in type ContractResourcePublicationStatusCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['amended','appended','cancelled','disputed','entered-in-error','executable','executed','negotiable','offered','policy','rejected','renewed','revoked','resolved','terminated',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php index 28adc907ef..0772530b5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContractResourceStatusCodesList extends FHIRCodePrimitive * Validation map for fields in type ContractResourceStatusCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['amended','appended','cancelled','disputed','entered-in-error','executable','executed','negotiable','offered','policy','rejected','renewed','revoked','resolved','terminated',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContributorTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContributorTypeList.php index 9857b7a029..dae8195e6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContributorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContributorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContributorTypeList extends FHIRCodePrimitive * Validation map for fields in type ContributorType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['author','editor','reviewer','endorser',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDaysOfWeekList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDaysOfWeekList.php index ec36102402..83061230e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDaysOfWeekList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDaysOfWeekList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDaysOfWeekList extends FHIRCodePrimitive * Validation map for fields in type DaysOfWeek-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['mon','tue','wed','thu','fri','sat','sun',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php index 53848c481e..84e2d9c875 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDetectedIssueSeverityList extends FHIRCodePrimitive * Validation map for fields in type DetectedIssueSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['high','moderate','low',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php index 60d474d209..4db5c00b9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricCalibrationStateList extends FHIRCodePrimitive * Validation map for fields in type DeviceMetricCalibrationState-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-calibrated','calibration-required','calibrated','unspecified',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php index 8110168c3d..8c9e5901c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricCalibrationTypeList extends FHIRCodePrimitive * Validation map for fields in type DeviceMetricCalibrationType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['unspecified','offset','gain','two-point',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php index bd6b154d96..0ef652babc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricCategoryList extends FHIRCodePrimitive * Validation map for fields in type DeviceMetricCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['measurement','setting','calculation','unspecified',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricColorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricColorList.php index 31ff9d98c8..8cc30e29f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricColorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricColorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricColorList extends FHIRCodePrimitive * Validation map for fields in type DeviceMetricColor-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['black','red','green','yellow','blue','magenta','cyan','white',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php index 4d7cf7fbb9..7a408bd2e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricOperationalStatusList extends FHIRCodePrimitive * Validation map for fields in type DeviceMetricOperationalStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['on','off','standby','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceNameTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceNameTypeList.php index 6abf3dc28e..a347ff6e6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceNameTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceNameTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceNameTypeList extends FHIRCodePrimitive * Validation map for fields in type DeviceNameType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['udi-label-name','user-friendly-name','patient-reported-name','manufacturer-name','model-name','other',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php index f81e9355c0..39f373dadd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceUseStatementStatusList extends FHIRCodePrimitive * Validation map for fields in type DeviceUseStatementStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','completed','entered-in-error','intended','stopped','on-hold',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php index 61d0dfc3b1..e3eb455029 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDiagnosticReportStatusList extends FHIRCodePrimitive * Validation map for fields in type DiagnosticReportStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['registered','partial','preliminary','final','amended','corrected','appended','cancelled','entered-in-error','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php index 6913abcd04..2561efd46a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDiscriminatorTypeList extends FHIRCodePrimitive * Validation map for fields in type DiscriminatorType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['value','exists','pattern','type','profile',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentModeList.php index a5f9f7ab1a..ed0628b393 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentModeList extends FHIRCodePrimitive * Validation map for fields in type DocumentMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['producer','consumer',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php index dedf84e5ac..c90b954d66 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentReferenceStatusList extends FHIRCodePrimitive * Validation map for fields in type DocumentReferenceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['current','superseded','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php index b9bdec478e..bc9fbed4db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentRelationshipTypeList extends FHIRCodePrimitive * Validation map for fields in type DocumentRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['replaces','transforms','signs','appends',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityRequestPurposeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityRequestPurposeList.php index 30fa51de00..88f7b5af33 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityRequestPurposeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityRequestPurposeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREligibilityRequestPurposeList extends FHIRCodePrimitive * Validation map for fields in type EligibilityRequestPurpose-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['auth-requirements','benefits','discovery','validation',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityResponsePurposeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityResponsePurposeList.php index 9882dd3e35..abf28b6514 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityResponsePurposeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityResponsePurposeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREligibilityResponsePurposeList extends FHIRCodePrimitive * Validation map for fields in type EligibilityResponsePurpose-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['auth-requirements','benefits','discovery','validation',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREnableWhenBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREnableWhenBehaviorList.php index 2749b411b4..232746aaa3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREnableWhenBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREnableWhenBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREnableWhenBehaviorList extends FHIRCodePrimitive * Validation map for fields in type EnableWhenBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['all','any',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterLocationStatusList.php index e2254e089f..2839e5fa62 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREncounterLocationStatusList extends FHIRCodePrimitive * Validation map for fields in type EncounterLocationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','active','reserved','completed',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterStatusList.php index 75608b2deb..5cc8d7f8e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREncounterStatusList extends FHIRCodePrimitive * Validation map for fields in type EncounterStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','arrived','triaged','in-progress','onleave','finished','cancelled','entered-in-error','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREndpointStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREndpointStatusList.php index 5d3b801a4a..f97967e477 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREndpointStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREndpointStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREndpointStatusList extends FHIRCodePrimitive * Validation map for fields in type EndpointStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','suspended','error','off','entered-in-error','test',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php index 6135fac47f..ae3dc877e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREpisodeOfCareStatusList extends FHIRCodePrimitive * Validation map for fields in type EpisodeOfCareStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','waitlist','active','onhold','finished','cancelled','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventCapabilityModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventCapabilityModeList.php index a48d0b2535..e83fdc69f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventCapabilityModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventCapabilityModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREventCapabilityModeList extends FHIRCodePrimitive * Validation map for fields in type EventCapabilityMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['sender','receiver',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventStatusList.php index cc229b47a0..0d7cbd14f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREventStatusList extends FHIRCodePrimitive * Validation map for fields in type EventStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['preparation','in-progress','not-done','on-hold','stopped','completed','entered-in-error','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventTimingList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventTimingList.php index 743801e779..a40e9106ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventTimingList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventTimingList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREventTimingList extends FHIRCodePrimitive * Validation map for fields in type EventTiming-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['MORN','MORN.early','MORN.late','NOON','AFT','AFT.early','AFT.late','EVE','EVE.early','EVE.late','NIGHT','PHS','HS','WAKE','C','CM','CD','CV','AC','ACM','ACD','ACV','PC','PCM','PCD','PCV',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREvidenceVariableTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREvidenceVariableTypeList.php index 3c7e5e89cf..a1516fd7e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREvidenceVariableTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREvidenceVariableTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREvidenceVariableTypeList extends FHIRCodePrimitive * Validation map for fields in type EvidenceVariableType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['dichotomous','continuous','descriptive',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExampleScenarioActorTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExampleScenarioActorTypeList.php index c38711943a..6225361c7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExampleScenarioActorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExampleScenarioActorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRExampleScenarioActorTypeList extends FHIRCodePrimitive * Validation map for fields in type ExampleScenarioActorType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['person','entity',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php index 267ee1b97b..fb40164ae4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRExplanationOfBenefitStatusList extends FHIRCodePrimitive * Validation map for fields in type ExplanationOfBenefitStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','cancelled','draft','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExposureStateList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExposureStateList.php index 2dd5993c17..a30b900d1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExposureStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExposureStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRExposureStateList extends FHIRCodePrimitive * Validation map for fields in type ExposureState-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['exposure','exposure-alternative',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExpressionLanguageList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExpressionLanguageList.php index a22f60f487..265a40c4bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExpressionLanguageList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExpressionLanguageList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRExpressionLanguageList extends FHIRCodePrimitive * Validation map for fields in type ExpressionLanguage-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['text/cql','text/fhirpath','application/x-fhir-query',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExtensionContextTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExtensionContextTypeList.php index 2e904227a7..0e3d3c9d3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExtensionContextTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExtensionContextTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRExtensionContextTypeList extends FHIRCodePrimitive * Validation map for fields in type ExtensionContextType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['fhirpath','element','extension',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php index 73faf0dadd..70832a5d49 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFHIRDeviceStatusList extends FHIRCodePrimitive * Validation map for fields in type FHIRDeviceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php index d95719dfd5..7322ac3bf2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFHIRSubstanceStatusList extends FHIRCodePrimitive * Validation map for fields in type FHIRSubstanceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRVersionList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRVersionList.php index f70866e514..1dcf6a1bb9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRVersionList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRVersionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFHIRVersionList extends FHIRCodePrimitive * Validation map for fields in type FHIRVersion-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['0.01','0.05','0.06','0.11','0.0.80','0.0.81','0.0.82','0.4.0','0.5.0','1.0.0','1.0.1','1.0.2','1.1.0','1.4.0','1.6.0','1.8.0','3.0.0','3.0.1','3.3.0','3.5.0','4.0.0','4.0.1',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php index d72b763904..300e9704bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFamilyHistoryStatusList extends FHIRCodePrimitive * Validation map for fields in type FamilyHistoryStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['partial','completed','entered-in-error','health-unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFilterOperatorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFilterOperatorList.php index 2c448374fe..8168d6f526 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFilterOperatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFilterOperatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFilterOperatorList extends FHIRCodePrimitive * Validation map for fields in type FilterOperator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['=','is-a','descendent-of','is-not-a','regex','in','not-in','generalizes','exists',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php index 5999de2054..6adfb9975a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFinancialResourceStatusCodesList extends FHIRCodePrimitive * Validation map for fields in type FinancialResourceStatusCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','cancelled','draft','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFlagStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFlagStatusList.php index 1b61c1f618..cb91f6d4e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFlagStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFlagStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFlagStatusList extends FHIRCodePrimitive * Validation map for fields in type FlagStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGoalLifecycleStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGoalLifecycleStatusList.php index a55f32dc8c..a2af123716 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGoalLifecycleStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGoalLifecycleStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGoalLifecycleStatusList extends FHIRCodePrimitive * Validation map for fields in type GoalLifecycleStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','planned','accepted','active','on-hold','completed','cancelled','entered-in-error','rejected',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php index ade468ff1c..05b2ad2cba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGraphCompartmentRuleList extends FHIRCodePrimitive * Validation map for fields in type GraphCompartmentRule-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['identical','matching','different','custom',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentUseList.php index 2906dad83b..328d516474 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGraphCompartmentUseList extends FHIRCodePrimitive * Validation map for fields in type GraphCompartmentUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['condition','requirement',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupMeasureList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupMeasureList.php index 31e4738cb5..409a02d4f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupMeasureList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupMeasureList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGroupMeasureList extends FHIRCodePrimitive * Validation map for fields in type GroupMeasure-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['mean','median','mean-of-mean','mean-of-median','median-of-mean','median-of-median',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupTypeList.php index a582cde052..18ab694ef7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGroupTypeList extends FHIRCodePrimitive * Validation map for fields in type GroupType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['person','animal','practitioner','device','medication','substance',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php index 1a244613cc..970584bd0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGuidanceResponseStatusList extends FHIRCodePrimitive * Validation map for fields in type GuidanceResponseStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['success','data-requested','data-required','in-progress','failure','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidePageGenerationList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidePageGenerationList.php index 9e8ad97387..5acfd23cc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidePageGenerationList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidePageGenerationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGuidePageGenerationList extends FHIRCodePrimitive * Validation map for fields in type GuidePageGeneration-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['html','markdown','xml','generated',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuideParameterCodeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuideParameterCodeList.php index cc6e498648..b4cb886624 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuideParameterCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuideParameterCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGuideParameterCodeList extends FHIRCodePrimitive * Validation map for fields in type GuideParameterCode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['apply','path-resource','path-pages','path-tx-cache','expansion-parameter','rule-broken-links','generate-xml','generate-json','generate-turtle','html-template',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRHTTPVerbList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRHTTPVerbList.php index 2e80089949..13d9e7bc1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRHTTPVerbList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRHTTPVerbList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRHTTPVerbList extends FHIRCodePrimitive * Validation map for fields in type HTTPVerb-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['GET','HEAD','POST','PUT','DELETE','PATCH',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentifierUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentifierUseList.php index 371007a630..a12f510b88 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentifierUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentifierUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIdentifierUseList extends FHIRCodePrimitive * Validation map for fields in type IdentifierUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['usual','official','temp','secondary','old',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php index 6275387c05..a57aedaa9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIdentityAssuranceLevelList extends FHIRCodePrimitive * Validation map for fields in type IdentityAssuranceLevel-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['level1','level2','level3','level4',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImagingStudyStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImagingStudyStatusList.php index c74bd0e6d8..23b272cda5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImagingStudyStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImagingStudyStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRImagingStudyStatusList extends FHIRCodePrimitive * Validation map for fields in type ImagingStudyStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['registered','available','cancelled','entered-in-error','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesList.php index 0977841d4b..e5c558ee82 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRImmunizationEvaluationStatusCodesList extends FHIRCodePrimitive * Validation map for fields in type ImmunizationEvaluationStatusCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['completed','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php index ce3f8c5179..0b1bcd92c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRImmunizationStatusCodesList extends FHIRCodePrimitive * Validation map for fields in type ImmunizationStatusCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['completed','entered-in-error','not-done',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeList.php index 14d7f4adf7..38fbc71136 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRInvoicePriceComponentTypeList extends FHIRCodePrimitive * Validation map for fields in type InvoicePriceComponentType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['base','surcharge','deduction','discount','tax','informational',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoiceStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoiceStatusList.php index 99314388f2..adb75b8774 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoiceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoiceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRInvoiceStatusList extends FHIRCodePrimitive * Validation map for fields in type InvoiceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','issued','balanced','cancelled','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueSeverityList.php index 1094195ee1..dfef6280c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIssueSeverityList extends FHIRCodePrimitive * Validation map for fields in type IssueSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['fatal','error','warning','information',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueTypeList.php index 08e6216453..b9190581b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIssueTypeList extends FHIRCodePrimitive * Validation map for fields in type IssueType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['invalid','structure','required','value','invariant','security','login','unknown','expired','forbidden','suppressed','processing','not-supported','duplicate','multiple-matches','not-found','deleted','too-long','code-invalid','extension','too-costly','business-rule','conflict','transient','lock-error','no-store','exception','timeout','incomplete','throttled','informational',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkTypeList.php index 1a7db93d0a..3f689a48db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLinkTypeList extends FHIRCodePrimitive * Validation map for fields in type LinkType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['replaced-by','replaces','refer','seealso',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkageTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkageTypeList.php index c175953f53..2f5e6ef896 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkageTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkageTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLinkageTypeList extends FHIRCodePrimitive * Validation map for fields in type LinkageType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['source','alternate','historical',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListModeList.php index db2e977161..8ce4872839 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRListModeList extends FHIRCodePrimitive * Validation map for fields in type ListMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['working','snapshot','changes',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListStatusList.php index c8532b44c5..418dce640f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRListStatusList extends FHIRCodePrimitive * Validation map for fields in type ListStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['current','retired','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationModeList.php index 1df9fb69ad..5f0a5179fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLocationModeList extends FHIRCodePrimitive * Validation map for fields in type LocationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['instance','kind',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationStatusList.php index c317420b1f..5ffc9eb984 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLocationStatusList extends FHIRCodePrimitive * Validation map for fields in type LocationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','suspended','inactive',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportStatusList.php index 2e0bc71f58..9765208531 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMeasureReportStatusList extends FHIRCodePrimitive * Validation map for fields in type MeasureReportStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['complete','pending','error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportTypeList.php index 586b64637b..fe015fe132 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMeasureReportTypeList extends FHIRCodePrimitive * Validation map for fields in type MeasureReportType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['individual','subject-list','summary','data-collection',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php index 40beb563e1..f82e5bc8af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationRequestIntentList extends FHIRCodePrimitive * Validation map for fields in type medicationRequestIntent-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposal','plan','order','original-order','reflex-order','filler-order','instance-order','option',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationStatusCodesList.php index b5384f20a3..cc025df1a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationStatusCodesList extends FHIRCodePrimitive * Validation map for fields in type MedicationStatusCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationrequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationrequestStatusList.php index cdce57a653..5b8a5cdbbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationrequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationrequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationrequestStatusList extends FHIRCodePrimitive * Validation map for fields in type medicationrequestStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','on-hold','cancelled','completed','entered-in-error','stopped','draft','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php index fdba07fd31..299f52dd44 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMessageSignificanceCategoryList extends FHIRCodePrimitive * Validation map for fields in type MessageSignificanceCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['consequence','currency','notification',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageheaderResponseRequestList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageheaderResponseRequestList.php index 6e433aeda8..599b1ebe94 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageheaderResponseRequestList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageheaderResponseRequestList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMessageheaderResponseRequestList extends FHIRCodePrimitive * Validation map for fields in type messageheaderResponseRequest-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['always','on-error','never','on-success',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNameUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNameUseList.php index 85688b833f..ad573684b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNameUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNameUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNameUseList extends FHIRCodePrimitive * Validation map for fields in type NameUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['usual','official','temp','nickname','anonymous','old','maiden',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php index ac92d158ab..b564d92902 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNamingSystemIdentifierTypeList extends FHIRCodePrimitive * Validation map for fields in type NamingSystemIdentifierType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['oid','uuid','uri','other',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemTypeList.php index bd570707cd..1bf5f4a431 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNamingSystemTypeList extends FHIRCodePrimitive * Validation map for fields in type NamingSystemType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['codesystem','identifier','root',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNarrativeStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNarrativeStatusList.php index fba5795cad..c920c11061 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNarrativeStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNarrativeStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNarrativeStatusList extends FHIRCodePrimitive * Validation map for fields in type NarrativeStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['generated','extensions','additional','empty',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNoteTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNoteTypeList.php index 8543622a8a..a38c9573dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNoteTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNoteTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNoteTypeList extends FHIRCodePrimitive * Validation map for fields in type NoteType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['display','print','printoper',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationDataTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationDataTypeList.php index 4d795e9693..e5774dc5dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationDataTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationDataTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRObservationDataTypeList extends FHIRCodePrimitive * Validation map for fields in type ObservationDataType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Quantity','CodeableConcept','string','boolean','integer','Range','Ratio','SampledData','time','dateTime','Period',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationRangeCategoryList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationRangeCategoryList.php index d51354b12c..40b37835cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationRangeCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationRangeCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRObservationRangeCategoryList extends FHIRCodePrimitive * Validation map for fields in type ObservationRangeCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['reference','critical','absolute',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationStatusList.php index f393fec362..e4a7948644 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRObservationStatusList extends FHIRCodePrimitive * Validation map for fields in type ObservationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['registered','preliminary','final','amended','corrected','cancelled','entered-in-error','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationKindList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationKindList.php index f59e30d21c..930dcb7449 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIROperationKindList extends FHIRCodePrimitive * Validation map for fields in type OperationKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['operation','query',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationParameterUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationParameterUseList.php index 54c751671a..76089628dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationParameterUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationParameterUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIROperationParameterUseList extends FHIRCodePrimitive * Validation map for fields in type OperationParameterUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in','out',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROrientationTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROrientationTypeList.php index 05ef1dac84..5b244fb20b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROrientationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROrientationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIROrientationTypeList extends FHIRCodePrimitive * Validation map for fields in type orientationType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['sense','antisense',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipantRequiredList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipantRequiredList.php index 01dbbd342f..2efc2dc2db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipantRequiredList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipantRequiredList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRParticipantRequiredList extends FHIRCodePrimitive * Validation map for fields in type ParticipantRequired-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['required','optional','information-only',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipationStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipationStatusList.php index a8d8ee47b3..ed54363317 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRParticipationStatusList extends FHIRCodePrimitive * Validation map for fields in type ParticipationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['accepted','declined','tentative','needs-action',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyRepresentationList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyRepresentationList.php index ee47f8841d..13e8d4c7dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyRepresentationList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyRepresentationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRPropertyRepresentationList extends FHIRCodePrimitive * Validation map for fields in type PropertyRepresentation-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['xmlAttr','xmlText','typeAttr','cdaText','xhtml',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyTypeList.php index 4673719bb8..25e39dd543 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRPropertyTypeList extends FHIRCodePrimitive * Validation map for fields in type PropertyType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['code','Coding','string','integer','boolean','dateTime','decimal',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php index 5be5dc9aa8..c6b9566620 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRProvenanceEntityRoleList extends FHIRCodePrimitive * Validation map for fields in type ProvenanceEntityRole-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['derivation','revision','quotation','source','removal',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPublicationStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPublicationStatusList.php index 6312f13feb..ba819624b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPublicationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPublicationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRPublicationStatusList extends FHIRCodePrimitive * Validation map for fields in type PublicationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','retired','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQualityTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQualityTypeList.php index 0083f55970..2f880c3185 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQualityTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQualityTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQualityTypeList extends FHIRCodePrimitive * Validation map for fields in type qualityType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['indel','snp','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuantityComparatorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuantityComparatorList.php index e80951c5a4..c194ecd7bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuantityComparatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuantityComparatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuantityComparatorList extends FHIRCodePrimitive * Validation map for fields in type QuantityComparator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['<','<=','>=','>',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorList.php index c067d88050..bf29451cbd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuestionnaireItemOperatorList extends FHIRCodePrimitive * Validation map for fields in type QuestionnaireItemOperator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['exists','=','!=','>','<','>=','<=',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php index ef41534375..e850c700e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuestionnaireItemTypeList extends FHIRCodePrimitive * Validation map for fields in type QuestionnaireItemType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['group','display','boolean','decimal','integer','date','dateTime','time','string','text','url','choice','open-choice','attachment','reference','quantity',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php index 09587c3fd6..836c5a971f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuestionnaireResponseStatusList extends FHIRCodePrimitive * Validation map for fields in type QuestionnaireResponseStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','completed','amended','entered-in-error','stopped',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php index bb45aca0c9..08f7533d6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRReferenceHandlingPolicyList extends FHIRCodePrimitive * Validation map for fields in type ReferenceHandlingPolicy-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['literal','logical','resolves','enforced','local',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php index 57f7cd5883..7cad4ab26a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRReferenceVersionRulesList extends FHIRCodePrimitive * Validation map for fields in type ReferenceVersionRules-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['either','independent','specific',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php index 1c16c5fdc9..5d8e69832d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRelatedArtifactTypeList extends FHIRCodePrimitive * Validation map for fields in type RelatedArtifactType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['documentation','justification','citation','predecessor','successor','derived-from','depends-on','composed-of',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php index afcd1e17f3..8db26258e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRemittanceOutcomeList extends FHIRCodePrimitive * Validation map for fields in type RemittanceOutcome-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['queued','complete','error','partial',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRepositoryTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRepositoryTypeList.php index 41d98d891b..f83dd75c81 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRepositoryTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRepositoryTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRepositoryTypeList extends FHIRCodePrimitive * Validation map for fields in type repositoryType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['directlink','openapi','login','oauth','other',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestIntentList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestIntentList.php index fc7d50a218..ae0799a922 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRequestIntentList extends FHIRCodePrimitive * Validation map for fields in type RequestIntent-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposal','plan','directive','order','original-order','reflex-order','filler-order','instance-order','option',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestPriorityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestPriorityList.php index f5caf1dde3..17be3cbd4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRequestPriorityList extends FHIRCodePrimitive * Validation map for fields in type RequestPriority-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['routine','urgent','asap','stat',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestResourceTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestResourceTypeList.php index f577537cd6..ee5387c7e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestResourceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestResourceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRequestResourceTypeList extends FHIRCodePrimitive * Validation map for fields in type RequestResourceType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Appointment','AppointmentResponse','CarePlan','Claim','CommunicationRequest','Contract','DeviceRequest','EnrollmentRequest','ImmunizationRecommendation','MedicationRequest','NutritionOrder','ServiceRequest','SupplyRequest','Task','VisionPrescription',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestStatusList.php index fd2d7b6920..8d2ae3284e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRequestStatusList extends FHIRCodePrimitive * Validation map for fields in type RequestStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','on-hold','revoked','completed','entered-in-error','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchElementTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchElementTypeList.php index 10bc76146d..92f4d27d10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchElementTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchElementTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResearchElementTypeList extends FHIRCodePrimitive * Validation map for fields in type ResearchElementType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['population','exposure','outcome',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchStudyStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchStudyStatusList.php index 2466efd346..10a169760a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchStudyStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchStudyStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResearchStudyStatusList extends FHIRCodePrimitive * Validation map for fields in type ResearchStudyStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','administratively-completed','approved','closed-to-accrual','closed-to-accrual-and-intervention','completed','disapproved','in-review','temporarily-closed-to-accrual','temporarily-closed-to-accrual-and-intervention','withdrawn',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php index cfd34b17a5..9b81700a8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResearchSubjectStatusList extends FHIRCodePrimitive * Validation map for fields in type ResearchSubjectStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['candidate','eligible','follow-up','ineligible','not-registered','off-study','on-study','on-study-intervention','on-study-observation','pending-on-study','potential-candidate','screening','withdrawn',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceTypeList.php index 7008a3bdfb..964b4323f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResourceTypeList extends FHIRCodePrimitive * Validation map for fields in type ResourceType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Account','ActivityDefinition','AdverseEvent','AllergyIntolerance','Appointment','AppointmentResponse','AuditEvent','Basic','Binary','BiologicallyDerivedProduct','BodyStructure','Bundle','CapabilityStatement','CarePlan','CareTeam','CatalogEntry','ChargeItem','ChargeItemDefinition','Claim','ClaimResponse','ClinicalImpression','CodeSystem','Communication','CommunicationRequest','CompartmentDefinition','Composition','ConceptMap','Condition','Consent','Contract','Coverage','CoverageEligibilityRequest','CoverageEligibilityResponse','DetectedIssue','Device','DeviceDefinition','DeviceMetric','DeviceRequest','DeviceUseStatement','DiagnosticReport','DocumentManifest','DocumentReference','DomainResource','EffectEvidenceSynthesis','Encounter','Endpoint','EnrollmentRequest','EnrollmentResponse','EpisodeOfCare','EventDefinition','Evidence','EvidenceVariable','ExampleScenario','ExplanationOfBenefit','FamilyMemberHistory','Flag','Goal','GraphDefinition','Group','GuidanceResponse','HealthcareService','ImagingStudy','Immunization','ImmunizationEvaluation','ImmunizationRecommendation','ImplementationGuide','InsurancePlan','Invoice','Library','Linkage','List','Location','Measure','MeasureReport','Media','Medication','MedicationAdministration','MedicationDispense','MedicationKnowledge','MedicationRequest','MedicationStatement','MedicinalProduct','MedicinalProductAuthorization','MedicinalProductContraindication','MedicinalProductIndication','MedicinalProductIngredient','MedicinalProductInteraction','MedicinalProductManufactured','MedicinalProductPackaged','MedicinalProductPharmaceutical','MedicinalProductUndesirableEffect','MessageDefinition','MessageHeader','MolecularSequence','NamingSystem','NutritionOrder','Observation','ObservationDefinition','OperationDefinition','OperationOutcome','Organization','OrganizationAffiliation','Parameters','Patient','PaymentNotice','PaymentReconciliation','Person','PlanDefinition','Practitioner','PractitionerRole','Procedure','Provenance','Questionnaire','QuestionnaireResponse','RelatedPerson','RequestGroup','ResearchDefinition','ResearchElementDefinition','ResearchStudy','ResearchSubject','Resource','RiskAssessment','RiskEvidenceSynthesis','Schedule','SearchParameter','ServiceRequest','Slot','Specimen','SpecimenDefinition','StructureDefinition','StructureMap','Subscription','Substance','SubstanceNucleicAcid','SubstancePolymer','SubstanceProtein','SubstanceReferenceInformation','SubstanceSourceMaterial','SubstanceSpecification','SupplyDelivery','SupplyRequest','Task','TerminologyCapabilities','TestReport','TestScript','ValueSet','VerificationResult','VisionPrescription',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php index 2ca629cb3d..a13b521d72 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResourceVersionPolicyList extends FHIRCodePrimitive * Validation map for fields in type ResourceVersionPolicy-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['no-version','versioned','versioned-update',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResponseTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResponseTypeList.php index fada088212..65e4317636 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResponseTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResponseTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResponseTypeList extends FHIRCodePrimitive * Validation map for fields in type ResponseType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['ok','transient-error','fatal-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php index a7a2abc38b..c158465a2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRestfulCapabilityModeList extends FHIRCodePrimitive * Validation map for fields in type RestfulCapabilityMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['client','server',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSPDXLicenseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSPDXLicenseList.php index cda271d357..293855db2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSPDXLicenseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSPDXLicenseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSPDXLicenseList extends FHIRCodePrimitive * Validation map for fields in type SPDXLicense-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-open-source','0BSD','AAL','Abstyles','Adobe-2006','Adobe-Glyph','ADSL','AFL-1.1','AFL-1.2','AFL-2.0','AFL-2.1','AFL-3.0','Afmparse','AGPL-1.0-only','AGPL-1.0-or-later','AGPL-3.0-only','AGPL-3.0-or-later','Aladdin','AMDPLPA','AML','AMPAS','ANTLR-PD','Apache-1.0','Apache-1.1','Apache-2.0','APAFML','APL-1.0','APSL-1.0','APSL-1.1','APSL-1.2','APSL-2.0','Artistic-1.0-cl8','Artistic-1.0-Perl','Artistic-1.0','Artistic-2.0','Bahyph','Barr','Beerware','BitTorrent-1.0','BitTorrent-1.1','Borceux','BSD-1-Clause','BSD-2-Clause-FreeBSD','BSD-2-Clause-NetBSD','BSD-2-Clause-Patent','BSD-2-Clause','BSD-3-Clause-Attribution','BSD-3-Clause-Clear','BSD-3-Clause-LBNL','BSD-3-Clause-No-Nuclear-License-2014','BSD-3-Clause-No-Nuclear-License','BSD-3-Clause-No-Nuclear-Warranty','BSD-3-Clause','BSD-4-Clause-UC','BSD-4-Clause','BSD-Protection','BSD-Source-Code','BSL-1.0','bzip2-1.0.5','bzip2-1.0.6','Caldera','CATOSL-1.1','CC-BY-1.0','CC-BY-2.0','CC-BY-2.5','CC-BY-3.0','CC-BY-4.0','CC-BY-NC-1.0','CC-BY-NC-2.0','CC-BY-NC-2.5','CC-BY-NC-3.0','CC-BY-NC-4.0','CC-BY-NC-ND-1.0','CC-BY-NC-ND-2.0','CC-BY-NC-ND-2.5','CC-BY-NC-ND-3.0','CC-BY-NC-ND-4.0','CC-BY-NC-SA-1.0','CC-BY-NC-SA-2.0','CC-BY-NC-SA-2.5','CC-BY-NC-SA-3.0','CC-BY-NC-SA-4.0','CC-BY-ND-1.0','CC-BY-ND-2.0','CC-BY-ND-2.5','CC-BY-ND-3.0','CC-BY-ND-4.0','CC-BY-SA-1.0','CC-BY-SA-2.0','CC-BY-SA-2.5','CC-BY-SA-3.0','CC-BY-SA-4.0','CC0-1.0','CDDL-1.0','CDDL-1.1','CDLA-Permissive-1.0','CDLA-Sharing-1.0','CECILL-1.0','CECILL-1.1','CECILL-2.0','CECILL-2.1','CECILL-B','CECILL-C','ClArtistic','CNRI-Jython','CNRI-Python-GPL-Compatible','CNRI-Python','Condor-1.1','CPAL-1.0','CPL-1.0','CPOL-1.02','Crossword','CrystalStacker','CUA-OPL-1.0','Cube','curl','D-FSL-1.0','diffmark','DOC','Dotseqn','DSDP','dvipdfm','ECL-1.0','ECL-2.0','EFL-1.0','EFL-2.0','eGenix','Entessa','EPL-1.0','EPL-2.0','ErlPL-1.1','EUDatagrid','EUPL-1.0','EUPL-1.1','EUPL-1.2','Eurosym','Fair','Frameworx-1.0','FreeImage','FSFAP','FSFUL','FSFULLR','FTL','GFDL-1.1-only','GFDL-1.1-or-later','GFDL-1.2-only','GFDL-1.2-or-later','GFDL-1.3-only','GFDL-1.3-or-later','Giftware','GL2PS','Glide','Glulxe','gnuplot','GPL-1.0-only','GPL-1.0-or-later','GPL-2.0-only','GPL-2.0-or-later','GPL-3.0-only','GPL-3.0-or-later','gSOAP-1.3b','HaskellReport','HPND','IBM-pibs','ICU','IJG','ImageMagick','iMatix','Imlib2','Info-ZIP','Intel-ACPI','Intel','Interbase-1.0','IPA','IPL-1.0','ISC','JasPer-2.0','JSON','LAL-1.2','LAL-1.3','Latex2e','Leptonica','LGPL-2.0-only','LGPL-2.0-or-later','LGPL-2.1-only','LGPL-2.1-or-later','LGPL-3.0-only','LGPL-3.0-or-later','LGPLLR','Libpng','libtiff','LiLiQ-P-1.1','LiLiQ-R-1.1','LiLiQ-Rplus-1.1','Linux-OpenIB','LPL-1.0','LPL-1.02','LPPL-1.0','LPPL-1.1','LPPL-1.2','LPPL-1.3a','LPPL-1.3c','MakeIndex','MirOS','MIT-0','MIT-advertising','MIT-CMU','MIT-enna','MIT-feh','MIT','MITNFA','Motosoto','mpich2','MPL-1.0','MPL-1.1','MPL-2.0-no-copyleft-exception','MPL-2.0','MS-PL','MS-RL','MTLL','Multics','Mup','NASA-1.3','Naumen','NBPL-1.0','NCSA','Net-SNMP','NetCDF','Newsletr','NGPL','NLOD-1.0','NLPL','Nokia','NOSL','Noweb','NPL-1.0','NPL-1.1','NPOSL-3.0','NRL','NTP','OCCT-PL','OCLC-2.0','ODbL-1.0','OFL-1.0','OFL-1.1','OGTSL','OLDAP-1.1','OLDAP-1.2','OLDAP-1.3','OLDAP-1.4','OLDAP-2.0.1','OLDAP-2.0','OLDAP-2.1','OLDAP-2.2.1','OLDAP-2.2.2','OLDAP-2.2','OLDAP-2.3','OLDAP-2.4','OLDAP-2.5','OLDAP-2.6','OLDAP-2.7','OLDAP-2.8','OML','OpenSSL','OPL-1.0','OSET-PL-2.1','OSL-1.0','OSL-1.1','OSL-2.0','OSL-2.1','OSL-3.0','PDDL-1.0','PHP-3.0','PHP-3.01','Plexus','PostgreSQL','psfrag','psutils','Python-2.0','Qhull','QPL-1.0','Rdisc','RHeCos-1.1','RPL-1.1','RPL-1.5','RPSL-1.0','RSA-MD','RSCPL','Ruby','SAX-PD','Saxpath','SCEA','Sendmail','SGI-B-1.0','SGI-B-1.1','SGI-B-2.0','SimPL-2.0','SISSL-1.2','SISSL','Sleepycat','SMLNJ','SMPPL','SNIA','Spencer-86','Spencer-94','Spencer-99','SPL-1.0','SugarCRM-1.1.3','SWL','TCL','TCP-wrappers','TMate','TORQUE-1.1','TOSL','Unicode-DFS-2015','Unicode-DFS-2016','Unicode-TOU','Unlicense','UPL-1.0','Vim','VOSTROM','VSL-1.0','W3C-19980720','W3C-20150513','W3C','Watcom-1.0','Wsuipa','WTFPL','X11','Xerox','XFree86-1.1','xinetd','Xnet','xpp','XSkat','YPL-1.0','YPL-1.1','Zed','Zend-2.0','Zimbra-1.3','Zimbra-1.4','zlib-acknowledgement','Zlib','ZPL-1.1','ZPL-2.0','ZPL-2.1',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchComparatorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchComparatorList.php index 818ac64087..bb1cf48967 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchComparatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchComparatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchComparatorList extends FHIRCodePrimitive * Validation map for fields in type SearchComparator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['eq','ne','gt','lt','ge','le','sa','eb','ap',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchEntryModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchEntryModeList.php index d5c92177b1..5a92a76aec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchEntryModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchEntryModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchEntryModeList extends FHIRCodePrimitive * Validation map for fields in type SearchEntryMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['match','include','outcome',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchModifierCodeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchModifierCodeList.php index 490916762c..28675f097d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchModifierCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchModifierCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchModifierCodeList extends FHIRCodePrimitive * Validation map for fields in type SearchModifierCode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['missing','exact','contains','not','text','in','not-in','below','above','type','identifier','ofType',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchParamTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchParamTypeList.php index 8dc08b3d4c..cf3cae25e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchParamTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchParamTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchParamTypeList extends FHIRCodePrimitive * Validation map for fields in type SearchParamType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['number','date','string','token','reference','composite','quantity','uri','special',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSequenceTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSequenceTypeList.php index da8607c00e..531a1e8ebb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSequenceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSequenceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSequenceTypeList extends FHIRCodePrimitive * Validation map for fields in type sequenceType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['aa','dna','rna',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlicingRulesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlicingRulesList.php index b51f73bec8..d5ba21aafc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlicingRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlicingRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSlicingRulesList extends FHIRCodePrimitive * Validation map for fields in type SlicingRules-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['closed','open','openAtEnd',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlotStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlotStatusList.php index 8c931c6110..de3f88750c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlotStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlotStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSlotStatusList extends FHIRCodePrimitive * Validation map for fields in type SlotStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['busy','free','busy-unavailable','busy-tentative','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSortDirectionList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSortDirectionList.php index cc92010252..1660fd902f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSortDirectionList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSortDirectionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSortDirectionList extends FHIRCodePrimitive * Validation map for fields in type SortDirection-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['ascending','descending',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceList.php index 7b13371971..632969c095 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSpecimenContainedPreferenceList extends FHIRCodePrimitive * Validation map for fields in type SpecimenContainedPreference-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['preferred','alternate',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenStatusList.php index 9133ac34af..b0d89f9764 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSpecimenStatusList extends FHIRCodePrimitive * Validation map for fields in type SpecimenStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['available','unavailable','unsatisfactory','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStatusList.php index 357db64ae7..3fd1e579aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStatusList extends FHIRCodePrimitive * Validation map for fields in type status-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['attested','validated','in-process','req-revalid','val-fail','reval-fail',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStrandTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStrandTypeList.php index 8a918b212a..bb86758ca9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStrandTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStrandTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStrandTypeList extends FHIRCodePrimitive * Validation map for fields in type strandType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['watson','crick',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php index c78b56b124..9dfd27cb23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureDefinitionKindList extends FHIRCodePrimitive * Validation map for fields in type StructureDefinitionKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['primitive-type','complex-type','resource','logical',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php index 4335655530..f1e4a73340 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapContextTypeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapContextType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['type','variable',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php index d141ec8521..a46ae3e24c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapGroupTypeModeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapGroupTypeMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['none','types','type-and-types',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapInputModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapInputModeList.php index 17faf7db16..7a13c5c6ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapInputModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapInputModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapInputModeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapInputMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['source','target',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapModelModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapModelModeList.php index c5c53aefee..682cd12ec9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapModelModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapModelModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapModelModeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapModelMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['source','queried','target','produced',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php index ce32a6f265..d5f3be08a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapSourceListModeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapSourceListMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['first','not_first','last','not_last','only_one',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php index 5020840e9e..13abeed8f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapTargetListModeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapTargetListMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['first','share','last','collate',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTransformList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTransformList.php index bd82806d61..951f9bd008 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTransformList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTransformList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapTransformList extends FHIRCodePrimitive * Validation map for fields in type StructureMapTransform-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['create','copy','truncate','escape','cast','append','translate','reference','dateOp','uuid','pointer','evaluate','cc','c','qty','id','cp',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php index 92bb718543..b5def42b64 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSubscriptionChannelTypeList extends FHIRCodePrimitive * Validation map for fields in type SubscriptionChannelType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['rest-hook','websocket','email','sms','message',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionStatusList.php index ab5ea93522..56aba4869f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSubscriptionStatusList extends FHIRCodePrimitive * Validation map for fields in type SubscriptionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['requested','active','error','off',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php index d0357584af..398ce7cc85 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSupplyDeliveryStatusList extends FHIRCodePrimitive * Validation map for fields in type SupplyDeliveryStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','completed','abandoned','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php index eb96a1394a..72561cba0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSupplyRequestStatusList extends FHIRCodePrimitive * Validation map for fields in type SupplyRequestStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','suspended','cancelled','completed','entered-in-error','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php index 78233ff232..469d68a1f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSystemRestfulInteractionList extends FHIRCodePrimitive * Validation map for fields in type SystemRestfulInteraction-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['transaction','batch','search-system','history-system',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskIntentList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskIntentList.php index f1f3e32687..3799753bec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTaskIntentList extends FHIRCodePrimitive * Validation map for fields in type TaskIntent-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['unknown','proposal','plan','order','original-order','reflex-order','filler-order','instance-order','option',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskStatusList.php index a23df9d843..ed78a86cc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTaskStatusList extends FHIRCodePrimitive * Validation map for fields in type TaskStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','requested','received','accepted','rejected','ready','cancelled','in-progress','on-hold','failed','completed','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportActionResultList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportActionResultList.php index aeab37627e..039decc9bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportActionResultList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportActionResultList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestReportActionResultList extends FHIRCodePrimitive * Validation map for fields in type TestReportActionResult-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['pass','skip','fail','warning','error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php index 0f7fd7725a..985ddc017a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestReportParticipantTypeList extends FHIRCodePrimitive * Validation map for fields in type TestReportParticipantType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['test-engine','client','server',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportResultList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportResultList.php index 2d5b969654..bfb02727ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportResultList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportResultList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestReportResultList extends FHIRCodePrimitive * Validation map for fields in type TestReportResult-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['pass','fail','pending',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportStatusList.php index 8741a8b99b..d254deeabe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestReportStatusList extends FHIRCodePrimitive * Validation map for fields in type TestReportStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['completed','in-progress','waiting','stopped','entered-in-error',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php index 5d5c7341fd..172336d98d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestScriptRequestMethodCodeList extends FHIRCodePrimitive * Validation map for fields in type TestScriptRequestMethodCode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['delete','get','options','patch','post','put','head',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTriggerTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTriggerTypeList.php index e8b87e0605..00794e1758 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTriggerTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTriggerTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTriggerTypeList extends FHIRCodePrimitive * Validation map for fields in type TriggerType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['named-event','periodic','data-changed','data-added','data-modified','data-removed','data-accessed','data-access-ended',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php index 37ebc105ca..5b16cd6a83 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTypeDerivationRuleList extends FHIRCodePrimitive * Validation map for fields in type TypeDerivationRule-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['specialization','constraint',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php index 0d6849e533..8b0a5052a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTypeRestfulInteractionList extends FHIRCodePrimitive * Validation map for fields in type TypeRestfulInteraction-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['read','vread','update','patch','delete','history-instance','history-type','create','search-type',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUDIEntryTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUDIEntryTypeList.php index ba0f596966..2308359aa0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUDIEntryTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUDIEntryTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRUDIEntryTypeList extends FHIRCodePrimitive * Validation map for fields in type UDIEntryType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['barcode','rfid','manual','card','self-reported','unknown',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUnitsOfTimeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUnitsOfTimeList.php index 2078315105..0ec4ecd596 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUnitsOfTimeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUnitsOfTimeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRUnitsOfTimeList extends FHIRCodePrimitive * Validation map for fields in type UnitsOfTime-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['s','min','h','d','wk','mo','a',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUseList.php index 864e74ead0..93e1d26494 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRUseList extends FHIRCodePrimitive * Validation map for fields in type Use-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['claim','preauthorization','predetermination',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVConfidentialityClassificationList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVConfidentialityClassificationList.php index 5715a3e2dc..0ba5d92b6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVConfidentialityClassificationList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVConfidentialityClassificationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRVConfidentialityClassificationList extends FHIRCodePrimitive * Validation map for fields in type vConfidentialityClassification-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['U','L','M','N','R','V',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVariableTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVariableTypeList.php index 153f888372..ddfd1034fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVariableTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVariableTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRVariableTypeList extends FHIRCodePrimitive * Validation map for fields in type VariableType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['dichotomous','continuous','descriptive',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionBaseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionBaseList.php index d7223bc50d..5ba084d5d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionBaseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionBaseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRVisionBaseList extends FHIRCodePrimitive * Validation map for fields in type VisionBase-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['up','down','in','out',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionEyesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionEyesList.php index 63a724f06d..144412016e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionEyesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionEyesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRVisionEyesList extends FHIRCodePrimitive * Validation map for fields in type VisionEyes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['right','left',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRXPathUsageTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRXPathUsageTypeList.php index adfe0adcfe..169bcc8dd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRXPathUsageTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRXPathUsageTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRXPathUsageTypeList extends FHIRCodePrimitive * Validation map for fields in type XPathUsageType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['normal','phonetic','nearby','distance','other',], ], @@ -118,12 +118,39 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDatePrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDatePrimitive.php index efeb1aaf60..307984c8df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDatePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDatePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRDatePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRDatePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type date-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?$/', ], @@ -177,7 +179,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -197,12 +199,38 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDateTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDateTimePrimitive.php index 5834dea0fb..1a354731ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDateTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDateTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_TIME_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type dateTime-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?$/', ], @@ -177,7 +179,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -198,12 +200,38 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_TIME_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDecimalPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDecimalPrimitive.php index f367b34d66..f6935415cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDecimalPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDecimalPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DECIMAL_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type decimal-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDecimalPrimitive Constructor @@ -164,12 +166,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DECIMAL_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement.php index e9e9a64ad5..3b17c6ba8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -75,6 +75,7 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ELEMENT; @@ -109,7 +110,7 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterf * Validation map for fields in type Element * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElement Constructor @@ -295,12 +296,39 @@ public function setId($id = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = []; + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ID] = $fieldErrs; + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAccountStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAccountStatus.php index a3655c181a..2cc05d7183 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAccountStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAccountStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAccountStatus extends FHIRElement * Validation map for fields in type AccountStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAccountStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionCardinalityBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionCardinalityBehavior.php index 18a62f5148..3c0778bfd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionCardinalityBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionCardinalityBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRActionCardinalityBehavior extends FHIRElement * Validation map for fields in type ActionCardinalityBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionCardinalityBehavior Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_CARDINALITY_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionConditionKind.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionConditionKind.php index fe6efccb30..42ebea322c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionConditionKind.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionConditionKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionConditionKind extends FHIRElement * Validation map for fields in type ActionConditionKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionConditionKind Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_CONDITION_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionGroupingBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionGroupingBehavior.php index 6494ca9853..39432cd6bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionGroupingBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionGroupingBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionGroupingBehavior extends FHIRElement * Validation map for fields in type ActionGroupingBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionGroupingBehavior Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_GROUPING_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionParticipantType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionParticipantType.php index 93536b06a1..2d8aca47fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionParticipantType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionParticipantType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionParticipantType extends FHIRElement * Validation map for fields in type ActionParticipantType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionParticipantType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_PARTICIPANT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionPrecheckBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionPrecheckBehavior.php index a5c2033afb..18d8ab5843 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionPrecheckBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionPrecheckBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionPrecheckBehavior extends FHIRElement * Validation map for fields in type ActionPrecheckBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionPrecheckBehavior Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_PRECHECK_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRelationshipType.php index 0987ed60b0..fea1ad55f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionRelationshipType extends FHIRElement * Validation map for fields in type ActionRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionRelationshipType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRequiredBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRequiredBehavior.php index 02aa128285..a71e312efd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRequiredBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRequiredBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionRequiredBehavior extends FHIRElement * Validation map for fields in type ActionRequiredBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionRequiredBehavior Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_REQUIRED_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionSelectionBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionSelectionBehavior.php index 66d6c3e71f..63fc88b8ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionSelectionBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionSelectionBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionSelectionBehavior extends FHIRElement * Validation map for fields in type ActionSelectionBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionSelectionBehavior Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_SELECTION_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddress.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddress.php index 56c372a5dd..8251360909 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddress.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddress.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -222,7 +222,7 @@ class FHIRAddress extends FHIRElement * Validation map for fields in type Address * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddress Constructor @@ -881,12 +881,223 @@ public function setUse(FHIRAddressUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCountry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNTRY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDistrict())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISTRICT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLine())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPostalCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POSTAL_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CITY])) { + $v = $this->getCity(); + foreach($validationRules[self::FIELD_CITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_CITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CITY])) { + $errs[self::FIELD_CITY] = []; + } + $errs[self::FIELD_CITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNTRY])) { + $v = $this->getCountry(); + foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_COUNTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY])) { + $errs[self::FIELD_COUNTRY] = []; + } + $errs[self::FIELD_COUNTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISTRICT])) { + $v = $this->getDistrict(); + foreach($validationRules[self::FIELD_DISTRICT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_DISTRICT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISTRICT])) { + $errs[self::FIELD_DISTRICT] = []; + } + $errs[self::FIELD_DISTRICT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINE])) { + $v = $this->getLine(); + foreach($validationRules[self::FIELD_LINE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_LINE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINE])) { + $errs[self::FIELD_LINE] = []; + } + $errs[self::FIELD_LINE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POSTAL_CODE])) { + $v = $this->getPostalCode(); + foreach($validationRules[self::FIELD_POSTAL_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_POSTAL_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POSTAL_CODE])) { + $errs[self::FIELD_POSTAL_CODE] = []; + } + $errs[self::FIELD_POSTAL_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATE])) { + $v = $this->getState(); + foreach($validationRules[self::FIELD_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATE])) { + $errs[self::FIELD_STATE] = []; + } + $errs[self::FIELD_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressType.php index 933913af16..84055bf579 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAddressType extends FHIRElement * Validation map for fields in type AddressType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddressType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressUse.php index 6a74666ee4..961e72585a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAddressUse extends FHIRElement * Validation map for fields in type AddressUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddressUse Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdministrativeGender.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdministrativeGender.php index 79a7d1100e..d9ffa82712 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdministrativeGender.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdministrativeGender.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRAdministrativeGender extends FHIRElement * Validation map for fields in type AdministrativeGender * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdministrativeGender Constructor @@ -165,12 +165,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADMINISTRATIVE_GENDER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdverseEventActuality.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdverseEventActuality.php index f1538b70ef..d7545df8e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdverseEventActuality.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdverseEventActuality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAdverseEventActuality extends FHIRElement * Validation map for fields in type AdverseEventActuality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseEventActuality Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_ACTUALITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAggregationMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAggregationMode.php index 2a36479b18..36038bd35d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAggregationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAggregationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAggregationMode extends FHIRElement * Validation map for fields in type AggregationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAggregationMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCategory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCategory.php index 2ef39754c4..1dabc9a882 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAllergyIntoleranceCategory extends FHIRElement * Validation map for fields in type AllergyIntoleranceCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceCategory Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCriticality.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCriticality.php index 9424f85cb7..31493228e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCriticality.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCriticality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAllergyIntoleranceCriticality extends FHIRElement * Validation map for fields in type AllergyIntoleranceCriticality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceCriticality Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CRITICALITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceSeverity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceSeverity.php index e51a998c7f..1e139dc05f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAllergyIntoleranceSeverity extends FHIRElement * Validation map for fields in type AllergyIntoleranceSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceSeverity Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceType.php index afac532a6f..3859bb67e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAllergyIntoleranceType extends FHIRElement * Validation map for fields in type AllergyIntoleranceType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAnnotation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAnnotation.php index a520cd12fe..0019c2fbd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAnnotation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAnnotation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRAnnotation extends FHIRElement * Validation map for fields in type Annotation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAnnotation Constructor @@ -426,12 +426,119 @@ public function setTime($time = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthorReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthorString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR_REFERENCE])) { + $v = $this->getAuthorReference(); + foreach($validationRules[self::FIELD_AUTHOR_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_AUTHOR_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR_REFERENCE])) { + $errs[self::FIELD_AUTHOR_REFERENCE] = []; + } + $errs[self::FIELD_AUTHOR_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR_STRING])) { + $v = $this->getAuthorString(); + foreach($validationRules[self::FIELD_AUTHOR_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_AUTHOR_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR_STRING])) { + $errs[self::FIELD_AUTHOR_STRING] = []; + } + $errs[self::FIELD_AUTHOR_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAppointmentStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAppointmentStatus.php index 74d8ec3474..93e0dc4459 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAppointmentStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAppointmentStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAppointmentStatus extends FHIRElement * Validation map for fields in type AppointmentStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAppointmentStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionDirectionType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionDirectionType.php index 3dae5b115d..c0036ee8db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionDirectionType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionDirectionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAssertionDirectionType extends FHIRElement * Validation map for fields in type AssertionDirectionType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAssertionDirectionType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ASSERTION_DIRECTION_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionOperatorType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionOperatorType.php index 7d270ede9b..dd68a406c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionOperatorType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionOperatorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAssertionOperatorType extends FHIRElement * Validation map for fields in type AssertionOperatorType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAssertionOperatorType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ASSERTION_OPERATOR_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionResponseTypes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionResponseTypes.php index af43be1daa..cbaf6fca6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionResponseTypes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionResponseTypes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAssertionResponseTypes extends FHIRElement * Validation map for fields in type AssertionResponseTypes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAssertionResponseTypes Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ASSERTION_RESPONSE_TYPES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAttachment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAttachment.php index a197fc1e88..4c2971cc5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAttachment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAttachment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -199,7 +199,7 @@ class FHIRAttachment extends FHIRElement * Validation map for fields in type Attachment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAttachment Constructor @@ -746,12 +746,187 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getHash())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HASH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSize())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIZE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATION])) { + $v = $this->getCreation(); + foreach($validationRules[self::FIELD_CREATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_CREATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATION])) { + $errs[self::FIELD_CREATION] = []; + } + $errs[self::FIELD_CREATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HASH])) { + $v = $this->getHash(); + foreach($validationRules[self::FIELD_HASH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_HASH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HASH])) { + $errs[self::FIELD_HASH] = []; + } + $errs[self::FIELD_HASH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIZE])) { + $v = $this->getSize(); + foreach($validationRules[self::FIELD_SIZE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_SIZE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIZE])) { + $errs[self::FIELD_SIZE] = []; + } + $errs[self::FIELD_SIZE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAction.php index d95e011784..ced62a27db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAuditEventAction extends FHIRElement * Validation map for fields in type AuditEventAction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventAction Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_ACTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAgentNetworkType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAgentNetworkType.php index ad6e6a6afc..304d95dcb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAgentNetworkType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAgentNetworkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAuditEventAgentNetworkType extends FHIRElement * Validation map for fields in type AuditEventAgentNetworkType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventAgentNetworkType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_AGENT_NETWORK_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventOutcome.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventOutcome.php index f634d147fc..09136dc795 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAuditEventOutcome extends FHIRElement * Validation map for fields in type AuditEventOutcome * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventOutcome Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_OUTCOME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement.php index 2a81c4cf4e..faf63c01fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRBackboneElement extends FHIRElement * Validation map for fields in type BackboneElement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBackboneElement Constructor @@ -254,12 +254,70 @@ public function setModifierExtension(array $modifierExtension = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getModifierExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php index cdcb0ffad0..10f67c4dce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRAccountCoverage extends FHIRBackboneElement * Validation map for fields in type Account.Coverage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAccountCoverage Constructor @@ -260,12 +260,97 @@ public function setPriority($priority = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_DOT_COVERAGE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_DOT_COVERAGE, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php index 6089548597..dc06fc63b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRAccountGuarantor extends FHIRBackboneElement * Validation map for fields in type Account.Guarantor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAccountGuarantor Constructor @@ -301,12 +301,114 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOnHold())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_HOLD] = $fieldErrs; + } + } + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ON_HOLD])) { + $v = $this->getOnHold(); + foreach($validationRules[self::FIELD_ON_HOLD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_DOT_GUARANTOR, self::FIELD_ON_HOLD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_HOLD])) { + $errs[self::FIELD_ON_HOLD] = []; + } + $errs[self::FIELD_ON_HOLD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_DOT_GUARANTOR, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_DOT_GUARANTOR, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php index f2f5f9c9bf..ae394ee573 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRActivityDefinitionDynamicValue extends FHIRBackboneElement * Validation map for fields in type ActivityDefinition.DynamicValue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActivityDefinitionDynamicValue Constructor @@ -278,12 +278,97 @@ public function setPath($path = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php index cca8b0cec2..fe6a00adcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRActivityDefinitionParticipant extends FHIRBackboneElement * Validation map for fields in type ActivityDefinition.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActivityDefinitionParticipant Constructor @@ -243,12 +243,97 @@ public function setType(FHIRActionParticipantType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausality.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausality.php index f571dbcba8..bd3dcfe26d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausality.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRAdverseEventCausality extends FHIRBackboneElement * Validation map for fields in type AdverseEvent.Causality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseEventCausality Constructor @@ -358,12 +358,131 @@ public function setProductRelatedness($productRelatedness = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssessment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSESSMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductRelatedness())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_RELATEDNESS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSESSMENT])) { + $v = $this->getAssessment(); + foreach($validationRules[self::FIELD_ASSESSMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_CAUSALITY, self::FIELD_ASSESSMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSESSMENT])) { + $errs[self::FIELD_ASSESSMENT] = []; + } + $errs[self::FIELD_ASSESSMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_CAUSALITY, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_CAUSALITY, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_RELATEDNESS])) { + $v = $this->getProductRelatedness(); + foreach($validationRules[self::FIELD_PRODUCT_RELATEDNESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_CAUSALITY, self::FIELD_PRODUCT_RELATEDNESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_RELATEDNESS])) { + $errs[self::FIELD_PRODUCT_RELATEDNESS] = []; + } + $errs[self::FIELD_PRODUCT_RELATEDNESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php index bb38ca4be1..a0c9172489 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRAdverseEventSuspectEntity extends FHIRBackboneElement * Validation map for fields in type AdverseEvent.SuspectEntity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseEventSuspectEntity Constructor @@ -274,12 +274,99 @@ public function setInstance(FHIRReference $instance = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCausality())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CAUSALITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CAUSALITY])) { + $v = $this->getCausality(); + foreach($validationRules[self::FIELD_CAUSALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_SUSPECT_ENTITY, self::FIELD_CAUSALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAUSALITY])) { + $errs[self::FIELD_CAUSALITY] = []; + } + $errs[self::FIELD_CAUSALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_SUSPECT_ENTITY, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php index 43aba1ff6e..0bf4fdead6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -196,7 +196,7 @@ class FHIRAllergyIntoleranceReaction extends FHIRBackboneElement * Validation map for fields in type AllergyIntolerance.Reaction * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_MANIFESTATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -679,12 +679,186 @@ public function setSubstance(FHIRCodeableConcept $substance = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExposureRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPOSURE_ROUTE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getManifestation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANIFESTATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOnset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE_ROUTE])) { + $v = $this->getExposureRoute(); + foreach($validationRules[self::FIELD_EXPOSURE_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_EXPOSURE_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE_ROUTE])) { + $errs[self::FIELD_EXPOSURE_ROUTE] = []; + } + $errs[self::FIELD_EXPOSURE_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANIFESTATION])) { + $v = $this->getManifestation(); + foreach($validationRules[self::FIELD_MANIFESTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_MANIFESTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANIFESTATION])) { + $errs[self::FIELD_MANIFESTATION] = []; + } + $errs[self::FIELD_MANIFESTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET])) { + $v = $this->getOnset(); + foreach($validationRules[self::FIELD_ONSET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_ONSET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET])) { + $errs[self::FIELD_ONSET] = []; + } + $errs[self::FIELD_ONSET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php index fb6d483a46..0c3774e0b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRAppointmentParticipant extends FHIRBackboneElement * Validation map for fields in type Appointment.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAppointmentParticipant Constructor @@ -455,12 +455,150 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED])) { + $v = $this->getRequired(); + foreach($validationRules[self::FIELD_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED])) { + $errs[self::FIELD_REQUIRED] = []; + } + $errs[self::FIELD_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php index 35609e5adc..f9b3aa6172 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -241,7 +241,7 @@ class FHIRAuditEventAgent extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Agent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventAgent Constructor @@ -933,12 +933,256 @@ public function setWho(FHIRReference $who = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAltId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALT_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedia())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POLICY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPurposeOfUse())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE_OF_USE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequestor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWho())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALT_ID])) { + $v = $this->getAltId(); + foreach($validationRules[self::FIELD_ALT_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_ALT_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALT_ID])) { + $errs[self::FIELD_ALT_ID] = []; + } + $errs[self::FIELD_ALT_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIA])) { + $v = $this->getMedia(); + foreach($validationRules[self::FIELD_MEDIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_MEDIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIA])) { + $errs[self::FIELD_MEDIA] = []; + } + $errs[self::FIELD_MEDIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY])) { + $v = $this->getPolicy(); + foreach($validationRules[self::FIELD_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY])) { + $errs[self::FIELD_POLICY] = []; + } + $errs[self::FIELD_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE_OF_USE])) { + $v = $this->getPurposeOfUse(); + foreach($validationRules[self::FIELD_PURPOSE_OF_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_PURPOSE_OF_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE_OF_USE])) { + $errs[self::FIELD_PURPOSE_OF_USE] = []; + } + $errs[self::FIELD_PURPOSE_OF_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTOR])) { + $v = $this->getRequestor(); + foreach($validationRules[self::FIELD_REQUESTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_REQUESTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTOR])) { + $errs[self::FIELD_REQUESTOR] = []; + } + $errs[self::FIELD_REQUESTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO])) { + $v = $this->getWho(); + foreach($validationRules[self::FIELD_WHO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_WHO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO])) { + $errs[self::FIELD_WHO] = []; + } + $errs[self::FIELD_WHO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php index f42cd7aa97..cf6af60eec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRAuditEventDetail extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventDetail Constructor @@ -351,12 +351,114 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_DETAIL, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_DETAIL, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php index 853ce3c042..3d03da26b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -202,7 +202,7 @@ class FHIRAuditEventEntity extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Entity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventEntity Constructor @@ -724,12 +724,220 @@ public function setWhat(FHIRReference $what = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLifecycle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIFECYCLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuery())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUERY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHAT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIFECYCLE])) { + $v = $this->getLifecycle(); + foreach($validationRules[self::FIELD_LIFECYCLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_LIFECYCLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIFECYCLE])) { + $errs[self::FIELD_LIFECYCLE] = []; + } + $errs[self::FIELD_LIFECYCLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUERY])) { + $v = $this->getQuery(); + foreach($validationRules[self::FIELD_QUERY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_QUERY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUERY])) { + $errs[self::FIELD_QUERY] = []; + } + $errs[self::FIELD_QUERY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHAT])) { + $v = $this->getWhat(); + foreach($validationRules[self::FIELD_WHAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_WHAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHAT])) { + $errs[self::FIELD_WHAT] = []; + } + $errs[self::FIELD_WHAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php index 71eb98c9dd..9a68b589dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRAuditEventNetwork extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Network * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventNetwork Constructor @@ -272,12 +272,97 @@ public function setType(FHIRAuditEventAgentNetworkType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_NETWORK, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_NETWORK, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php index 21f40cbce4..33dc5ea373 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRAuditEventSource extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventSource Constructor @@ -342,12 +342,116 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getObserver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_OBSERVER])) { + $v = $this->getObserver(); + foreach($validationRules[self::FIELD_OBSERVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_SOURCE, self::FIELD_OBSERVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBSERVER])) { + $errs[self::FIELD_OBSERVER] = []; + } + $errs[self::FIELD_OBSERVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_SOURCE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_SOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollection.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollection.php index a89f05a1e1..da6f319541 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollection.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRBiologicallyDerivedProductCollection extends FHIRBackboneElement * Validation map for fields in type BiologicallyDerivedProduct.Collection * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBiologicallyDerivedProductCollection Constructor @@ -362,12 +362,131 @@ public function setSource(FHIRReference $source = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCollectedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollectedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollector())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COLLECTED_DATE_TIME])) { + $v = $this->getCollectedDateTime(); + foreach($validationRules[self::FIELD_COLLECTED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_COLLECTION, self::FIELD_COLLECTED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTED_DATE_TIME])) { + $errs[self::FIELD_COLLECTED_DATE_TIME] = []; + } + $errs[self::FIELD_COLLECTED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTED_PERIOD])) { + $v = $this->getCollectedPeriod(); + foreach($validationRules[self::FIELD_COLLECTED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_COLLECTION, self::FIELD_COLLECTED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTED_PERIOD])) { + $errs[self::FIELD_COLLECTED_PERIOD] = []; + } + $errs[self::FIELD_COLLECTED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTOR])) { + $v = $this->getCollector(); + foreach($validationRules[self::FIELD_COLLECTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_COLLECTION, self::FIELD_COLLECTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTOR])) { + $errs[self::FIELD_COLLECTOR] = []; + } + $errs[self::FIELD_COLLECTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_COLLECTION, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulation.php index d496f8c239..f050f8ff14 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRBiologicallyDerivedProductManipulation extends FHIRBackboneElement * Validation map for fields in type BiologicallyDerivedProduct.Manipulation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBiologicallyDerivedProductManipulation Constructor @@ -335,12 +335,114 @@ public function setTimePeriod(FHIRPeriod $timePeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimeDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_MANIPULATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_DATE_TIME])) { + $v = $this->getTimeDateTime(); + foreach($validationRules[self::FIELD_TIME_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_MANIPULATION, self::FIELD_TIME_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_DATE_TIME])) { + $errs[self::FIELD_TIME_DATE_TIME] = []; + } + $errs[self::FIELD_TIME_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_PERIOD])) { + $v = $this->getTimePeriod(); + foreach($validationRules[self::FIELD_TIME_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_MANIPULATION, self::FIELD_TIME_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_PERIOD])) { + $errs[self::FIELD_TIME_PERIOD] = []; + } + $errs[self::FIELD_TIME_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessing.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessing.php index cf71a4419f..b908ced8aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessing.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -156,7 +156,7 @@ class FHIRBiologicallyDerivedProductProcessing extends FHIRBackboneElement * Validation map for fields in type BiologicallyDerivedProduct.Processing * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBiologicallyDerivedProductProcessing Constructor @@ -438,12 +438,148 @@ public function setTimePeriod(FHIRPeriod $timePeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimeDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE])) { + $v = $this->getAdditive(); + foreach($validationRules[self::FIELD_ADDITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_PROCESSING, self::FIELD_ADDITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE])) { + $errs[self::FIELD_ADDITIVE] = []; + } + $errs[self::FIELD_ADDITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_PROCESSING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_PROCESSING, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_DATE_TIME])) { + $v = $this->getTimeDateTime(); + foreach($validationRules[self::FIELD_TIME_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_PROCESSING, self::FIELD_TIME_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_DATE_TIME])) { + $errs[self::FIELD_TIME_DATE_TIME] = []; + } + $errs[self::FIELD_TIME_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_PERIOD])) { + $v = $this->getTimePeriod(); + foreach($validationRules[self::FIELD_TIME_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_PROCESSING, self::FIELD_TIME_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_PERIOD])) { + $errs[self::FIELD_TIME_PERIOD] = []; + } + $errs[self::FIELD_TIME_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorage.php index a25b99b956..349bbb35b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRBiologicallyDerivedProductStorage extends FHIRBackboneElement * Validation map for fields in type BiologicallyDerivedProduct.Storage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBiologicallyDerivedProductStorage Constructor @@ -393,12 +393,131 @@ public function setTemperature($temperature = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getScale())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCALE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTemperature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEMPERATURE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_STORAGE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_STORAGE, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCALE])) { + $v = $this->getScale(); + foreach($validationRules[self::FIELD_SCALE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_STORAGE, self::FIELD_SCALE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCALE])) { + $errs[self::FIELD_SCALE] = []; + } + $errs[self::FIELD_SCALE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEMPERATURE])) { + $v = $this->getTemperature(); + foreach($validationRules[self::FIELD_TEMPERATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_DOT_STORAGE, self::FIELD_TEMPERATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEMPERATURE])) { + $errs[self::FIELD_TEMPERATURE] = []; + } + $errs[self::FIELD_TEMPERATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php index 4b50beb2e3..ec72fa6f75 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -161,7 +161,7 @@ class FHIRBundleEntry extends FHIRBackboneElement * Validation map for fields in type Bundle.Entry * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleEntry Constructor @@ -504,12 +504,167 @@ public function setSearch(FHIRBundleSearch $search = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFullUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FULL_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSearch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FULL_URL])) { + $v = $this->getFullUrl(); + foreach($validationRules[self::FIELD_FULL_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_FULL_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FULL_URL])) { + $errs[self::FIELD_FULL_URL] = []; + } + $errs[self::FIELD_FULL_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH])) { + $v = $this->getSearch(); + foreach($validationRules[self::FIELD_SEARCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_SEARCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH])) { + $errs[self::FIELD_SEARCH] = []; + } + $errs[self::FIELD_SEARCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php index ef81956cf3..fa8106ecdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRBundleLink extends FHIRBackboneElement * Validation map for fields in type Bundle.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleLink Constructor @@ -278,12 +278,97 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getRelation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_RELATION])) { + $v = $this->getRelation(); + foreach($validationRules[self::FIELD_RELATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_LINK, self::FIELD_RELATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATION])) { + $errs[self::FIELD_RELATION] = []; + } + $errs[self::FIELD_RELATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_LINK, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php index b5f913b2e6..5737705919 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -177,7 +177,7 @@ class FHIRBundleRequest extends FHIRBackboneElement * Validation map for fields in type Bundle.Request * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleRequest Constructor @@ -598,12 +598,165 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIfMatch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_MATCH] = $fieldErrs; + } + } + if (null !== ($v = $this->getIfModifiedSince())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_MODIFIED_SINCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIfNoneExist())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_NONE_EXIST] = $fieldErrs; + } + } + if (null !== ($v = $this->getIfNoneMatch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_NONE_MATCH] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IF_MATCH])) { + $v = $this->getIfMatch(); + foreach($validationRules[self::FIELD_IF_MATCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_MATCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_MATCH])) { + $errs[self::FIELD_IF_MATCH] = []; + } + $errs[self::FIELD_IF_MATCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IF_MODIFIED_SINCE])) { + $v = $this->getIfModifiedSince(); + foreach($validationRules[self::FIELD_IF_MODIFIED_SINCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_MODIFIED_SINCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_MODIFIED_SINCE])) { + $errs[self::FIELD_IF_MODIFIED_SINCE] = []; + } + $errs[self::FIELD_IF_MODIFIED_SINCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IF_NONE_EXIST])) { + $v = $this->getIfNoneExist(); + foreach($validationRules[self::FIELD_IF_NONE_EXIST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_NONE_EXIST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_NONE_EXIST])) { + $errs[self::FIELD_IF_NONE_EXIST] = []; + } + $errs[self::FIELD_IF_NONE_EXIST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IF_NONE_MATCH])) { + $v = $this->getIfNoneMatch(); + foreach($validationRules[self::FIELD_IF_NONE_MATCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_NONE_MATCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_NONE_MATCH])) { + $errs[self::FIELD_IF_NONE_MATCH] = []; + } + $errs[self::FIELD_IF_NONE_MATCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php index b5a693002c..1bc88af312 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -160,7 +160,7 @@ class FHIRBundleResponse extends FHIRBackboneElement * Validation map for fields in type Bundle.Response * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleResponse Constructor @@ -515,12 +515,148 @@ public function setStatus($status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEtag())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ETAG] = $fieldErrs; + } + } + if (null !== ($v = $this->getLastModified())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_MODIFIED] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ETAG])) { + $v = $this->getEtag(); + foreach($validationRules[self::FIELD_ETAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_ETAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ETAG])) { + $errs[self::FIELD_ETAG] = []; + } + $errs[self::FIELD_ETAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_MODIFIED])) { + $v = $this->getLastModified(); + foreach($validationRules[self::FIELD_LAST_MODIFIED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_LAST_MODIFIED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_MODIFIED])) { + $errs[self::FIELD_LAST_MODIFIED] = []; + } + $errs[self::FIELD_LAST_MODIFIED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php index 6186d31200..9249d78219 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRBundleSearch extends FHIRBackboneElement * Validation map for fields in type Bundle.Search * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleSearch Constructor @@ -279,12 +279,97 @@ public function setScore($score = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCORE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_SEARCH, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORE])) { + $v = $this->getScore(); + foreach($validationRules[self::FIELD_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_SEARCH, self::FIELD_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORE])) { + $errs[self::FIELD_SCORE] = []; + } + $errs[self::FIELD_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php index 2d26325294..cd8f74f1f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRCapabilityStatementDocument extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Document * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementDocument Constructor @@ -369,12 +369,114 @@ public function setProfile($profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_DOCUMENT, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_DOCUMENT, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_DOCUMENT, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php index e2b9d5b950..ad1c6760db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRCapabilityStatementEndpoint extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Endpoint * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementEndpoint Constructor @@ -259,12 +259,97 @@ public function setProtocol(FHIRCoding $protocol = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProtocol())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROTOCOL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_ENDPOINT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_ENDPOINT, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php index c516ab3458..f64e3f7272 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRCapabilityStatementImplementation extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Implementation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementImplementation Constructor @@ -337,12 +337,114 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCustodian())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CUSTODIAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CUSTODIAN])) { + $v = $this->getCustodian(); + foreach($validationRules[self::FIELD_CUSTODIAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_IMPLEMENTATION, self::FIELD_CUSTODIAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CUSTODIAN])) { + $errs[self::FIELD_CUSTODIAN] = []; + } + $errs[self::FIELD_CUSTODIAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_IMPLEMENTATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_IMPLEMENTATION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php index 9bcc877a02..274c537767 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRCapabilityStatementInteraction extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Interaction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementInteraction Constructor @@ -285,12 +285,97 @@ public function setDocumentation($documentation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_INTERACTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_INTERACTION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php index 76b2a76cb8..75d8c497b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRCapabilityStatementInteraction1 extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Interaction1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementInteraction1 Constructor @@ -285,12 +285,97 @@ public function setDocumentation($documentation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_INTERACTION_1, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_INTERACTION_1, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php index 3f027ef5ce..ebc5f3070a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -149,7 +149,7 @@ class FHIRCapabilityStatementMessaging extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Messaging * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementMessaging Constructor @@ -483,12 +483,135 @@ public function setSupportedMessage(array $supportedMessage = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReliableCache())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELIABLE_CACHE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportedMessage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTED_MESSAGE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_MESSAGING, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_MESSAGING, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELIABLE_CACHE])) { + $v = $this->getReliableCache(); + foreach($validationRules[self::FIELD_RELIABLE_CACHE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_MESSAGING, self::FIELD_RELIABLE_CACHE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELIABLE_CACHE])) { + $errs[self::FIELD_RELIABLE_CACHE] = []; + } + $errs[self::FIELD_RELIABLE_CACHE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTED_MESSAGE])) { + $v = $this->getSupportedMessage(); + foreach($validationRules[self::FIELD_SUPPORTED_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_MESSAGING, self::FIELD_SUPPORTED_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTED_MESSAGE])) { + $errs[self::FIELD_SUPPORTED_MESSAGE] = []; + } + $errs[self::FIELD_SUPPORTED_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php index 9317173504..34ccd22a89 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRCapabilityStatementOperation extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Operation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementOperation Constructor @@ -398,12 +398,114 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_OPERATION, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_OPERATION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_OPERATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php index e041972874..0222f5f1f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -338,7 +338,7 @@ class FHIRCapabilityStatementResource extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Resource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementResource Constructor @@ -1648,12 +1648,366 @@ public function setVersioning(FHIRResourceVersionPolicy $versioning = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getConditionalCreate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_CREATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getConditionalDelete())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_DELETE] = $fieldErrs; + } + } + if (null !== ($v = $this->getConditionalRead())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_READ] = $fieldErrs; + } + } + if (null !== ($v = $this->getConditionalUpdate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_UPDATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInteraction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERACTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOperation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPERATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReadHistory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_READ_HISTORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferencePolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_POLICY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_INCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_PARAM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchRevInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_REV_INCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSupportedProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTED_PROFILE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUpdateCreate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UPDATE_CREATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersioning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSIONING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_CREATE])) { + $v = $this->getConditionalCreate(); + foreach($validationRules[self::FIELD_CONDITIONAL_CREATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_CONDITIONAL_CREATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_CREATE])) { + $errs[self::FIELD_CONDITIONAL_CREATE] = []; + } + $errs[self::FIELD_CONDITIONAL_CREATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_DELETE])) { + $v = $this->getConditionalDelete(); + foreach($validationRules[self::FIELD_CONDITIONAL_DELETE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_CONDITIONAL_DELETE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_DELETE])) { + $errs[self::FIELD_CONDITIONAL_DELETE] = []; + } + $errs[self::FIELD_CONDITIONAL_DELETE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_READ])) { + $v = $this->getConditionalRead(); + foreach($validationRules[self::FIELD_CONDITIONAL_READ] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_CONDITIONAL_READ, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_READ])) { + $errs[self::FIELD_CONDITIONAL_READ] = []; + } + $errs[self::FIELD_CONDITIONAL_READ][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_UPDATE])) { + $v = $this->getConditionalUpdate(); + foreach($validationRules[self::FIELD_CONDITIONAL_UPDATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_CONDITIONAL_UPDATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_UPDATE])) { + $errs[self::FIELD_CONDITIONAL_UPDATE] = []; + } + $errs[self::FIELD_CONDITIONAL_UPDATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERACTION])) { + $v = $this->getInteraction(); + foreach($validationRules[self::FIELD_INTERACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_INTERACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERACTION])) { + $errs[self::FIELD_INTERACTION] = []; + } + $errs[self::FIELD_INTERACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_READ_HISTORY])) { + $v = $this->getReadHistory(); + foreach($validationRules[self::FIELD_READ_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_READ_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_READ_HISTORY])) { + $errs[self::FIELD_READ_HISTORY] = []; + } + $errs[self::FIELD_READ_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_POLICY])) { + $v = $this->getReferencePolicy(); + foreach($validationRules[self::FIELD_REFERENCE_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_REFERENCE_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_POLICY])) { + $errs[self::FIELD_REFERENCE_POLICY] = []; + } + $errs[self::FIELD_REFERENCE_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_INCLUDE])) { + $v = $this->getSearchInclude(); + foreach($validationRules[self::FIELD_SEARCH_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_SEARCH_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_INCLUDE])) { + $errs[self::FIELD_SEARCH_INCLUDE] = []; + } + $errs[self::FIELD_SEARCH_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_PARAM])) { + $v = $this->getSearchParam(); + foreach($validationRules[self::FIELD_SEARCH_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_SEARCH_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_PARAM])) { + $errs[self::FIELD_SEARCH_PARAM] = []; + } + $errs[self::FIELD_SEARCH_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_REV_INCLUDE])) { + $v = $this->getSearchRevInclude(); + foreach($validationRules[self::FIELD_SEARCH_REV_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_SEARCH_REV_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_REV_INCLUDE])) { + $errs[self::FIELD_SEARCH_REV_INCLUDE] = []; + } + $errs[self::FIELD_SEARCH_REV_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTED_PROFILE])) { + $v = $this->getSupportedProfile(); + foreach($validationRules[self::FIELD_SUPPORTED_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_SUPPORTED_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTED_PROFILE])) { + $errs[self::FIELD_SUPPORTED_PROFILE] = []; + } + $errs[self::FIELD_SUPPORTED_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UPDATE_CREATE])) { + $v = $this->getUpdateCreate(); + foreach($validationRules[self::FIELD_UPDATE_CREATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_UPDATE_CREATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UPDATE_CREATE])) { + $errs[self::FIELD_UPDATE_CREATE] = []; + } + $errs[self::FIELD_UPDATE_CREATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSIONING])) { + $v = $this->getVersioning(); + foreach($validationRules[self::FIELD_VERSIONING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_VERSIONING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSIONING])) { + $errs[self::FIELD_VERSIONING] = []; + } + $errs[self::FIELD_VERSIONING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php index becf8c9606..32b20e2f24 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -208,7 +208,7 @@ class FHIRCapabilityStatementRest extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Rest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementRest Constructor @@ -848,12 +848,209 @@ public function setSecurity(FHIRCapabilityStatementSecurity $security = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCompartment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPARTMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInteraction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOperation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPERATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_PARAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSecurity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SECURITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPARTMENT])) { + $v = $this->getCompartment(); + foreach($validationRules[self::FIELD_COMPARTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_COMPARTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARTMENT])) { + $errs[self::FIELD_COMPARTMENT] = []; + } + $errs[self::FIELD_COMPARTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERACTION])) { + $v = $this->getInteraction(); + foreach($validationRules[self::FIELD_INTERACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_INTERACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERACTION])) { + $errs[self::FIELD_INTERACTION] = []; + } + $errs[self::FIELD_INTERACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_PARAM])) { + $v = $this->getSearchParam(); + foreach($validationRules[self::FIELD_SEARCH_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_SEARCH_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_PARAM])) { + $errs[self::FIELD_SEARCH_PARAM] = []; + } + $errs[self::FIELD_SEARCH_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY])) { + $v = $this->getSecurity(); + foreach($validationRules[self::FIELD_SECURITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_SECURITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY])) { + $errs[self::FIELD_SECURITY] = []; + } + $errs[self::FIELD_SECURITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php index d816a664ab..47575486dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRCapabilityStatementSearchParam extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.SearchParam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementSearchParam Constructor @@ -447,12 +447,131 @@ public function setType(FHIRSearchParamType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SEARCH_PARAM, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SEARCH_PARAM, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SEARCH_PARAM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SEARCH_PARAM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php index 77561d3ff7..419a759a1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRCapabilityStatementSecurity extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Security * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementSecurity Constructor @@ -381,12 +381,116 @@ public function setService(array $service = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCors())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CORS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getService())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CORS])) { + $v = $this->getCors(); + foreach($validationRules[self::FIELD_CORS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SECURITY, self::FIELD_CORS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CORS])) { + $errs[self::FIELD_CORS] = []; + } + $errs[self::FIELD_CORS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SECURITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SECURITY, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php index 5e762cd3fd..eee2b12840 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRCapabilityStatementSoftware extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Software * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementSoftware Constructor @@ -361,12 +361,114 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getReleaseDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELEASE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SOFTWARE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEASE_DATE])) { + $v = $this->getReleaseDate(); + foreach($validationRules[self::FIELD_RELEASE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SOFTWARE, self::FIELD_RELEASE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEASE_DATE])) { + $errs[self::FIELD_RELEASE_DATE] = []; + } + $errs[self::FIELD_RELEASE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SOFTWARE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php index 4914798666..17854d0a90 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRCapabilityStatementSupportedMessage extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.SupportedMessage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementSupportedMessage Constructor @@ -273,12 +273,97 @@ public function setMode(FHIREventCapabilityMode $mode = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SUPPORTED_MESSAGE, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SUPPORTED_MESSAGE, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php index 0ceb3cbe6d..f0f31f6c3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -159,7 +159,7 @@ class FHIRCarePlanActivity extends FHIRBackboneElement * Validation map for fields in type CarePlan.Activity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanActivity Constructor @@ -524,12 +524,154 @@ public function setReference(FHIRReference $reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOutcomeCodeableConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTCOME_CODEABLE_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutcomeReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTCOME_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProgress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_CODEABLE_CONCEPT])) { + $v = $this->getOutcomeCodeableConcept(); + foreach($validationRules[self::FIELD_OUTCOME_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_OUTCOME_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_CODEABLE_CONCEPT])) { + $errs[self::FIELD_OUTCOME_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_OUTCOME_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_REFERENCE])) { + $v = $this->getOutcomeReference(); + foreach($validationRules[self::FIELD_OUTCOME_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_OUTCOME_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_REFERENCE])) { + $errs[self::FIELD_OUTCOME_REFERENCE] = []; + } + $errs[self::FIELD_OUTCOME_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRESS])) { + $v = $this->getProgress(); + foreach($validationRules[self::FIELD_PROGRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_PROGRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRESS])) { + $errs[self::FIELD_PROGRESS] = []; + } + $errs[self::FIELD_PROGRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php index f660086b10..727826832d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -380,7 +380,7 @@ class FHIRCarePlanDetail extends FHIRBackboneElement * Validation map for fields in type CarePlan.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanDetail Constructor @@ -1624,12 +1624,415 @@ public function setStatusReason(FHIRCodeableConcept $statusReason = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDailyAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DAILY_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoNotPerform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DO_NOT_PERFORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGoal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_URI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getScheduledPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAILY_AMOUNT])) { + $v = $this->getDailyAmount(); + foreach($validationRules[self::FIELD_DAILY_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_DAILY_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAILY_AMOUNT])) { + $errs[self::FIELD_DAILY_AMOUNT] = []; + } + $errs[self::FIELD_DAILY_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DO_NOT_PERFORM])) { + $v = $this->getDoNotPerform(); + foreach($validationRules[self::FIELD_DO_NOT_PERFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_DO_NOT_PERFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DO_NOT_PERFORM])) { + $errs[self::FIELD_DO_NOT_PERFORM] = []; + } + $errs[self::FIELD_DO_NOT_PERFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL])) { + $v = $this->getGoal(); + foreach($validationRules[self::FIELD_GOAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_GOAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL])) { + $errs[self::FIELD_GOAL] = []; + } + $errs[self::FIELD_GOAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $v = $this->getProductCodeableConcept(); + foreach($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PRODUCT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_REFERENCE])) { + $v = $this->getProductReference(); + foreach($validationRules[self::FIELD_PRODUCT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PRODUCT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_REFERENCE])) { + $errs[self::FIELD_PRODUCT_REFERENCE] = []; + } + $errs[self::FIELD_PRODUCT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_PERIOD])) { + $v = $this->getScheduledPeriod(); + foreach($validationRules[self::FIELD_SCHEDULED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_SCHEDULED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_PERIOD])) { + $errs[self::FIELD_SCHEDULED_PERIOD] = []; + } + $errs[self::FIELD_SCHEDULED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_STRING])) { + $v = $this->getScheduledString(); + foreach($validationRules[self::FIELD_SCHEDULED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_SCHEDULED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_STRING])) { + $errs[self::FIELD_SCHEDULED_STRING] = []; + } + $errs[self::FIELD_SCHEDULED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_TIMING])) { + $v = $this->getScheduledTiming(); + foreach($validationRules[self::FIELD_SCHEDULED_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_SCHEDULED_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_TIMING])) { + $errs[self::FIELD_SCHEDULED_TIMING] = []; + } + $errs[self::FIELD_SCHEDULED_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php index 1dfd176052..5b64cf55db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRCareTeamParticipant extends FHIRBackboneElement * Validation map for fields in type CareTeam.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCareTeamParticipant Constructor @@ -376,12 +376,133 @@ public function setRole(array $role = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMember())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_MEMBER])) { + $v = $this->getMember(); + foreach($validationRules[self::FIELD_MEMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM_DOT_PARTICIPANT, self::FIELD_MEMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEMBER])) { + $errs[self::FIELD_MEMBER] = []; + } + $errs[self::FIELD_MEMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM_DOT_PARTICIPANT, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM_DOT_PARTICIPANT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntry.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntry.php index e1a835135c..eaaafe4a0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRCatalogEntryRelatedEntry extends FHIRBackboneElement * Validation map for fields in type CatalogEntry.RelatedEntry * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCatalogEntryRelatedEntry Constructor @@ -242,12 +242,97 @@ public function setRelationtype(FHIRCatalogEntryRelationType $relationtype = nul } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationtype())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONTYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY_DOT_RELATED_ENTRY, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONTYPE])) { + $v = $this->getRelationtype(); + foreach($validationRules[self::FIELD_RELATIONTYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY_DOT_RELATED_ENTRY, self::FIELD_RELATIONTYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONTYPE])) { + $errs[self::FIELD_RELATIONTYPE] = []; + } + $errs[self::FIELD_RELATIONTYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformer.php index 133319f527..a9ba5d4e6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRChargeItemPerformer extends FHIRBackboneElement * Validation map for fields in type ChargeItem.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRChargeItemPerformer Constructor @@ -235,12 +235,97 @@ public function setFunction(FHIRCodeableConcept $function = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getFunction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNCTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNCTION])) { + $v = $this->getFunction(); + foreach($validationRules[self::FIELD_FUNCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DOT_PERFORMER, self::FIELD_FUNCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNCTION])) { + $errs[self::FIELD_FUNCTION] = []; + } + $errs[self::FIELD_FUNCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicability.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicability.php index 018fcc4406..93f0319408 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicability.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRChargeItemDefinitionApplicability extends FHIRBackboneElement * Validation map for fields in type ChargeItemDefinition.Applicability * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRChargeItemDefinitionApplicability Constructor @@ -366,12 +366,114 @@ public function setLanguage($language = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION_DOT_APPLICABILITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION_DOT_APPLICABILITY, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION_DOT_APPLICABILITY, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponent.php index c20196b0a3..fc05289c88 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRChargeItemDefinitionPriceComponent extends FHIRBackboneElement * Validation map for fields in type ChargeItemDefinition.PriceComponent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRChargeItemDefinitionPriceComponent Constructor @@ -379,12 +379,131 @@ public function setType(FHIRInvoicePriceComponentType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION_DOT_PRICE_COMPONENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION_DOT_PRICE_COMPONENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION_DOT_PRICE_COMPONENT, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION_DOT_PRICE_COMPONENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroup.php index 3144266751..a8d9b1446a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRChargeItemDefinitionPropertyGroup extends FHIRBackboneElement * Validation map for fields in type ChargeItemDefinition.PropertyGroup * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRChargeItemDefinitionPropertyGroup Constructor @@ -328,12 +328,101 @@ public function setPriceComponent(array $priceComponent = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getApplicability())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_APPLICABILITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPriceComponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRICE_COMPONENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_APPLICABILITY])) { + $v = $this->getApplicability(); + foreach($validationRules[self::FIELD_APPLICABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION_DOT_PROPERTY_GROUP, self::FIELD_APPLICABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLICABILITY])) { + $errs[self::FIELD_APPLICABILITY] = []; + } + $errs[self::FIELD_APPLICABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRICE_COMPONENT])) { + $v = $this->getPriceComponent(); + foreach($validationRules[self::FIELD_PRICE_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION_DOT_PROPERTY_GROUP, self::FIELD_PRICE_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRICE_COMPONENT])) { + $errs[self::FIELD_PRICE_COMPONENT] = []; + } + $errs[self::FIELD_PRICE_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php index 26ffba12cc..ffdd667328 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -150,7 +150,7 @@ class FHIRClaimAccident extends FHIRBackboneElement * Validation map for fields in type Claim.Accident * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimAccident Constructor @@ -385,12 +385,131 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ACCIDENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_ADDRESS])) { + $v = $this->getLocationAddress(); + foreach($validationRules[self::FIELD_LOCATION_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ACCIDENT, self::FIELD_LOCATION_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_ADDRESS])) { + $errs[self::FIELD_LOCATION_ADDRESS] = []; + } + $errs[self::FIELD_LOCATION_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ACCIDENT, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ACCIDENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php index 27fff735a2..d444cee5ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRClaimCareTeam extends FHIRBackboneElement * Validation map for fields in type Claim.CareTeam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimCareTeam Constructor @@ -435,12 +435,148 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQualification())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUALIFICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_CARE_TEAM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFICATION])) { + $v = $this->getQualification(); + foreach($validationRules[self::FIELD_QUALIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_CARE_TEAM, self::FIELD_QUALIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFICATION])) { + $errs[self::FIELD_QUALIFICATION] = []; + } + $errs[self::FIELD_QUALIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_CARE_TEAM, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_CARE_TEAM, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_CARE_TEAM, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php index 7defc3ab87..63cc04c8aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -255,7 +255,7 @@ class FHIRClaimDetail extends FHIRBackboneElement * Validation map for fields in type Claim.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimDetail Constructor @@ -974,12 +974,275 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL])) { + $v = $this->getSubDetail(); + foreach($validationRules[self::FIELD_SUB_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_SUB_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL])) { + $errs[self::FIELD_SUB_DETAIL] = []; + } + $errs[self::FIELD_SUB_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php index 5769c7da0d..7c12f2c998 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -170,7 +170,7 @@ class FHIRClaimDiagnosis extends FHIRBackboneElement * Validation map for fields in type Claim.Diagnosis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimDiagnosis Constructor @@ -511,12 +511,167 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiagnosisCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosisReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnAdmission())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_ADMISSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPackageCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PACKAGE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT])) { + $v = $this->getDiagnosisCodeableConcept(); + foreach($validationRules[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_REFERENCE])) { + $v = $this->getDiagnosisReference(); + foreach($validationRules[self::FIELD_DIAGNOSIS_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_REFERENCE])) { + $errs[self::FIELD_DIAGNOSIS_REFERENCE] = []; + } + $errs[self::FIELD_DIAGNOSIS_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_ADMISSION])) { + $v = $this->getOnAdmission(); + foreach($validationRules[self::FIELD_ON_ADMISSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_ON_ADMISSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_ADMISSION])) { + $errs[self::FIELD_ON_ADMISSION] = []; + } + $errs[self::FIELD_ON_ADMISSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE_CODE])) { + $v = $this->getPackageCode(); + foreach($validationRules[self::FIELD_PACKAGE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_PACKAGE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE_CODE])) { + $errs[self::FIELD_PACKAGE_CODE] = []; + } + $errs[self::FIELD_PACKAGE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php index 8850313c66..106b51318e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -188,7 +188,7 @@ class FHIRClaimInsurance extends FHIRBackboneElement * Validation map for fields in type Claim.Insurance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimInsurance Constructor @@ -645,12 +645,184 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBusinessArrangement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPreAuthRef())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRE_AUTH_REF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BUSINESS_ARRANGEMENT])) { + $v = $this->getBusinessArrangement(); + foreach($validationRules[self::FIELD_BUSINESS_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_BUSINESS_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BUSINESS_ARRANGEMENT])) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = []; + } + $errs[self::FIELD_BUSINESS_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLAIM_RESPONSE])) { + $v = $this->getClaimResponse(); + foreach($validationRules[self::FIELD_CLAIM_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_CLAIM_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM_RESPONSE])) { + $errs[self::FIELD_CLAIM_RESPONSE] = []; + } + $errs[self::FIELD_CLAIM_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL])) { + $v = $this->getFocal(); + foreach($validationRules[self::FIELD_FOCAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_FOCAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL])) { + $errs[self::FIELD_FOCAL] = []; + } + $errs[self::FIELD_FOCAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF])) { + $v = $this->getPreAuthRef(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_PRE_AUTH_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF])) { + $errs[self::FIELD_PRE_AUTH_REF] = []; + } + $errs[self::FIELD_PRE_AUTH_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php index fd93969ddb..d65a47b9da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -422,7 +422,7 @@ class FHIRClaimItem extends FHIRBackboneElement * Validation map for fields in type Claim.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimItem Constructor @@ -1976,12 +1976,491 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareTeamSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDiagnosisSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEncounter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENCOUNTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInformationSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INFORMATION_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocationAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcedureSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubSite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_SITE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM_SEQUENCE])) { + $v = $this->getCareTeamSequence(); + foreach($validationRules[self::FIELD_CARE_TEAM_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_CARE_TEAM_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM_SEQUENCE])) { + $errs[self::FIELD_CARE_TEAM_SEQUENCE] = []; + } + $errs[self::FIELD_CARE_TEAM_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_SEQUENCE])) { + $v = $this->getDiagnosisSequence(); + foreach($validationRules[self::FIELD_DIAGNOSIS_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_DIAGNOSIS_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_SEQUENCE])) { + $errs[self::FIELD_DIAGNOSIS_SEQUENCE] = []; + } + $errs[self::FIELD_DIAGNOSIS_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORMATION_SEQUENCE])) { + $v = $this->getInformationSequence(); + foreach($validationRules[self::FIELD_INFORMATION_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_INFORMATION_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORMATION_SEQUENCE])) { + $errs[self::FIELD_INFORMATION_SEQUENCE] = []; + } + $errs[self::FIELD_INFORMATION_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_ADDRESS])) { + $v = $this->getLocationAddress(); + foreach($validationRules[self::FIELD_LOCATION_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_LOCATION_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_ADDRESS])) { + $errs[self::FIELD_LOCATION_ADDRESS] = []; + } + $errs[self::FIELD_LOCATION_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $v = $this->getLocationCodeableConcept(); + foreach($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_LOCATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_SEQUENCE])) { + $v = $this->getProcedureSequence(); + foreach($validationRules[self::FIELD_PROCEDURE_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_PROCEDURE_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_SEQUENCE])) { + $errs[self::FIELD_PROCEDURE_SEQUENCE] = []; + } + $errs[self::FIELD_PROCEDURE_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_DATE])) { + $v = $this->getServicedDate(); + foreach($validationRules[self::FIELD_SERVICED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SERVICED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_DATE])) { + $errs[self::FIELD_SERVICED_DATE] = []; + } + $errs[self::FIELD_SERVICED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_PERIOD])) { + $v = $this->getServicedPeriod(); + foreach($validationRules[self::FIELD_SERVICED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SERVICED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_PERIOD])) { + $errs[self::FIELD_SERVICED_PERIOD] = []; + } + $errs[self::FIELD_SERVICED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_SITE])) { + $v = $this->getSubSite(); + foreach($validationRules[self::FIELD_SUB_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SUB_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_SITE])) { + $errs[self::FIELD_SUB_SITE] = []; + } + $errs[self::FIELD_SUB_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php index bae2d958d2..d2906e69df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRClaimPayee extends FHIRBackboneElement * Validation map for fields in type Claim.Payee * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimPayee Constructor @@ -230,12 +230,97 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PAYEE, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PAYEE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php index 8fff53a6e7..d7bf1b2623 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRClaimProcedure extends FHIRBackboneElement * Validation map for fields in type Claim.Procedure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimProcedure Constructor @@ -571,12 +571,169 @@ public function setUdi(array $udi = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedureCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedureReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROCEDURE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { + $v = $this->getProcedureCodeableConcept(); + foreach($validationRules[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROCEDURE, self::FIELD_PROCEDURE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_REFERENCE])) { + $v = $this->getProcedureReference(); + foreach($validationRules[self::FIELD_PROCEDURE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROCEDURE, self::FIELD_PROCEDURE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_REFERENCE])) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = []; + } + $errs[self::FIELD_PROCEDURE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROCEDURE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROCEDURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROCEDURE, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php index a5d5e02f33..f9ccaa0112 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRClaimRelated extends FHIRBackboneElement * Validation map for fields in type Claim.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimRelated Constructor @@ -286,12 +286,114 @@ public function setRelationship(FHIRCodeableConcept $relationship = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClaim())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLAIM])) { + $v = $this->getClaim(); + foreach($validationRules[self::FIELD_CLAIM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_RELATED, self::FIELD_CLAIM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM])) { + $errs[self::FIELD_CLAIM] = []; + } + $errs[self::FIELD_CLAIM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_RELATED, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_RELATED, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php index 7386688262..028b5ad195 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -242,7 +242,7 @@ class FHIRClaimSubDetail extends FHIRBackboneElement * Validation map for fields in type Claim.SubDetail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimSubDetail Constructor @@ -884,12 +884,256 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfo.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfo.php index ecfe8fc28d..5df302797a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfo.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -252,7 +252,7 @@ class FHIRClaimSupportingInfo extends FHIRBackboneElement * Validation map for fields in type Claim.SupportingInfo * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimSupportingInfo Constructor @@ -838,12 +838,250 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE])) { + $v = $this->getTimingDate(); + foreach($validationRules[self::FIELD_TIMING_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_TIMING_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE])) { + $errs[self::FIELD_TIMING_DATE] = []; + } + $errs[self::FIELD_TIMING_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUPPORTING_INFO, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php index 89b8ec8ed2..84c13c0096 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -379,7 +379,7 @@ class FHIRClaimResponseAddItem extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.AddItem * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ADJUDICATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1790,12 +1790,440 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetailSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItemSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocationAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProvider())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROVIDER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubSite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_SITE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubdetailSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBDETAIL_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_SEQUENCE])) { + $v = $this->getDetailSequence(); + foreach($validationRules[self::FIELD_DETAIL_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_DETAIL_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_SEQUENCE])) { + $errs[self::FIELD_DETAIL_SEQUENCE] = []; + } + $errs[self::FIELD_DETAIL_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_SEQUENCE])) { + $v = $this->getItemSequence(); + foreach($validationRules[self::FIELD_ITEM_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_ITEM_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_SEQUENCE])) { + $errs[self::FIELD_ITEM_SEQUENCE] = []; + } + $errs[self::FIELD_ITEM_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_ADDRESS])) { + $v = $this->getLocationAddress(); + foreach($validationRules[self::FIELD_LOCATION_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_LOCATION_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_ADDRESS])) { + $errs[self::FIELD_LOCATION_ADDRESS] = []; + } + $errs[self::FIELD_LOCATION_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $v = $this->getLocationCodeableConcept(); + foreach($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_LOCATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_DATE])) { + $v = $this->getServicedDate(); + foreach($validationRules[self::FIELD_SERVICED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_SERVICED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_DATE])) { + $errs[self::FIELD_SERVICED_DATE] = []; + } + $errs[self::FIELD_SERVICED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_PERIOD])) { + $v = $this->getServicedPeriod(); + foreach($validationRules[self::FIELD_SERVICED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_SERVICED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_PERIOD])) { + $errs[self::FIELD_SERVICED_PERIOD] = []; + } + $errs[self::FIELD_SERVICED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_SITE])) { + $v = $this->getSubSite(); + foreach($validationRules[self::FIELD_SUB_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_SUB_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_SITE])) { + $errs[self::FIELD_SUB_SITE] = []; + } + $errs[self::FIELD_SUB_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBDETAIL_SEQUENCE])) { + $v = $this->getSubdetailSequence(); + foreach($validationRules[self::FIELD_SUBDETAIL_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_SUBDETAIL_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBDETAIL_SEQUENCE])) { + $errs[self::FIELD_SUBDETAIL_SEQUENCE] = []; + } + $errs[self::FIELD_SUBDETAIL_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php index 1212484761..b4b50ab79c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRClaimResponseAdjudication extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Adjudication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseAdjudication Constructor @@ -377,12 +377,131 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php index 70cd10a591..9d68048289 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRClaimResponseDetail extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Detail * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ADJUDICATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -488,12 +488,137 @@ public function setSubDetail(array $subDetail = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDetailSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_SEQUENCE])) { + $v = $this->getDetailSequence(); + foreach($validationRules[self::FIELD_DETAIL_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_DETAIL_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_SEQUENCE])) { + $errs[self::FIELD_DETAIL_SEQUENCE] = []; + } + $errs[self::FIELD_DETAIL_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL])) { + $v = $this->getSubDetail(); + foreach($validationRules[self::FIELD_SUB_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_SUB_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL])) { + $errs[self::FIELD_SUB_DETAIL] = []; + } + $errs[self::FIELD_SUB_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php index 61b84ea4e9..55dea4cf3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -211,7 +211,7 @@ class FHIRClaimResponseDetail1 extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Detail1 * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ADJUDICATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -812,12 +812,224 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL])) { + $v = $this->getSubDetail(); + foreach($validationRules[self::FIELD_SUB_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_SUB_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL])) { + $errs[self::FIELD_SUB_DETAIL] = []; + } + $errs[self::FIELD_SUB_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php index 9e10bbc005..1cf1b62fa4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRClaimResponseError extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Error * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseError Constructor @@ -420,12 +420,131 @@ public function setSubDetailSequence($subDetailSequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubDetailSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_DETAIL_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_SEQUENCE])) { + $v = $this->getDetailSequence(); + foreach($validationRules[self::FIELD_DETAIL_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_DETAIL_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_SEQUENCE])) { + $errs[self::FIELD_DETAIL_SEQUENCE] = []; + } + $errs[self::FIELD_DETAIL_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_SEQUENCE])) { + $v = $this->getItemSequence(); + foreach($validationRules[self::FIELD_ITEM_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_ITEM_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_SEQUENCE])) { + $errs[self::FIELD_ITEM_SEQUENCE] = []; + } + $errs[self::FIELD_ITEM_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL_SEQUENCE])) { + $v = $this->getSubDetailSequence(); + foreach($validationRules[self::FIELD_SUB_DETAIL_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_SUB_DETAIL_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL_SEQUENCE])) { + $errs[self::FIELD_SUB_DETAIL_SEQUENCE] = []; + } + $errs[self::FIELD_SUB_DETAIL_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php index 4d7fd8930d..13139cf114 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRClaimResponseInsurance extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Insurance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseInsurance Constructor @@ -465,12 +465,148 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBusinessArrangement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BUSINESS_ARRANGEMENT])) { + $v = $this->getBusinessArrangement(); + foreach($validationRules[self::FIELD_BUSINESS_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_BUSINESS_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BUSINESS_ARRANGEMENT])) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = []; + } + $errs[self::FIELD_BUSINESS_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLAIM_RESPONSE])) { + $v = $this->getClaimResponse(); + foreach($validationRules[self::FIELD_CLAIM_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_CLAIM_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM_RESPONSE])) { + $errs[self::FIELD_CLAIM_RESPONSE] = []; + } + $errs[self::FIELD_CLAIM_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL])) { + $v = $this->getFocal(); + foreach($validationRules[self::FIELD_FOCAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_FOCAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL])) { + $errs[self::FIELD_FOCAL] = []; + } + $errs[self::FIELD_FOCAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php index 5df52573cc..b6d8aa9719 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRClaimResponseItem extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Item * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ADJUDICATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -500,12 +500,137 @@ public function setNoteNumber(array $noteNumber = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getItemSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_SEQUENCE])) { + $v = $this->getItemSequence(); + foreach($validationRules[self::FIELD_ITEM_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_ITEM_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_SEQUENCE])) { + $errs[self::FIELD_ITEM_SEQUENCE] = []; + } + $errs[self::FIELD_ITEM_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php index 533d434819..10ce9411e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -167,7 +167,7 @@ class FHIRClaimResponsePayment extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Payment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponsePayment Constructor @@ -464,12 +464,165 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdjustment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADJUSTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdjustmentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADJUSTMENT_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUSTMENT])) { + $v = $this->getAdjustment(); + foreach($validationRules[self::FIELD_ADJUSTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_ADJUSTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUSTMENT])) { + $errs[self::FIELD_ADJUSTMENT] = []; + } + $errs[self::FIELD_ADJUSTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADJUSTMENT_REASON])) { + $v = $this->getAdjustmentReason(); + foreach($validationRules[self::FIELD_ADJUSTMENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_ADJUSTMENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUSTMENT_REASON])) { + $errs[self::FIELD_ADJUSTMENT_REASON] = []; + } + $errs[self::FIELD_ADJUSTMENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php index aab8c841e8..2a51899de2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRClaimResponseProcessNote extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.ProcessNote * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseProcessNote Constructor @@ -390,12 +390,131 @@ public function setType(FHIRNoteType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PROCESS_NOTE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PROCESS_NOTE, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PROCESS_NOTE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PROCESS_NOTE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php index cf6676aaf0..cab0570b73 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRClaimResponseSubDetail extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.SubDetail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseSubDetail Constructor @@ -402,12 +402,118 @@ public function setSubDetailSequence($subDetailSequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubDetailSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_DETAIL_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL_SEQUENCE])) { + $v = $this->getSubDetailSequence(); + foreach($validationRules[self::FIELD_SUB_DETAIL_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL, self::FIELD_SUB_DETAIL_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL_SEQUENCE])) { + $errs[self::FIELD_SUB_DETAIL_SEQUENCE] = []; + } + $errs[self::FIELD_SUB_DETAIL_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1.php index b646f24fe9..1f08be3b40 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -200,7 +200,7 @@ class FHIRClaimResponseSubDetail1 extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.SubDetail1 * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ADJUDICATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -730,12 +730,205 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL_1, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL_1, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL_1, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL_1, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL_1, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL_1, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL_1, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL_1, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotal.php index 0d9eaa5733..8c6199a8d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRClaimResponseTotal extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Total * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseTotal Constructor @@ -241,12 +241,97 @@ public function setCategory(FHIRCodeableConcept $category = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_TOTAL, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_TOTAL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php index 6d2c4bdc9b..e1608a9ee3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRClinicalImpressionFinding extends FHIRBackboneElement * Validation map for fields in type ClinicalImpression.Finding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpressionFinding Constructor @@ -315,12 +315,114 @@ public function setItemReference(FHIRReference $itemReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBasis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASIS])) { + $v = $this->getBasis(); + foreach($validationRules[self::FIELD_BASIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_FINDING, self::FIELD_BASIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASIS])) { + $errs[self::FIELD_BASIS] = []; + } + $errs[self::FIELD_BASIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_FINDING, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_FINDING, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php index 90867c1b25..358afdd72a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRClinicalImpressionInvestigation extends FHIRBackboneElement * Validation map for fields in type ClinicalImpression.Investigation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpressionInvestigation Constructor @@ -280,12 +280,99 @@ public function setItem(array $item = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_INVESTIGATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_INVESTIGATION, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php index 09fca206f9..a67c47d0c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -172,7 +172,7 @@ class FHIRCodeSystemConcept extends FHIRBackboneElement * Validation map for fields in type CodeSystem.Concept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemConcept Constructor @@ -639,12 +639,171 @@ public function setProperty(array $property = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProperty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROPERTY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php index d6deecf97b..0e7437517d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRCodeSystemDesignation extends FHIRBackboneElement * Validation map for fields in type CodeSystem.Designation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemDesignation Constructor @@ -330,12 +330,114 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_DESIGNATION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_DESIGNATION, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_DESIGNATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php index 9f131e0711..6cfc995051 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRCodeSystemFilter extends FHIRBackboneElement * Validation map for fields in type CodeSystem.Filter * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_OPERATOR => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -465,12 +465,133 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOperator())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPERATOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_FILTER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_FILTER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATOR])) { + $v = $this->getOperator(); + foreach($validationRules[self::FIELD_OPERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_FILTER, self::FIELD_OPERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATOR])) { + $errs[self::FIELD_OPERATOR] = []; + } + $errs[self::FIELD_OPERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_FILTER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php index 3c22d8a48d..5ce4a0f512 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRCodeSystemProperty extends FHIRBackboneElement * Validation map for fields in type CodeSystem.Property * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemProperty Constructor @@ -434,12 +434,131 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php index 7401ebb6a6..54985fa2b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -201,7 +201,7 @@ class FHIRCodeSystemProperty1 extends FHIRBackboneElement * Validation map for fields in type CodeSystem.Property1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemProperty1 Constructor @@ -716,12 +716,199 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php index 993428909c..4553b3ee46 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRCommunicationPayload extends FHIRBackboneElement * Validation map for fields in type Communication.Payload * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationPayload Constructor @@ -311,12 +311,114 @@ public function setContentString($contentString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_DOT_PAYLOAD, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_DOT_PAYLOAD, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_STRING])) { + $v = $this->getContentString(); + foreach($validationRules[self::FIELD_CONTENT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_DOT_PAYLOAD, self::FIELD_CONTENT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_STRING])) { + $errs[self::FIELD_CONTENT_STRING] = []; + } + $errs[self::FIELD_CONTENT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php index f8907d67f7..25eab891e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRCommunicationRequestPayload extends FHIRBackboneElement * Validation map for fields in type CommunicationRequest.Payload * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationRequestPayload Constructor @@ -311,12 +311,114 @@ public function setContentString($contentString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_PAYLOAD, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_PAYLOAD, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_STRING])) { + $v = $this->getContentString(); + foreach($validationRules[self::FIELD_CONTENT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_PAYLOAD, self::FIELD_CONTENT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_STRING])) { + $errs[self::FIELD_CONTENT_STRING] = []; + } + $errs[self::FIELD_CONTENT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php index 21e37edeb8..0bbb2ea433 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRCompartmentDefinitionResource extends FHIRBackboneElement * Validation map for fields in type CompartmentDefinition.Resource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompartmentDefinitionResource Constructor @@ -401,12 +401,116 @@ public function setParam(array $param = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION_DOT_RESOURCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION_DOT_RESOURCE, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAM])) { + $v = $this->getParam(); + foreach($validationRules[self::FIELD_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION_DOT_RESOURCE, self::FIELD_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAM])) { + $errs[self::FIELD_PARAM] = []; + } + $errs[self::FIELD_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php index 645f6e2c02..321e6855a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRCompositionAttester extends FHIRBackboneElement * Validation map for fields in type Composition.Attester * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionAttester Constructor @@ -331,12 +331,114 @@ public function setTime($time = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php index 5131825c6e..0c32f698de 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRCompositionEvent extends FHIRBackboneElement * Validation map for fields in type Composition.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionEvent Constructor @@ -383,12 +383,118 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php index eb626f5918..22d0592e39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRCompositionRelatesTo extends FHIRBackboneElement * Validation map for fields in type Composition.RelatesTo * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionRelatesTo Constructor @@ -309,12 +309,114 @@ public function setTargetReference(FHIRReference $targetReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_RELATES_TO, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_IDENTIFIER])) { + $v = $this->getTargetIdentifier(); + foreach($validationRules[self::FIELD_TARGET_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_RELATES_TO, self::FIELD_TARGET_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_IDENTIFIER])) { + $errs[self::FIELD_TARGET_IDENTIFIER] = []; + } + $errs[self::FIELD_TARGET_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_REFERENCE])) { + $v = $this->getTargetReference(); + foreach($validationRules[self::FIELD_TARGET_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_RELATES_TO, self::FIELD_TARGET_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_REFERENCE])) { + $errs[self::FIELD_TARGET_REFERENCE] = []; + } + $errs[self::FIELD_TARGET_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php index e01894a46f..147cdeaecc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -246,7 +246,7 @@ class FHIRCompositionSection extends FHIRBackboneElement * Validation map for fields in type Composition.Section * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionSection Constructor @@ -870,12 +870,239 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEmptyReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EMPTY_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTRY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFocus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_BY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSection())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EMPTY_REASON])) { + $v = $this->getEmptyReason(); + foreach($validationRules[self::FIELD_EMPTY_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_EMPTY_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EMPTY_REASON])) { + $errs[self::FIELD_EMPTY_REASON] = []; + } + $errs[self::FIELD_EMPTY_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTRY])) { + $v = $this->getEntry(); + foreach($validationRules[self::FIELD_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY])) { + $errs[self::FIELD_ENTRY] = []; + } + $errs[self::FIELD_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_BY])) { + $v = $this->getOrderedBy(); + foreach($validationRules[self::FIELD_ORDERED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_ORDERED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_BY])) { + $errs[self::FIELD_ORDERED_BY] = []; + } + $errs[self::FIELD_ORDERED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECTION])) { + $v = $this->getSection(); + foreach($validationRules[self::FIELD_SECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_SECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECTION])) { + $errs[self::FIELD_SECTION] = []; + } + $errs[self::FIELD_SECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php index 80bdf2105c..0d8da6d678 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRConceptMapDependsOn extends FHIRBackboneElement * Validation map for fields in type ConceptMap.DependsOn * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapDependsOn Constructor @@ -444,12 +444,131 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getProperty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROPERTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php index 0b9420533f..ee82fd4909 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRConceptMapElement extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Element * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapElement Constructor @@ -369,12 +369,116 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_ELEMENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_ELEMENT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_ELEMENT, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php index 99eb4aed43..44dbadcf49 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRConceptMapGroup extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Group * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ELEMENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -586,12 +586,167 @@ public function setUnmapped(FHIRConceptMapUnmapped $unmapped = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_VERSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_VERSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnmapped())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNMAPPED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_VERSION])) { + $v = $this->getSourceVersion(); + foreach($validationRules[self::FIELD_SOURCE_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_SOURCE_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_VERSION])) { + $errs[self::FIELD_SOURCE_VERSION] = []; + } + $errs[self::FIELD_SOURCE_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_VERSION])) { + $v = $this->getTargetVersion(); + foreach($validationRules[self::FIELD_TARGET_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_TARGET_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_VERSION])) { + $errs[self::FIELD_TARGET_VERSION] = []; + } + $errs[self::FIELD_TARGET_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNMAPPED])) { + $v = $this->getUnmapped(); + foreach($validationRules[self::FIELD_UNMAPPED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_UNMAPPED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNMAPPED])) { + $errs[self::FIELD_UNMAPPED] = []; + } + $errs[self::FIELD_UNMAPPED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php index 9ab9514db3..1784c5fe3e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -173,7 +173,7 @@ class FHIRConceptMapTarget extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapTarget Constructor @@ -619,12 +619,169 @@ public function setProduct(array $product = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDependsOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEPENDS_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getEquivalence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EQUIVALENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProduct())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRODUCT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDS_ON])) { + $v = $this->getDependsOn(); + foreach($validationRules[self::FIELD_DEPENDS_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_DEPENDS_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDS_ON])) { + $errs[self::FIELD_DEPENDS_ON] = []; + } + $errs[self::FIELD_DEPENDS_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EQUIVALENCE])) { + $v = $this->getEquivalence(); + foreach($validationRules[self::FIELD_EQUIVALENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_EQUIVALENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EQUIVALENCE])) { + $errs[self::FIELD_EQUIVALENCE] = []; + } + $errs[self::FIELD_EQUIVALENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT])) { + $v = $this->getProduct(); + foreach($validationRules[self::FIELD_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT])) { + $errs[self::FIELD_PRODUCT] = []; + } + $errs[self::FIELD_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php index 9de17edf0f..c9cf64371f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -151,7 +151,7 @@ class FHIRConceptMapUnmapped extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Unmapped * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapUnmapped Constructor @@ -446,12 +446,131 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_UNMAPPED, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_UNMAPPED, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_UNMAPPED, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_UNMAPPED, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php index 3ec90de9f7..553263d09b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRConditionEvidence extends FHIRBackboneElement * Validation map for fields in type Condition.Evidence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionEvidence Constructor @@ -304,12 +304,101 @@ public function setDetail(array $detail = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_EVIDENCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_EVIDENCE, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php index 61e4dc8737..24f89f3d10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRConditionStage extends FHIRBackboneElement * Validation map for fields in type Condition.Stage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionStage Constructor @@ -325,12 +325,116 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAssessment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ASSESSMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSummary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUMMARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSESSMENT])) { + $v = $this->getAssessment(); + foreach($validationRules[self::FIELD_ASSESSMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_STAGE, self::FIELD_ASSESSMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSESSMENT])) { + $errs[self::FIELD_ASSESSMENT] = []; + } + $errs[self::FIELD_ASSESSMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUMMARY])) { + $v = $this->getSummary(); + foreach($validationRules[self::FIELD_SUMMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_STAGE, self::FIELD_SUMMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUMMARY])) { + $errs[self::FIELD_SUMMARY] = []; + } + $errs[self::FIELD_SUMMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_STAGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php index d0dac11b87..8dfabda512 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRConsentActor extends FHIRBackboneElement * Validation map for fields in type Consent.Actor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentActor Constructor @@ -239,12 +239,97 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_ACTOR, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_ACTOR, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php index 000ffae81a..681ab37383 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRConsentData extends FHIRBackboneElement * Validation map for fields in type Consent.Data * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentData Constructor @@ -244,12 +244,97 @@ public function setReference(FHIRReference $reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMeaning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEANING] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MEANING])) { + $v = $this->getMeaning(); + foreach($validationRules[self::FIELD_MEANING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_DATA, self::FIELD_MEANING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEANING])) { + $errs[self::FIELD_MEANING] = []; + } + $errs[self::FIELD_MEANING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_DATA, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php index 154aec3376..bd03465b5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRConsentPolicy extends FHIRBackboneElement * Validation map for fields in type Consent.Policy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentPolicy Constructor @@ -282,12 +282,97 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_POLICY, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_POLICY, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvision.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvision.php index 3d3559893e..8446bbb243 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvision.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvision.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -232,7 +232,7 @@ class FHIRConsentProvision extends FHIRBackboneElement * Validation map for fields in type Consent.Provision * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentProvision Constructor @@ -1017,12 +1017,266 @@ public function setType(FHIRConsentProvisionType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getActor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getClass())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CLASS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getData())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDataPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProvision())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROVISION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPurpose())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_PERIOD])) { + $v = $this->getDataPeriod(); + foreach($validationRules[self::FIELD_DATA_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_DATA_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_PERIOD])) { + $errs[self::FIELD_DATA_PERIOD] = []; + } + $errs[self::FIELD_DATA_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVISION])) { + $v = $this->getProvision(); + foreach($validationRules[self::FIELD_PROVISION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_PROVISION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVISION])) { + $errs[self::FIELD_PROVISION] = []; + } + $errs[self::FIELD_PROVISION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_PROVISION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerification.php index f898befa9f..dcc7b70c1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRConsentVerification extends FHIRBackboneElement * Validation map for fields in type Consent.Verification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentVerification Constructor @@ -333,12 +333,114 @@ public function setVerifiedWith(FHIRReference $verifiedWith = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getVerificationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERIFICATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVerified())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERIFIED] = $fieldErrs; + } + } + if (null !== ($v = $this->getVerifiedWith())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERIFIED_WITH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VERIFICATION_DATE])) { + $v = $this->getVerificationDate(); + foreach($validationRules[self::FIELD_VERIFICATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_VERIFICATION, self::FIELD_VERIFICATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERIFICATION_DATE])) { + $errs[self::FIELD_VERIFICATION_DATE] = []; + } + $errs[self::FIELD_VERIFICATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERIFIED])) { + $v = $this->getVerified(); + foreach($validationRules[self::FIELD_VERIFIED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_VERIFICATION, self::FIELD_VERIFIED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERIFIED])) { + $errs[self::FIELD_VERIFIED] = []; + } + $errs[self::FIELD_VERIFIED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERIFIED_WITH])) { + $v = $this->getVerifiedWith(); + foreach($validationRules[self::FIELD_VERIFIED_WITH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_VERIFICATION, self::FIELD_VERIFIED_WITH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERIFIED_WITH])) { + $errs[self::FIELD_VERIFIED_WITH] = []; + } + $errs[self::FIELD_VERIFIED_WITH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAction.php index 856612b9f1..7dfde0735e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -402,7 +402,7 @@ class FHIRContractAction extends FHIRBackboneElement * Validation map for fields in type Contract.Action * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractAction Constructor @@ -2076,12 +2076,480 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContextLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTEXT_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDoNotPerform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DO_NOT_PERFORM] = $fieldErrs; + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformerLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPerformerRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER_ROLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformerType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_LINK_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRequester())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUESTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRequesterLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUESTER_LINK_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurityLabelNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT_LINK_ID])) { + $v = $this->getContextLinkId(); + foreach($validationRules[self::FIELD_CONTEXT_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_CONTEXT_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT_LINK_ID])) { + $errs[self::FIELD_CONTEXT_LINK_ID] = []; + } + $errs[self::FIELD_CONTEXT_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DO_NOT_PERFORM])) { + $v = $this->getDoNotPerform(); + foreach($validationRules[self::FIELD_DO_NOT_PERFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_DO_NOT_PERFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DO_NOT_PERFORM])) { + $errs[self::FIELD_DO_NOT_PERFORM] = []; + } + $errs[self::FIELD_DO_NOT_PERFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER_LINK_ID])) { + $v = $this->getPerformerLinkId(); + foreach($validationRules[self::FIELD_PERFORMER_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_PERFORMER_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER_LINK_ID])) { + $errs[self::FIELD_PERFORMER_LINK_ID] = []; + } + $errs[self::FIELD_PERFORMER_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER_ROLE])) { + $v = $this->getPerformerRole(); + foreach($validationRules[self::FIELD_PERFORMER_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_PERFORMER_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER_ROLE])) { + $errs[self::FIELD_PERFORMER_ROLE] = []; + } + $errs[self::FIELD_PERFORMER_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER_TYPE])) { + $v = $this->getPerformerType(); + foreach($validationRules[self::FIELD_PERFORMER_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_PERFORMER_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER_TYPE])) { + $errs[self::FIELD_PERFORMER_TYPE] = []; + } + $errs[self::FIELD_PERFORMER_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_LINK_ID])) { + $v = $this->getReasonLinkId(); + foreach($validationRules[self::FIELD_REASON_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_REASON_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_LINK_ID])) { + $errs[self::FIELD_REASON_LINK_ID] = []; + } + $errs[self::FIELD_REASON_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER_LINK_ID])) { + $v = $this->getRequesterLinkId(); + foreach($validationRules[self::FIELD_REQUESTER_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_REQUESTER_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER_LINK_ID])) { + $errs[self::FIELD_REQUESTER_LINK_ID] = []; + } + $errs[self::FIELD_REQUESTER_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL_NUMBER])) { + $v = $this->getSecurityLabelNumber(); + foreach($validationRules[self::FIELD_SECURITY_LABEL_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_SECURITY_LABEL_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL_NUMBER])) { + $errs[self::FIELD_SECURITY_LABEL_NUMBER] = []; + } + $errs[self::FIELD_SECURITY_LABEL_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ACTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswer.php index 2b97cc7dd2..259cd41a80 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -290,7 +290,7 @@ class FHIRContractAnswer extends FHIRBackboneElement * Validation map for fields in type Contract.Answer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractAnswer Constructor @@ -1049,12 +1049,267 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ANSWER, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAsset.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAsset.php index f3a6b0732d..9930071212 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAsset.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAsset.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -281,7 +281,7 @@ class FHIRContractAsset extends FHIRBackboneElement * Validation map for fields in type Contract.Asset * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractAsset Constructor @@ -1401,12 +1401,340 @@ public function setValuedItem(array $valuedItem = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAnswer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ANSWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTEXT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPeriod())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERIOD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPeriodType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERIOD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (null !== ($v = $this->getScope())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCOPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSecurityLabelNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL_NUMBER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubtype())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBTYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTypeReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUsePeriod())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_PERIOD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getValuedItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUED_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER])) { + $v = $this->getAnswer(); + foreach($validationRules[self::FIELD_ANSWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_ANSWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER])) { + $errs[self::FIELD_ANSWER] = []; + } + $errs[self::FIELD_ANSWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD_TYPE])) { + $v = $this->getPeriodType(); + foreach($validationRules[self::FIELD_PERIOD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_PERIOD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD_TYPE])) { + $errs[self::FIELD_PERIOD_TYPE] = []; + } + $errs[self::FIELD_PERIOD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCOPE])) { + $v = $this->getScope(); + foreach($validationRules[self::FIELD_SCOPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_SCOPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCOPE])) { + $errs[self::FIELD_SCOPE] = []; + } + $errs[self::FIELD_SCOPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL_NUMBER])) { + $v = $this->getSecurityLabelNumber(); + foreach($validationRules[self::FIELD_SECURITY_LABEL_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_SECURITY_LABEL_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL_NUMBER])) { + $errs[self::FIELD_SECURITY_LABEL_NUMBER] = []; + } + $errs[self::FIELD_SECURITY_LABEL_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTYPE])) { + $v = $this->getSubtype(); + foreach($validationRules[self::FIELD_SUBTYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_SUBTYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTYPE])) { + $errs[self::FIELD_SUBTYPE] = []; + } + $errs[self::FIELD_SUBTYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE_REFERENCE])) { + $v = $this->getTypeReference(); + foreach($validationRules[self::FIELD_TYPE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_TYPE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE_REFERENCE])) { + $errs[self::FIELD_TYPE_REFERENCE] = []; + } + $errs[self::FIELD_TYPE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_PERIOD])) { + $v = $this->getUsePeriod(); + foreach($validationRules[self::FIELD_USE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_USE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_PERIOD])) { + $errs[self::FIELD_USE_PERIOD] = []; + } + $errs[self::FIELD_USE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUED_ITEM])) { + $v = $this->getValuedItem(); + foreach($validationRules[self::FIELD_VALUED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_ASSET, self::FIELD_VALUED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUED_ITEM])) { + $errs[self::FIELD_VALUED_ITEM] = []; + } + $errs[self::FIELD_VALUED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinition.php index d822727556..9ab624024d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -182,7 +182,7 @@ class FHIRContractContentDefinition extends FHIRBackboneElement * Validation map for fields in type Contract.ContentDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractContentDefinition Constructor @@ -543,12 +543,165 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublicationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLICATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublicationStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLICATION_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_CONTENT_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLICATION_DATE])) { + $v = $this->getPublicationDate(); + foreach($validationRules[self::FIELD_PUBLICATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_CONTENT_DEFINITION, self::FIELD_PUBLICATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLICATION_DATE])) { + $errs[self::FIELD_PUBLICATION_DATE] = []; + } + $errs[self::FIELD_PUBLICATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLICATION_STATUS])) { + $v = $this->getPublicationStatus(); + foreach($validationRules[self::FIELD_PUBLICATION_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_CONTENT_DEFINITION, self::FIELD_PUBLICATION_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLICATION_STATUS])) { + $errs[self::FIELD_PUBLICATION_STATUS] = []; + } + $errs[self::FIELD_PUBLICATION_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_CONTENT_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_CONTENT_DEFINITION, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_CONTENT_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContext.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContext.php index b9aff9db9b..eae5a1f63c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContext.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRContractContext extends FHIRBackboneElement * Validation map for fields in type Contract.Context * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractContext Constructor @@ -352,12 +352,116 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_CONTEXT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_CONTEXT, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_CONTEXT, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php index 8c2f3c4b18..1b4110cc32 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRContractFriendly extends FHIRBackboneElement * Validation map for fields in type Contract.Friendly * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractFriendly Constructor @@ -238,12 +238,97 @@ public function setContentReference(FHIRReference $contentReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_FRIENDLY, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_FRIENDLY, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php index 6b80e4c1d8..137b569cac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRContractLegal extends FHIRBackboneElement * Validation map for fields in type Contract.Legal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractLegal Constructor @@ -232,12 +232,97 @@ public function setContentReference(FHIRReference $contentReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_LEGAL, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_LEGAL, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOffer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOffer.php index 8c07705a43..807c690438 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOffer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOffer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -220,7 +220,7 @@ class FHIRContractOffer extends FHIRBackboneElement * Validation map for fields in type Contract.Offer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractOffer Constructor @@ -948,12 +948,245 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAnswer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ANSWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDecision())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECISION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDecisionMode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DECISION_MODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurityLabelNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTopic())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOPIC] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ANSWER])) { + $v = $this->getAnswer(); + foreach($validationRules[self::FIELD_ANSWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_OFFER, self::FIELD_ANSWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER])) { + $errs[self::FIELD_ANSWER] = []; + } + $errs[self::FIELD_ANSWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECISION])) { + $v = $this->getDecision(); + foreach($validationRules[self::FIELD_DECISION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_OFFER, self::FIELD_DECISION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECISION])) { + $errs[self::FIELD_DECISION] = []; + } + $errs[self::FIELD_DECISION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECISION_MODE])) { + $v = $this->getDecisionMode(); + foreach($validationRules[self::FIELD_DECISION_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_OFFER, self::FIELD_DECISION_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECISION_MODE])) { + $errs[self::FIELD_DECISION_MODE] = []; + } + $errs[self::FIELD_DECISION_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_OFFER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_OFFER, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_OFFER, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL_NUMBER])) { + $v = $this->getSecurityLabelNumber(); + foreach($validationRules[self::FIELD_SECURITY_LABEL_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_OFFER, self::FIELD_SECURITY_LABEL_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL_NUMBER])) { + $errs[self::FIELD_SECURITY_LABEL_NUMBER] = []; + } + $errs[self::FIELD_SECURITY_LABEL_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_OFFER, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_OFFER, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_OFFER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractParty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractParty.php index faae80f7a6..a8bce3b3ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractParty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractParty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRContractParty extends FHIRBackboneElement * Validation map for fields in type Contract.Party * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_REFERENCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -270,12 +270,99 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_PARTY, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_PARTY, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php index ed76476c15..218c62737c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRContractRule extends FHIRBackboneElement * Validation map for fields in type Contract.Rule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractRule Constructor @@ -232,12 +232,97 @@ public function setContentReference(FHIRReference $contentReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_RULE, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_RULE, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabel.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabel.php index e8fd541706..301c3e5701 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabel.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRContractSecurityLabel extends FHIRBackboneElement * Validation map for fields in type Contract.SecurityLabel * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractSecurityLabel Constructor @@ -475,12 +475,137 @@ public function setNumber(array $number = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClassification())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASSIFICATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getControl())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTROL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NUMBER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SECURITY_LABEL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASSIFICATION])) { + $v = $this->getClassification(); + foreach($validationRules[self::FIELD_CLASSIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SECURITY_LABEL, self::FIELD_CLASSIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASSIFICATION])) { + $errs[self::FIELD_CLASSIFICATION] = []; + } + $errs[self::FIELD_CLASSIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTROL])) { + $v = $this->getControl(); + foreach($validationRules[self::FIELD_CONTROL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SECURITY_LABEL, self::FIELD_CONTROL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTROL])) { + $errs[self::FIELD_CONTROL] = []; + } + $errs[self::FIELD_CONTROL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SECURITY_LABEL, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php index 325d6149c8..53e4af86df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRContractSigner extends FHIRBackboneElement * Validation map for fields in type Contract.Signer * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_SIGNATURE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -333,12 +333,116 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSignature())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SIGNATURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SIGNER, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNATURE])) { + $v = $this->getSignature(); + foreach($validationRules[self::FIELD_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SIGNER, self::FIELD_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNATURE])) { + $errs[self::FIELD_SIGNATURE] = []; + } + $errs[self::FIELD_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SIGNER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubject.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubject.php index ca894b510f..bab44fdcc4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubject.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubject.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRContractSubject extends FHIRBackboneElement * Validation map for fields in type Contract.Subject * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_REFERENCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -270,12 +270,99 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SUBJECT, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SUBJECT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php index 36a849e376..c8a7ad868e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -256,7 +256,7 @@ class FHIRContractTerm extends FHIRBackboneElement * Validation map for fields in type Contract.Term * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractTerm Constructor @@ -986,12 +986,292 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getApplies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPLIES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAsset())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ASSET, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTopicCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOPIC_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTopicReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOPIC_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPLIES])) { + $v = $this->getApplies(); + foreach($validationRules[self::FIELD_APPLIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_APPLIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES])) { + $errs[self::FIELD_APPLIES] = []; + } + $errs[self::FIELD_APPLIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSET])) { + $v = $this->getAsset(); + foreach($validationRules[self::FIELD_ASSET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_ASSET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSET])) { + $errs[self::FIELD_ASSET] = []; + } + $errs[self::FIELD_ASSET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFER])) { + $v = $this->getOffer(); + foreach($validationRules[self::FIELD_OFFER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_OFFER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFER])) { + $errs[self::FIELD_OFFER] = []; + } + $errs[self::FIELD_OFFER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC_CODEABLE_CONCEPT])) { + $v = $this->getTopicCodeableConcept(); + foreach($validationRules[self::FIELD_TOPIC_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_TOPIC_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC_CODEABLE_CONCEPT])) { + $errs[self::FIELD_TOPIC_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_TOPIC_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC_REFERENCE])) { + $v = $this->getTopicReference(); + foreach($validationRules[self::FIELD_TOPIC_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_TOPIC_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC_REFERENCE])) { + $errs[self::FIELD_TOPIC_REFERENCE] = []; + } + $errs[self::FIELD_TOPIC_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php index 32082415c8..8c93789a82 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -307,7 +307,7 @@ class FHIRContractValuedItem extends FHIRBackboneElement * Validation map for fields in type Contract.ValuedItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractValuedItem Constructor @@ -1207,12 +1207,322 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEffectiveTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntityCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntityReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPoints())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POINTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecipient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECIPIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSecurityLabelNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_TIME])) { + $v = $this->getEffectiveTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_EFFECTIVE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_TIME])) { + $errs[self::FIELD_EFFECTIVE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { + $v = $this->getEntityCodeableConcept(); + foreach($validationRules[self::FIELD_ENTITY_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_ENTITY_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY_REFERENCE])) { + $v = $this->getEntityReference(); + foreach($validationRules[self::FIELD_ENTITY_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_ENTITY_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY_REFERENCE])) { + $errs[self::FIELD_ENTITY_REFERENCE] = []; + } + $errs[self::FIELD_ENTITY_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT])) { + $v = $this->getPayment(); + foreach($validationRules[self::FIELD_PAYMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_PAYMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT])) { + $errs[self::FIELD_PAYMENT] = []; + } + $errs[self::FIELD_PAYMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_DATE])) { + $v = $this->getPaymentDate(); + foreach($validationRules[self::FIELD_PAYMENT_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_PAYMENT_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_DATE])) { + $errs[self::FIELD_PAYMENT_DATE] = []; + } + $errs[self::FIELD_PAYMENT_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POINTS])) { + $v = $this->getPoints(); + foreach($validationRules[self::FIELD_POINTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_POINTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POINTS])) { + $errs[self::FIELD_POINTS] = []; + } + $errs[self::FIELD_POINTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL_NUMBER])) { + $v = $this->getSecurityLabelNumber(); + foreach($validationRules[self::FIELD_SECURITY_LABEL_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_SECURITY_LABEL_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL_NUMBER])) { + $errs[self::FIELD_SECURITY_LABEL_NUMBER] = []; + } + $errs[self::FIELD_SECURITY_LABEL_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClass.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClass.php index bc1f532547..f0370fdb9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClass.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClass.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRCoverageClass extends FHIRBackboneElement * Validation map for fields in type Coverage.Class * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageClass Constructor @@ -334,12 +334,114 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_CLASS, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_CLASS, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_CLASS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiary.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiary.php index 7b60e59404..44f6612159 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiary.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRCoverageCostToBeneficiary extends FHIRBackboneElement * Validation map for fields in type Coverage.CostToBeneficiary * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageCostToBeneficiary Constructor @@ -377,12 +377,133 @@ public function setValueQuantity(FHIRQuantity $valueQuantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getException())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCEPTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXCEPTION])) { + $v = $this->getException(); + foreach($validationRules[self::FIELD_EXCEPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_COST_TO_BENEFICIARY, self::FIELD_EXCEPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCEPTION])) { + $errs[self::FIELD_EXCEPTION] = []; + } + $errs[self::FIELD_EXCEPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_COST_TO_BENEFICIARY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_COST_TO_BENEFICIARY, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_COST_TO_BENEFICIARY, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageException.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageException.php index 73ec93b6c0..57ae2cd304 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageException.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageException.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRCoverageException extends FHIRBackboneElement * Validation map for fields in type Coverage.Exception * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageException Constructor @@ -229,12 +229,97 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_EXCEPTION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_EXCEPTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosis.php index da5fc76657..2a7bc29164 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRCoverageEligibilityRequestDiagnosis extends FHIRBackboneElement * Validation map for fields in type CoverageEligibilityRequest.Diagnosis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageEligibilityRequestDiagnosis Constructor @@ -238,12 +238,97 @@ public function setDiagnosisReference(FHIRReference $diagnosisReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiagnosisCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosisReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT])) { + $v = $this->getDiagnosisCodeableConcept(); + foreach($validationRules[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_REFERENCE])) { + $v = $this->getDiagnosisReference(); + foreach($validationRules[self::FIELD_DIAGNOSIS_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_REFERENCE])) { + $errs[self::FIELD_DIAGNOSIS_REFERENCE] = []; + } + $errs[self::FIELD_DIAGNOSIS_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsurance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsurance.php index 4b98d5648a..66185340ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRCoverageEligibilityRequestInsurance extends FHIRBackboneElement * Validation map for fields in type CoverageEligibilityRequest.Insurance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageEligibilityRequestInsurance Constructor @@ -338,12 +338,114 @@ public function setFocal($focal = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBusinessArrangement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCAL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BUSINESS_ARRANGEMENT])) { + $v = $this->getBusinessArrangement(); + foreach($validationRules[self::FIELD_BUSINESS_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_INSURANCE, self::FIELD_BUSINESS_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BUSINESS_ARRANGEMENT])) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = []; + } + $errs[self::FIELD_BUSINESS_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_INSURANCE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL])) { + $v = $this->getFocal(); + foreach($validationRules[self::FIELD_FOCAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_INSURANCE, self::FIELD_FOCAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL])) { + $errs[self::FIELD_FOCAL] = []; + } + $errs[self::FIELD_FOCAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItem.php index b2e95636d1..59d4a91dfe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -225,7 +225,7 @@ class FHIRCoverageEligibilityRequestItem extends FHIRBackboneElement * Validation map for fields in type CoverageEligibilityRequest.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageEligibilityRequestItem Constructor @@ -839,12 +839,241 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFacility())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfoSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_ITEM, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_ITEM, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY])) { + $v = $this->getFacility(); + foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_ITEM, self::FIELD_FACILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY])) { + $errs[self::FIELD_FACILITY] = []; + } + $errs[self::FIELD_FACILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_ITEM, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_ITEM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO_SEQUENCE])) { + $v = $this->getSupportingInfoSequence(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_ITEM, self::FIELD_SUPPORTING_INFO_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO_SEQUENCE])) { + $errs[self::FIELD_SUPPORTING_INFO_SEQUENCE] = []; + } + $errs[self::FIELD_SUPPORTING_INFO_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfo.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfo.php index a097664ff5..cc4b9e0c0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfo.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRCoverageEligibilityRequestSupportingInfo extends FHIRBackboneElement * Validation map for fields in type CoverageEligibilityRequest.SupportingInfo * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageEligibilityRequestSupportingInfo Constructor @@ -332,12 +332,114 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAppliesToAll())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPLIES_TO_ALL] = $fieldErrs; + } + } + if (null !== ($v = $this->getInformation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INFORMATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPLIES_TO_ALL])) { + $v = $this->getAppliesToAll(); + foreach($validationRules[self::FIELD_APPLIES_TO_ALL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_SUPPORTING_INFO, self::FIELD_APPLIES_TO_ALL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES_TO_ALL])) { + $errs[self::FIELD_APPLIES_TO_ALL] = []; + } + $errs[self::FIELD_APPLIES_TO_ALL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORMATION])) { + $v = $this->getInformation(); + foreach($validationRules[self::FIELD_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_SUPPORTING_INFO, self::FIELD_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORMATION])) { + $errs[self::FIELD_INFORMATION] = []; + } + $errs[self::FIELD_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST_DOT_SUPPORTING_INFO, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefit.php index ee88f0077e..2dd21bd5b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -184,7 +184,7 @@ class FHIRCoverageEligibilityResponseBenefit extends FHIRBackboneElement * Validation map for fields in type CoverageEligibilityResponse.Benefit * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageEligibilityResponseBenefit Constructor @@ -594,12 +594,182 @@ public function setUsedUnsignedInt($usedUnsignedInt = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllowedMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllowedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllowedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsedMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USED_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USED_UNSIGNED_INT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLOWED_MONEY])) { + $v = $this->getAllowedMoney(); + foreach($validationRules[self::FIELD_ALLOWED_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_BENEFIT, self::FIELD_ALLOWED_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_MONEY])) { + $errs[self::FIELD_ALLOWED_MONEY] = []; + } + $errs[self::FIELD_ALLOWED_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALLOWED_STRING])) { + $v = $this->getAllowedString(); + foreach($validationRules[self::FIELD_ALLOWED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_BENEFIT, self::FIELD_ALLOWED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_STRING])) { + $errs[self::FIELD_ALLOWED_STRING] = []; + } + $errs[self::FIELD_ALLOWED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $v = $this->getAllowedUnsignedInt(); + foreach($validationRules[self::FIELD_ALLOWED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_BENEFIT, self::FIELD_ALLOWED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $errs[self::FIELD_ALLOWED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_ALLOWED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_BENEFIT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_MONEY])) { + $v = $this->getUsedMoney(); + foreach($validationRules[self::FIELD_USED_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_BENEFIT, self::FIELD_USED_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_MONEY])) { + $errs[self::FIELD_USED_MONEY] = []; + } + $errs[self::FIELD_USED_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_STRING])) { + $v = $this->getUsedString(); + foreach($validationRules[self::FIELD_USED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_BENEFIT, self::FIELD_USED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_STRING])) { + $errs[self::FIELD_USED_STRING] = []; + } + $errs[self::FIELD_USED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_UNSIGNED_INT])) { + $v = $this->getUsedUnsignedInt(); + foreach($validationRules[self::FIELD_USED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_BENEFIT, self::FIELD_USED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_UNSIGNED_INT])) { + $errs[self::FIELD_USED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_USED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseError.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseError.php index a620e5f070..bd9e199279 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseError.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseError.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRCoverageEligibilityResponseError extends FHIRBackboneElement * Validation map for fields in type CoverageEligibilityResponse.Error * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageEligibilityResponseError Constructor @@ -182,12 +182,80 @@ public function setCode(FHIRCodeableConcept $code = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ERROR, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsurance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsurance.php index 392d502666..985c68fa30 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRCoverageEligibilityResponseInsurance extends FHIRBackboneElement * Validation map for fields in type CoverageEligibilityResponse.Insurance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageEligibilityResponseInsurance Constructor @@ -393,12 +393,133 @@ public function setItem(array $item = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBenefitPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BENEFIT_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getInforce())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INFORCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_BENEFIT_PERIOD])) { + $v = $this->getBenefitPeriod(); + foreach($validationRules[self::FIELD_BENEFIT_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_INSURANCE, self::FIELD_BENEFIT_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFIT_PERIOD])) { + $errs[self::FIELD_BENEFIT_PERIOD] = []; + } + $errs[self::FIELD_BENEFIT_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_INSURANCE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORCE])) { + $v = $this->getInforce(); + foreach($validationRules[self::FIELD_INFORCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_INSURANCE, self::FIELD_INFORCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORCE])) { + $errs[self::FIELD_INFORCE] = []; + } + $errs[self::FIELD_INFORCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_INSURANCE, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItem.php index 57771668eb..5a6cf21861 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -275,7 +275,7 @@ class FHIRCoverageEligibilityResponseItem extends FHIRBackboneElement * Validation map for fields in type CoverageEligibilityResponse.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageEligibilityResponseItem Constructor @@ -1092,12 +1092,307 @@ public function setUnit(FHIRCodeableConcept $unit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthorizationRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORIZATION_REQUIRED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthorizationSupporting())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHORIZATION_SUPPORTING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAuthorizationUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORIZATION_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBenefit())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BENEFIT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExcluded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getTerm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TERM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORIZATION_REQUIRED])) { + $v = $this->getAuthorizationRequired(); + foreach($validationRules[self::FIELD_AUTHORIZATION_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_AUTHORIZATION_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORIZATION_REQUIRED])) { + $errs[self::FIELD_AUTHORIZATION_REQUIRED] = []; + } + $errs[self::FIELD_AUTHORIZATION_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORIZATION_SUPPORTING])) { + $v = $this->getAuthorizationSupporting(); + foreach($validationRules[self::FIELD_AUTHORIZATION_SUPPORTING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_AUTHORIZATION_SUPPORTING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORIZATION_SUPPORTING])) { + $errs[self::FIELD_AUTHORIZATION_SUPPORTING] = []; + } + $errs[self::FIELD_AUTHORIZATION_SUPPORTING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORIZATION_URL])) { + $v = $this->getAuthorizationUrl(); + foreach($validationRules[self::FIELD_AUTHORIZATION_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_AUTHORIZATION_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORIZATION_URL])) { + $errs[self::FIELD_AUTHORIZATION_URL] = []; + } + $errs[self::FIELD_AUTHORIZATION_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BENEFIT])) { + $v = $this->getBenefit(); + foreach($validationRules[self::FIELD_BENEFIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_BENEFIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFIT])) { + $errs[self::FIELD_BENEFIT] = []; + } + $errs[self::FIELD_BENEFIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDED])) { + $v = $this->getExcluded(); + foreach($validationRules[self::FIELD_EXCLUDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_EXCLUDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDED])) { + $errs[self::FIELD_EXCLUDED] = []; + } + $errs[self::FIELD_EXCLUDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TERM])) { + $v = $this->getTerm(); + foreach($validationRules[self::FIELD_TERM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_TERM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TERM])) { + $errs[self::FIELD_TERM] = []; + } + $errs[self::FIELD_TERM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE_DOT_ITEM, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidence.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidence.php index cf386c2987..4c945267fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRDetectedIssueEvidence extends FHIRBackboneElement * Validation map for fields in type DetectedIssue.Evidence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDetectedIssueEvidence Constructor @@ -309,12 +309,101 @@ public function setDetail(array $detail = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_EVIDENCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_EVIDENCE, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php index c45a817884..34768f765b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRDetectedIssueMitigation extends FHIRBackboneElement * Validation map for fields in type DetectedIssue.Mitigation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDetectedIssueMitigation Constructor @@ -320,12 +320,114 @@ public function setDate($date = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_MITIGATION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_MITIGATION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_MITIGATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceName.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceName.php index cb246861b6..fa7c7adcdb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceName.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRDeviceDeviceName extends FHIRBackboneElement * Validation map for fields in type Device.DeviceName * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceDeviceName Constructor @@ -269,12 +269,97 @@ public function setType(FHIRDeviceNameType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_DEVICE_NAME, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_DEVICE_NAME, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceProperty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceProperty.php index a599739d64..8b38a923e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceProperty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceProperty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRDeviceProperty extends FHIRBackboneElement * Validation map for fields in type Device.Property * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceProperty Constructor @@ -365,12 +365,118 @@ public function setValueQuantity(array $valueQuantity = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValueCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUE_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getValueQuantity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUE_QUANTITY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_PROPERTY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_PROPERTY, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_PROPERTY, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecialization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecialization.php index 2fba6a4893..971fc79e47 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecialization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecialization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRDeviceSpecialization extends FHIRBackboneElement * Validation map for fields in type Device.Specialization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceSpecialization Constructor @@ -255,12 +255,97 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSystemType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SYSTEM_TYPE])) { + $v = $this->getSystemType(); + foreach($validationRules[self::FIELD_SYSTEM_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_SPECIALIZATION, self::FIELD_SYSTEM_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM_TYPE])) { + $errs[self::FIELD_SYSTEM_TYPE] = []; + } + $errs[self::FIELD_SYSTEM_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_SPECIALIZATION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrier.php index be1951c559..4a06feb13a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -180,7 +180,7 @@ class FHIRDeviceUdiCarrier extends FHIRBackboneElement * Validation map for fields in type Device.UdiCarrier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceUdiCarrier Constructor @@ -603,12 +603,165 @@ public function setJurisdiction($jurisdiction = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCarrierAIDC())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARRIER_AIDC] = $fieldErrs; + } + } + if (null !== ($v = $this->getCarrierHRF())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARRIER_HRF] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntryType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTRY_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssuer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUER] = $fieldErrs; + } + } + if (null !== ($v = $this->getJurisdiction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_JURISDICTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CARRIER_AIDC])) { + $v = $this->getCarrierAIDC(); + foreach($validationRules[self::FIELD_CARRIER_AIDC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI_CARRIER, self::FIELD_CARRIER_AIDC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARRIER_AIDC])) { + $errs[self::FIELD_CARRIER_AIDC] = []; + } + $errs[self::FIELD_CARRIER_AIDC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARRIER_HRF])) { + $v = $this->getCarrierHRF(); + foreach($validationRules[self::FIELD_CARRIER_HRF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI_CARRIER, self::FIELD_CARRIER_HRF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARRIER_HRF])) { + $errs[self::FIELD_CARRIER_HRF] = []; + } + $errs[self::FIELD_CARRIER_HRF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE_IDENTIFIER])) { + $v = $this->getDeviceIdentifier(); + foreach($validationRules[self::FIELD_DEVICE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI_CARRIER, self::FIELD_DEVICE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE_IDENTIFIER])) { + $errs[self::FIELD_DEVICE_IDENTIFIER] = []; + } + $errs[self::FIELD_DEVICE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTRY_TYPE])) { + $v = $this->getEntryType(); + foreach($validationRules[self::FIELD_ENTRY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI_CARRIER, self::FIELD_ENTRY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY_TYPE])) { + $errs[self::FIELD_ENTRY_TYPE] = []; + } + $errs[self::FIELD_ENTRY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUER])) { + $v = $this->getIssuer(); + foreach($validationRules[self::FIELD_ISSUER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI_CARRIER, self::FIELD_ISSUER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUER])) { + $errs[self::FIELD_ISSUER] = []; + } + $errs[self::FIELD_ISSUER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI_CARRIER, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersion.php index 9901425767..5454189b55 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRDeviceVersion extends FHIRBackboneElement * Validation map for fields in type Device.Version * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceVersion Constructor @@ -308,12 +308,114 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComponent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPONENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPONENT])) { + $v = $this->getComponent(); + foreach($validationRules[self::FIELD_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_VERSION, self::FIELD_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPONENT])) { + $errs[self::FIELD_COMPONENT] = []; + } + $errs[self::FIELD_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_VERSION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_VERSION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapability.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapability.php index d41b968071..2a82c1623b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapability.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRDeviceDefinitionCapability extends FHIRBackboneElement * Validation map for fields in type DeviceDefinition.Capability * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceDefinitionCapability Constructor @@ -269,12 +269,99 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDescription())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESCRIPTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_CAPABILITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_CAPABILITY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceName.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceName.php index 8199b4fc8d..ceba864200 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceName.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRDeviceDefinitionDeviceName extends FHIRBackboneElement * Validation map for fields in type DeviceDefinition.DeviceName * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceDefinitionDeviceName Constructor @@ -268,12 +268,97 @@ public function setType(FHIRDeviceNameType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_DEVICE_NAME, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_DEVICE_NAME, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterial.php index 4a33537735..9e916a85df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRDeviceDefinitionMaterial extends FHIRBackboneElement * Validation map for fields in type DeviceDefinition.Material * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceDefinitionMaterial Constructor @@ -322,12 +322,114 @@ public function setSubstance(FHIRCodeableConcept $substance = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllergenicIndicator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLERGENIC_INDICATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAlternate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALTERNATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLERGENIC_INDICATOR])) { + $v = $this->getAllergenicIndicator(); + foreach($validationRules[self::FIELD_ALLERGENIC_INDICATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_MATERIAL, self::FIELD_ALLERGENIC_INDICATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLERGENIC_INDICATOR])) { + $errs[self::FIELD_ALLERGENIC_INDICATOR] = []; + } + $errs[self::FIELD_ALLERGENIC_INDICATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALTERNATE])) { + $v = $this->getAlternate(); + foreach($validationRules[self::FIELD_ALTERNATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_MATERIAL, self::FIELD_ALTERNATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALTERNATE])) { + $errs[self::FIELD_ALTERNATE] = []; + } + $errs[self::FIELD_ALTERNATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_MATERIAL, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionProperty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionProperty.php index a16e9cd0b2..8a23d6941d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionProperty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionProperty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRDeviceDefinitionProperty extends FHIRBackboneElement * Validation map for fields in type DeviceDefinition.Property * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceDefinitionProperty Constructor @@ -364,12 +364,118 @@ public function setValueQuantity(array $valueQuantity = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValueCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUE_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getValueQuantity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUE_QUANTITY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_PROPERTY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_PROPERTY, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_PROPERTY, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecialization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecialization.php index c240201af1..f640707ded 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecialization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecialization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRDeviceDefinitionSpecialization extends FHIRBackboneElement * Validation map for fields in type DeviceDefinition.Specialization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceDefinitionSpecialization Constructor @@ -275,12 +275,97 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSystemType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SYSTEM_TYPE])) { + $v = $this->getSystemType(); + foreach($validationRules[self::FIELD_SYSTEM_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_SPECIALIZATION, self::FIELD_SYSTEM_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM_TYPE])) { + $errs[self::FIELD_SYSTEM_TYPE] = []; + } + $errs[self::FIELD_SYSTEM_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_SPECIALIZATION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifier.php index 455c47bd89..c9cc5b6c18 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRDeviceDefinitionUdiDeviceIdentifier extends FHIRBackboneElement * Validation map for fields in type DeviceDefinition.UdiDeviceIdentifier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceDefinitionUdiDeviceIdentifier Constructor @@ -356,12 +356,114 @@ public function setJurisdiction($jurisdiction = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDeviceIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssuer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUER] = $fieldErrs; + } + } + if (null !== ($v = $this->getJurisdiction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_JURISDICTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEVICE_IDENTIFIER])) { + $v = $this->getDeviceIdentifier(); + foreach($validationRules[self::FIELD_DEVICE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_UDI_DEVICE_IDENTIFIER, self::FIELD_DEVICE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE_IDENTIFIER])) { + $errs[self::FIELD_DEVICE_IDENTIFIER] = []; + } + $errs[self::FIELD_DEVICE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUER])) { + $v = $this->getIssuer(); + foreach($validationRules[self::FIELD_ISSUER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_UDI_DEVICE_IDENTIFIER, self::FIELD_ISSUER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUER])) { + $errs[self::FIELD_ISSUER] = []; + } + $errs[self::FIELD_ISSUER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION_DOT_UDI_DEVICE_IDENTIFIER, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php index cbef5c326a..d9a026f575 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRDeviceMetricCalibration extends FHIRBackboneElement * Validation map for fields in type DeviceMetric.Calibration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCalibration Constructor @@ -337,12 +337,114 @@ public function setType(FHIRDeviceMetricCalibrationType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_STATE])) { + $v = $this->getState(); + foreach($validationRules[self::FIELD_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_DOT_CALIBRATION, self::FIELD_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATE])) { + $errs[self::FIELD_STATE] = []; + } + $errs[self::FIELD_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_DOT_CALIBRATION, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_DOT_CALIBRATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameter.php index 43af82d4d7..66dde93a4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -153,7 +153,7 @@ class FHIRDeviceRequestParameter extends FHIRBackboneElement * Validation map for fields in type DeviceRequest.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceRequestParameter Constructor @@ -409,12 +409,148 @@ public function setValueRange(FHIRRange $valueRange = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST_DOT_PARAMETER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST_DOT_PARAMETER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST_DOT_PARAMETER, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST_DOT_PARAMETER, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST_DOT_PARAMETER, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMedia.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMedia.php index 44bacb2364..6da577388e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMedia.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMedia.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRDiagnosticReportMedia extends FHIRBackboneElement * Validation map for fields in type DiagnosticReport.Media * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReportMedia Constructor @@ -260,12 +260,97 @@ public function setLink(FHIRReference $link = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLink())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_DOT_MEDIA, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_DOT_MEDIA, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php index 815e31c533..61d365140e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRDocumentManifestRelated extends FHIRBackboneElement * Validation map for fields in type DocumentManifest.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentManifestRelated Constructor @@ -235,12 +235,97 @@ public function setRef(FHIRReference $ref = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRef())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST_DOT_RELATED, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REF])) { + $v = $this->getRef(); + foreach($validationRules[self::FIELD_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST_DOT_RELATED, self::FIELD_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REF])) { + $errs[self::FIELD_REF] = []; + } + $errs[self::FIELD_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php index 758a86a119..d1a4673893 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRDocumentReferenceContent extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Content * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceContent Constructor @@ -235,12 +235,97 @@ public function setFormat(FHIRCoding $format = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFormat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORMAT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ATTACHMENT])) { + $v = $this->getAttachment(); + foreach($validationRules[self::FIELD_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTENT, self::FIELD_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTACHMENT])) { + $errs[self::FIELD_ATTACHMENT] = []; + } + $errs[self::FIELD_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORMAT])) { + $v = $this->getFormat(); + foreach($validationRules[self::FIELD_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTENT, self::FIELD_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAT])) { + $errs[self::FIELD_FORMAT] = []; + } + $errs[self::FIELD_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php index 62f453f3fb..b1da22585f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -185,7 +185,7 @@ class FHIRDocumentReferenceContext extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Context * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceContext Constructor @@ -621,12 +621,188 @@ public function setSourcePatientInfo(FHIRReference $sourcePatientInfo = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getEncounter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENCOUNTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFacilityType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPracticeSetting())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTICE_SETTING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSourcePatientInfo())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_PATIENT_INFO] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY_TYPE])) { + $v = $this->getFacilityType(); + foreach($validationRules[self::FIELD_FACILITY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_FACILITY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY_TYPE])) { + $errs[self::FIELD_FACILITY_TYPE] = []; + } + $errs[self::FIELD_FACILITY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRACTICE_SETTING])) { + $v = $this->getPracticeSetting(); + foreach($validationRules[self::FIELD_PRACTICE_SETTING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_PRACTICE_SETTING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRACTICE_SETTING])) { + $errs[self::FIELD_PRACTICE_SETTING] = []; + } + $errs[self::FIELD_PRACTICE_SETTING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_PATIENT_INFO])) { + $v = $this->getSourcePatientInfo(); + foreach($validationRules[self::FIELD_SOURCE_PATIENT_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_SOURCE_PATIENT_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_PATIENT_INFO])) { + $errs[self::FIELD_SOURCE_PATIENT_INFO] = []; + } + $errs[self::FIELD_SOURCE_PATIENT_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php index fdad90c8a9..5148a67bce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRDocumentReferenceRelatesTo extends FHIRBackboneElement * Validation map for fields in type DocumentReference.RelatesTo * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceRelatesTo Constructor @@ -243,12 +243,97 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATES_TO, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATES_TO, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage.php index 663c3443e0..6296bd6149 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -286,7 +286,7 @@ class FHIRDosage extends FHIRBackboneElement * Validation map for fields in type Dosage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDosage Constructor @@ -1061,12 +1061,305 @@ public function setTiming(FHIRTiming $timing = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdditionalInstruction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIONAL_INSTRUCTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDoseAndRate())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSE_AND_RATE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMaxDosePerAdministration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_ADMINISTRATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerLifetime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_LIFETIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatientInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT_INSTRUCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_INSTRUCTION])) { + $v = $this->getAdditionalInstruction(); + foreach($validationRules[self::FIELD_ADDITIONAL_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_ADDITIONAL_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_INSTRUCTION])) { + $errs[self::FIELD_ADDITIONAL_INSTRUCTION] = []; + } + $errs[self::FIELD_ADDITIONAL_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_AND_RATE])) { + $v = $this->getDoseAndRate(); + foreach($validationRules[self::FIELD_DOSE_AND_RATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_DOSE_AND_RATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_AND_RATE])) { + $errs[self::FIELD_DOSE_AND_RATE] = []; + } + $errs[self::FIELD_DOSE_AND_RATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_ADMINISTRATION])) { + $v = $this->getMaxDosePerAdministration(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_ADMINISTRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_MAX_DOSE_PER_ADMINISTRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_ADMINISTRATION])) { + $errs[self::FIELD_MAX_DOSE_PER_ADMINISTRATION] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_ADMINISTRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_LIFETIME])) { + $v = $this->getMaxDosePerLifetime(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_LIFETIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_MAX_DOSE_PER_LIFETIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_LIFETIME])) { + $errs[self::FIELD_MAX_DOSE_PER_LIFETIME] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_LIFETIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $v = $this->getMaxDosePerPeriod(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_MAX_DOSE_PER_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT_INSTRUCTION])) { + $v = $this->getPatientInstruction(); + foreach($validationRules[self::FIELD_PATIENT_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_PATIENT_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT_INSTRUCTION])) { + $errs[self::FIELD_PATIENT_INSTRUCTION] = []; + } + $errs[self::FIELD_PATIENT_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING])) { + $v = $this->getTiming(); + foreach($validationRules[self::FIELD_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING])) { + $errs[self::FIELD_TIMING] = []; + } + $errs[self::FIELD_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRate.php index 5c9cc43c2f..e53e5c4649 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRDosageDoseAndRate extends FHIRBackboneElement * Validation map for fields in type Dosage.DoseAndRate * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDosageDoseAndRate Constructor @@ -443,12 +443,165 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDoseQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOSE_QUANTITY])) { + $v = $this->getDoseQuantity(); + foreach($validationRules[self::FIELD_DOSE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE_DOT_DOSE_AND_RATE, self::FIELD_DOSE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_QUANTITY])) { + $errs[self::FIELD_DOSE_QUANTITY] = []; + } + $errs[self::FIELD_DOSE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_RANGE])) { + $v = $this->getDoseRange(); + foreach($validationRules[self::FIELD_DOSE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE_DOT_DOSE_AND_RATE, self::FIELD_DOSE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_RANGE])) { + $errs[self::FIELD_DOSE_RANGE] = []; + } + $errs[self::FIELD_DOSE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_QUANTITY])) { + $v = $this->getRateQuantity(); + foreach($validationRules[self::FIELD_RATE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE_DOT_DOSE_AND_RATE, self::FIELD_RATE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_QUANTITY])) { + $errs[self::FIELD_RATE_QUANTITY] = []; + } + $errs[self::FIELD_RATE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RANGE])) { + $v = $this->getRateRange(); + foreach($validationRules[self::FIELD_RATE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE_DOT_DOSE_AND_RATE, self::FIELD_RATE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RANGE])) { + $errs[self::FIELD_RATE_RANGE] = []; + } + $errs[self::FIELD_RATE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE_DOT_DOSE_AND_RATE, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE_DOT_DOSE_AND_RATE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertainty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertainty.php index 62ca632743..f5005d4303 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertainty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertainty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIREffectEvidenceSynthesisCertainty extends FHIRBackboneElement * Validation map for fields in type EffectEvidenceSynthesis.Certainty * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREffectEvidenceSynthesisCertainty Constructor @@ -395,12 +395,120 @@ public function setRating(array $rating = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCertaintySubcomponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CERTAINTY_SUBCOMPONENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRating())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RATING, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CERTAINTY_SUBCOMPONENT])) { + $v = $this->getCertaintySubcomponent(); + foreach($validationRules[self::FIELD_CERTAINTY_SUBCOMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_CERTAINTY, self::FIELD_CERTAINTY_SUBCOMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CERTAINTY_SUBCOMPONENT])) { + $errs[self::FIELD_CERTAINTY_SUBCOMPONENT] = []; + } + $errs[self::FIELD_CERTAINTY_SUBCOMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_CERTAINTY, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATING])) { + $v = $this->getRating(); + foreach($validationRules[self::FIELD_RATING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_CERTAINTY, self::FIELD_RATING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATING])) { + $errs[self::FIELD_RATING] = []; + } + $errs[self::FIELD_RATING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponent.php index 4194317e3b..2e0320bdb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIREffectEvidenceSynthesisCertaintySubcomponent extends FHIRBackboneEleme * Validation map for fields in type EffectEvidenceSynthesis.CertaintySubcomponent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREffectEvidenceSynthesisCertaintySubcomponent Constructor @@ -361,12 +361,118 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRating())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RATING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_CERTAINTY_SUBCOMPONENT, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATING])) { + $v = $this->getRating(); + foreach($validationRules[self::FIELD_RATING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_CERTAINTY_SUBCOMPONENT, self::FIELD_RATING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATING])) { + $errs[self::FIELD_RATING] = []; + } + $errs[self::FIELD_RATING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_CERTAINTY_SUBCOMPONENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimate.php index 4cf5e0aa87..9615aaea12 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -167,7 +167,7 @@ class FHIREffectEvidenceSynthesisEffectEstimate extends FHIRBackboneElement * Validation map for fields in type EffectEvidenceSynthesis.EffectEstimate * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREffectEvidenceSynthesisEffectEstimate Constructor @@ -523,12 +523,167 @@ public function setVariantState(FHIRCodeableConcept $variantState = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrecisionEstimate())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRECISION_ESTIMATE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitOfMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_OF_MEASURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariantState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIANT_STATE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_EFFECT_ESTIMATE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECISION_ESTIMATE])) { + $v = $this->getPrecisionEstimate(); + foreach($validationRules[self::FIELD_PRECISION_ESTIMATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_EFFECT_ESTIMATE, self::FIELD_PRECISION_ESTIMATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECISION_ESTIMATE])) { + $errs[self::FIELD_PRECISION_ESTIMATE] = []; + } + $errs[self::FIELD_PRECISION_ESTIMATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_EFFECT_ESTIMATE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_OF_MEASURE])) { + $v = $this->getUnitOfMeasure(); + foreach($validationRules[self::FIELD_UNIT_OF_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_EFFECT_ESTIMATE, self::FIELD_UNIT_OF_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_OF_MEASURE])) { + $errs[self::FIELD_UNIT_OF_MEASURE] = []; + } + $errs[self::FIELD_UNIT_OF_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_EFFECT_ESTIMATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIANT_STATE])) { + $v = $this->getVariantState(); + foreach($validationRules[self::FIELD_VARIANT_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_EFFECT_ESTIMATE, self::FIELD_VARIANT_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIANT_STATE])) { + $errs[self::FIELD_VARIANT_STATE] = []; + } + $errs[self::FIELD_VARIANT_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimate.php index babbd33ea2..32ea82ed14 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIREffectEvidenceSynthesisPrecisionEstimate extends FHIRBackboneElement * Validation map for fields in type EffectEvidenceSynthesis.PrecisionEstimate * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREffectEvidenceSynthesisPrecisionEstimate Constructor @@ -412,12 +412,131 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFrom())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FROM] = $fieldErrs; + } + } + if (null !== ($v = $this->getLevel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LEVEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getTo())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TO] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FROM])) { + $v = $this->getFrom(); + foreach($validationRules[self::FIELD_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_PRECISION_ESTIMATE, self::FIELD_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FROM])) { + $errs[self::FIELD_FROM] = []; + } + $errs[self::FIELD_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEVEL])) { + $v = $this->getLevel(); + foreach($validationRules[self::FIELD_LEVEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_PRECISION_ESTIMATE, self::FIELD_LEVEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEVEL])) { + $errs[self::FIELD_LEVEL] = []; + } + $errs[self::FIELD_LEVEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TO])) { + $v = $this->getTo(); + foreach($validationRules[self::FIELD_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_PRECISION_ESTIMATE, self::FIELD_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TO])) { + $errs[self::FIELD_TO] = []; + } + $errs[self::FIELD_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_PRECISION_ESTIMATE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposure.php index f71bfa6bc4..21bcaa1291 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIREffectEvidenceSynthesisResultsByExposure extends FHIRBackboneElement * Validation map for fields in type EffectEvidenceSynthesis.ResultsByExposure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREffectEvidenceSynthesisResultsByExposure Constructor @@ -372,12 +372,131 @@ public function setVariantState(FHIRCodeableConcept $variantState = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExposureState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPOSURE_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRiskEvidenceSynthesis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RISK_EVIDENCE_SYNTHESIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariantState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIANT_STATE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_RESULTS_BY_EXPOSURE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE_STATE])) { + $v = $this->getExposureState(); + foreach($validationRules[self::FIELD_EXPOSURE_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_RESULTS_BY_EXPOSURE, self::FIELD_EXPOSURE_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE_STATE])) { + $errs[self::FIELD_EXPOSURE_STATE] = []; + } + $errs[self::FIELD_EXPOSURE_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RISK_EVIDENCE_SYNTHESIS])) { + $v = $this->getRiskEvidenceSynthesis(); + foreach($validationRules[self::FIELD_RISK_EVIDENCE_SYNTHESIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_RESULTS_BY_EXPOSURE, self::FIELD_RISK_EVIDENCE_SYNTHESIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RISK_EVIDENCE_SYNTHESIS])) { + $errs[self::FIELD_RISK_EVIDENCE_SYNTHESIS] = []; + } + $errs[self::FIELD_RISK_EVIDENCE_SYNTHESIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIANT_STATE])) { + $v = $this->getVariantState(); + foreach($validationRules[self::FIELD_VARIANT_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_RESULTS_BY_EXPOSURE, self::FIELD_VARIANT_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIANT_STATE])) { + $errs[self::FIELD_VARIANT_STATE] = []; + } + $errs[self::FIELD_VARIANT_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSize.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSize.php index d366490f68..60e31839bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSize.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSize.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIREffectEvidenceSynthesisSampleSize extends FHIRBackboneElement * Validation map for fields in type EffectEvidenceSynthesis.SampleSize * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREffectEvidenceSynthesisSampleSize Constructor @@ -351,12 +351,114 @@ public function setNumberOfStudies($numberOfStudies = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfParticipants())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_PARTICIPANTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfStudies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_STUDIES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_SAMPLE_SIZE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_PARTICIPANTS])) { + $v = $this->getNumberOfParticipants(); + foreach($validationRules[self::FIELD_NUMBER_OF_PARTICIPANTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_SAMPLE_SIZE, self::FIELD_NUMBER_OF_PARTICIPANTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_PARTICIPANTS])) { + $errs[self::FIELD_NUMBER_OF_PARTICIPANTS] = []; + } + $errs[self::FIELD_NUMBER_OF_PARTICIPANTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_STUDIES])) { + $v = $this->getNumberOfStudies(); + foreach($validationRules[self::FIELD_NUMBER_OF_STUDIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS_DOT_SAMPLE_SIZE, self::FIELD_NUMBER_OF_STUDIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_STUDIES])) { + $errs[self::FIELD_NUMBER_OF_STUDIES] = []; + } + $errs[self::FIELD_NUMBER_OF_STUDIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition.php index 30bd45fb68..f212389d96 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -3780,7 +3780,7 @@ class FHIRElementDefinition extends FHIRBackboneElement * Validation map for fields in type ElementDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinition Constructor @@ -16033,12 +16033,3428 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAlias())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALIAS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBinding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getConstraint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONSTRAINT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueContactDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueContributor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueParameterDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRelatedArtifact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTriggerDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUsageContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_UUID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExample())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXAMPLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFixedAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedContactDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CONTACT_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedContributor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CONTRIBUTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedParameterDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_PARAMETER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedRelatedArtifact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_RELATED_ARTIFACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedTriggerDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_TRIGGER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedUsageContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_USAGE_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_UUID] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsModifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_MODIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsModifierReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_MODIFIER_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsSummary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_SUMMARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMapping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_LENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeaningWhenMissing())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEANING_WHEN_MISSING] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMustSupport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MUST_SUPPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderMeaning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDER_MEANING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternContactDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CONTACT_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternContributor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CONTRIBUTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternParameterDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_PARAMETER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternRelatedArtifact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_RELATED_ARTIFACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternTriggerDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_TRIGGER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternUsageContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_USAGE_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_UUID] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRepresentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPRESENTATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getShort())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SHORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSliceIsConstraining())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLICE_IS_CONSTRAINING] = $fieldErrs; + } + } + if (null !== ($v = $this->getSliceName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLICE_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getSlicing())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLICING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BINDING])) { + $v = $this->getBinding(); + foreach($validationRules[self::FIELD_BINDING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_BINDING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING])) { + $errs[self::FIELD_BINDING] = []; + } + $errs[self::FIELD_BINDING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONSTRAINT])) { + $v = $this->getConstraint(); + foreach($validationRules[self::FIELD_CONSTRAINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CONSTRAINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONSTRAINT])) { + $errs[self::FIELD_CONSTRAINT] = []; + } + $errs[self::FIELD_CONSTRAINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ADDRESS])) { + $v = $this->getDefaultValueAddress(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ADDRESS])) { + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_AGE])) { + $v = $this->getDefaultValueAge(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_AGE])) { + $errs[self::FIELD_DEFAULT_VALUE_AGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ANNOTATION])) { + $v = $this->getDefaultValueAnnotation(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ANNOTATION])) { + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ATTACHMENT])) { + $v = $this->getDefaultValueAttachment(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT])) { + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $v = $this->getDefaultValueBase64Binary(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $v = $this->getDefaultValueBoolean(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CANONICAL])) { + $v = $this->getDefaultValueCanonical(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CANONICAL])) { + $errs[self::FIELD_DEFAULT_VALUE_CANONICAL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODE])) { + $v = $this->getDefaultValueCode(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODE])) { + $errs[self::FIELD_DEFAULT_VALUE_CODE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getDefaultValueCodeableConcept(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODING])) { + $v = $this->getDefaultValueCoding(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODING])) { + $errs[self::FIELD_DEFAULT_VALUE_CODING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL])) { + $v = $this->getDefaultValueContactDetail(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL])) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])) { + $v = $this->getDefaultValueContactPoint(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR])) { + $v = $this->getDefaultValueContributor(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR])) { + $errs[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_COUNT])) { + $v = $this->getDefaultValueCount(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_COUNT])) { + $errs[self::FIELD_DEFAULT_VALUE_COUNT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT])) { + $v = $this->getDefaultValueDataRequirement(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT])) { + $errs[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATE])) { + $v = $this->getDefaultValueDate(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATE])) { + $errs[self::FIELD_DEFAULT_VALUE_DATE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $v = $this->getDefaultValueDateTime(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $v = $this->getDefaultValueDecimal(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DISTANCE])) { + $v = $this->getDefaultValueDistance(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DISTANCE])) { + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DOSAGE])) { + $v = $this->getDefaultValueDosage(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DOSAGE])) { + $errs[self::FIELD_DEFAULT_VALUE_DOSAGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DURATION])) { + $v = $this->getDefaultValueDuration(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DURATION])) { + $errs[self::FIELD_DEFAULT_VALUE_DURATION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_EXPRESSION])) { + $v = $this->getDefaultValueExpression(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_EXPRESSION])) { + $errs[self::FIELD_DEFAULT_VALUE_EXPRESSION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { + $v = $this->getDefaultValueHumanName(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ID])) { + $v = $this->getDefaultValueId(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ID])) { + $errs[self::FIELD_DEFAULT_VALUE_ID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { + $v = $this->getDefaultValueIdentifier(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $v = $this->getDefaultValueInstant(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $errs[self::FIELD_DEFAULT_VALUE_INSTANT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $v = $this->getDefaultValueInteger(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $errs[self::FIELD_DEFAULT_VALUE_INTEGER] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $v = $this->getDefaultValueMarkdown(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_META])) { + $v = $this->getDefaultValueMeta(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_META])) { + $errs[self::FIELD_DEFAULT_VALUE_META] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_MONEY])) { + $v = $this->getDefaultValueMoney(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_MONEY])) { + $errs[self::FIELD_DEFAULT_VALUE_MONEY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_OID])) { + $v = $this->getDefaultValueOid(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_OID])) { + $errs[self::FIELD_DEFAULT_VALUE_OID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION])) { + $v = $this->getDefaultValueParameterDefinition(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION])) { + $errs[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_PERIOD])) { + $v = $this->getDefaultValuePeriod(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_PERIOD])) { + $errs[self::FIELD_DEFAULT_VALUE_PERIOD] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $v = $this->getDefaultValuePositiveInt(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_QUANTITY])) { + $v = $this->getDefaultValueQuantity(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_QUANTITY])) { + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RANGE])) { + $v = $this->getDefaultValueRange(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RANGE])) { + $errs[self::FIELD_DEFAULT_VALUE_RANGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RATIO])) { + $v = $this->getDefaultValueRatio(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RATIO])) { + $errs[self::FIELD_DEFAULT_VALUE_RATIO] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_REFERENCE])) { + $v = $this->getDefaultValueReference(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_REFERENCE])) { + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT])) { + $v = $this->getDefaultValueRelatedArtifact(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT])) { + $errs[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA])) { + $v = $this->getDefaultValueSampledData(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_SIGNATURE])) { + $v = $this->getDefaultValueSignature(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_SIGNATURE])) { + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_STRING])) { + $v = $this->getDefaultValueString(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_STRING])) { + $errs[self::FIELD_DEFAULT_VALUE_STRING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TIME])) { + $v = $this->getDefaultValueTime(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TIME])) { + $errs[self::FIELD_DEFAULT_VALUE_TIME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TIMING])) { + $v = $this->getDefaultValueTiming(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TIMING])) { + $errs[self::FIELD_DEFAULT_VALUE_TIMING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION])) { + $v = $this->getDefaultValueTriggerDefinition(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION])) { + $errs[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $v = $this->getDefaultValueUnsignedInt(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_URI])) { + $v = $this->getDefaultValueUri(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_URI])) { + $errs[self::FIELD_DEFAULT_VALUE_URI] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_URL])) { + $v = $this->getDefaultValueUrl(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_URL])) { + $errs[self::FIELD_DEFAULT_VALUE_URL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT])) { + $v = $this->getDefaultValueUsageContext(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT])) { + $errs[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_UUID])) { + $v = $this->getDefaultValueUuid(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_UUID])) { + $errs[self::FIELD_DEFAULT_VALUE_UUID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE])) { + $v = $this->getExample(); + foreach($validationRules[self::FIELD_EXAMPLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE])) { + $errs[self::FIELD_EXAMPLE] = []; + } + $errs[self::FIELD_EXAMPLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ADDRESS])) { + $v = $this->getFixedAddress(); + foreach($validationRules[self::FIELD_FIXED_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ADDRESS])) { + $errs[self::FIELD_FIXED_ADDRESS] = []; + } + $errs[self::FIELD_FIXED_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_AGE])) { + $v = $this->getFixedAge(); + foreach($validationRules[self::FIELD_FIXED_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_AGE])) { + $errs[self::FIELD_FIXED_AGE] = []; + } + $errs[self::FIELD_FIXED_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ANNOTATION])) { + $v = $this->getFixedAnnotation(); + foreach($validationRules[self::FIELD_FIXED_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ANNOTATION])) { + $errs[self::FIELD_FIXED_ANNOTATION] = []; + } + $errs[self::FIELD_FIXED_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ATTACHMENT])) { + $v = $this->getFixedAttachment(); + foreach($validationRules[self::FIELD_FIXED_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ATTACHMENT])) { + $errs[self::FIELD_FIXED_ATTACHMENT] = []; + } + $errs[self::FIELD_FIXED_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_BASE_64BINARY])) { + $v = $this->getFixedBase64Binary(); + foreach($validationRules[self::FIELD_FIXED_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_BASE_64BINARY])) { + $errs[self::FIELD_FIXED_BASE_64BINARY] = []; + } + $errs[self::FIELD_FIXED_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_BOOLEAN])) { + $v = $this->getFixedBoolean(); + foreach($validationRules[self::FIELD_FIXED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_BOOLEAN])) { + $errs[self::FIELD_FIXED_BOOLEAN] = []; + } + $errs[self::FIELD_FIXED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CANONICAL])) { + $v = $this->getFixedCanonical(); + foreach($validationRules[self::FIELD_FIXED_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CANONICAL])) { + $errs[self::FIELD_FIXED_CANONICAL] = []; + } + $errs[self::FIELD_FIXED_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CODE])) { + $v = $this->getFixedCode(); + foreach($validationRules[self::FIELD_FIXED_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CODE])) { + $errs[self::FIELD_FIXED_CODE] = []; + } + $errs[self::FIELD_FIXED_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CODEABLE_CONCEPT])) { + $v = $this->getFixedCodeableConcept(); + foreach($validationRules[self::FIELD_FIXED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_FIXED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_FIXED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CODING])) { + $v = $this->getFixedCoding(); + foreach($validationRules[self::FIELD_FIXED_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CODING])) { + $errs[self::FIELD_FIXED_CODING] = []; + } + $errs[self::FIELD_FIXED_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CONTACT_DETAIL])) { + $v = $this->getFixedContactDetail(); + foreach($validationRules[self::FIELD_FIXED_CONTACT_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CONTACT_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CONTACT_DETAIL])) { + $errs[self::FIELD_FIXED_CONTACT_DETAIL] = []; + } + $errs[self::FIELD_FIXED_CONTACT_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CONTACT_POINT])) { + $v = $this->getFixedContactPoint(); + foreach($validationRules[self::FIELD_FIXED_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CONTACT_POINT])) { + $errs[self::FIELD_FIXED_CONTACT_POINT] = []; + } + $errs[self::FIELD_FIXED_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CONTRIBUTOR])) { + $v = $this->getFixedContributor(); + foreach($validationRules[self::FIELD_FIXED_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CONTRIBUTOR])) { + $errs[self::FIELD_FIXED_CONTRIBUTOR] = []; + } + $errs[self::FIELD_FIXED_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_COUNT])) { + $v = $this->getFixedCount(); + foreach($validationRules[self::FIELD_FIXED_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_COUNT])) { + $errs[self::FIELD_FIXED_COUNT] = []; + } + $errs[self::FIELD_FIXED_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DATA_REQUIREMENT])) { + $v = $this->getFixedDataRequirement(); + foreach($validationRules[self::FIELD_FIXED_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DATA_REQUIREMENT])) { + $errs[self::FIELD_FIXED_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_FIXED_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DATE])) { + $v = $this->getFixedDate(); + foreach($validationRules[self::FIELD_FIXED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DATE])) { + $errs[self::FIELD_FIXED_DATE] = []; + } + $errs[self::FIELD_FIXED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DATE_TIME])) { + $v = $this->getFixedDateTime(); + foreach($validationRules[self::FIELD_FIXED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DATE_TIME])) { + $errs[self::FIELD_FIXED_DATE_TIME] = []; + } + $errs[self::FIELD_FIXED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DECIMAL])) { + $v = $this->getFixedDecimal(); + foreach($validationRules[self::FIELD_FIXED_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DECIMAL])) { + $errs[self::FIELD_FIXED_DECIMAL] = []; + } + $errs[self::FIELD_FIXED_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DISTANCE])) { + $v = $this->getFixedDistance(); + foreach($validationRules[self::FIELD_FIXED_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DISTANCE])) { + $errs[self::FIELD_FIXED_DISTANCE] = []; + } + $errs[self::FIELD_FIXED_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DOSAGE])) { + $v = $this->getFixedDosage(); + foreach($validationRules[self::FIELD_FIXED_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DOSAGE])) { + $errs[self::FIELD_FIXED_DOSAGE] = []; + } + $errs[self::FIELD_FIXED_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DURATION])) { + $v = $this->getFixedDuration(); + foreach($validationRules[self::FIELD_FIXED_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DURATION])) { + $errs[self::FIELD_FIXED_DURATION] = []; + } + $errs[self::FIELD_FIXED_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_EXPRESSION])) { + $v = $this->getFixedExpression(); + foreach($validationRules[self::FIELD_FIXED_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_EXPRESSION])) { + $errs[self::FIELD_FIXED_EXPRESSION] = []; + } + $errs[self::FIELD_FIXED_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_HUMAN_NAME])) { + $v = $this->getFixedHumanName(); + foreach($validationRules[self::FIELD_FIXED_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_HUMAN_NAME])) { + $errs[self::FIELD_FIXED_HUMAN_NAME] = []; + } + $errs[self::FIELD_FIXED_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ID])) { + $v = $this->getFixedId(); + foreach($validationRules[self::FIELD_FIXED_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ID])) { + $errs[self::FIELD_FIXED_ID] = []; + } + $errs[self::FIELD_FIXED_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_IDENTIFIER])) { + $v = $this->getFixedIdentifier(); + foreach($validationRules[self::FIELD_FIXED_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_IDENTIFIER])) { + $errs[self::FIELD_FIXED_IDENTIFIER] = []; + } + $errs[self::FIELD_FIXED_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_INSTANT])) { + $v = $this->getFixedInstant(); + foreach($validationRules[self::FIELD_FIXED_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_INSTANT])) { + $errs[self::FIELD_FIXED_INSTANT] = []; + } + $errs[self::FIELD_FIXED_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_INTEGER])) { + $v = $this->getFixedInteger(); + foreach($validationRules[self::FIELD_FIXED_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_INTEGER])) { + $errs[self::FIELD_FIXED_INTEGER] = []; + } + $errs[self::FIELD_FIXED_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_MARKDOWN])) { + $v = $this->getFixedMarkdown(); + foreach($validationRules[self::FIELD_FIXED_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_MARKDOWN])) { + $errs[self::FIELD_FIXED_MARKDOWN] = []; + } + $errs[self::FIELD_FIXED_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_META])) { + $v = $this->getFixedMeta(); + foreach($validationRules[self::FIELD_FIXED_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_META])) { + $errs[self::FIELD_FIXED_META] = []; + } + $errs[self::FIELD_FIXED_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_MONEY])) { + $v = $this->getFixedMoney(); + foreach($validationRules[self::FIELD_FIXED_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_MONEY])) { + $errs[self::FIELD_FIXED_MONEY] = []; + } + $errs[self::FIELD_FIXED_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_OID])) { + $v = $this->getFixedOid(); + foreach($validationRules[self::FIELD_FIXED_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_OID])) { + $errs[self::FIELD_FIXED_OID] = []; + } + $errs[self::FIELD_FIXED_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_PARAMETER_DEFINITION])) { + $v = $this->getFixedParameterDefinition(); + foreach($validationRules[self::FIELD_FIXED_PARAMETER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_PARAMETER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_PARAMETER_DEFINITION])) { + $errs[self::FIELD_FIXED_PARAMETER_DEFINITION] = []; + } + $errs[self::FIELD_FIXED_PARAMETER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_PERIOD])) { + $v = $this->getFixedPeriod(); + foreach($validationRules[self::FIELD_FIXED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_PERIOD])) { + $errs[self::FIELD_FIXED_PERIOD] = []; + } + $errs[self::FIELD_FIXED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_POSITIVE_INT])) { + $v = $this->getFixedPositiveInt(); + foreach($validationRules[self::FIELD_FIXED_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_POSITIVE_INT])) { + $errs[self::FIELD_FIXED_POSITIVE_INT] = []; + } + $errs[self::FIELD_FIXED_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_QUANTITY])) { + $v = $this->getFixedQuantity(); + foreach($validationRules[self::FIELD_FIXED_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_QUANTITY])) { + $errs[self::FIELD_FIXED_QUANTITY] = []; + } + $errs[self::FIELD_FIXED_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_RANGE])) { + $v = $this->getFixedRange(); + foreach($validationRules[self::FIELD_FIXED_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_RANGE])) { + $errs[self::FIELD_FIXED_RANGE] = []; + } + $errs[self::FIELD_FIXED_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_RATIO])) { + $v = $this->getFixedRatio(); + foreach($validationRules[self::FIELD_FIXED_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_RATIO])) { + $errs[self::FIELD_FIXED_RATIO] = []; + } + $errs[self::FIELD_FIXED_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_REFERENCE])) { + $v = $this->getFixedReference(); + foreach($validationRules[self::FIELD_FIXED_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_REFERENCE])) { + $errs[self::FIELD_FIXED_REFERENCE] = []; + } + $errs[self::FIELD_FIXED_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_RELATED_ARTIFACT])) { + $v = $this->getFixedRelatedArtifact(); + foreach($validationRules[self::FIELD_FIXED_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_RELATED_ARTIFACT])) { + $errs[self::FIELD_FIXED_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_FIXED_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_SAMPLED_DATA])) { + $v = $this->getFixedSampledData(); + foreach($validationRules[self::FIELD_FIXED_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_SAMPLED_DATA])) { + $errs[self::FIELD_FIXED_SAMPLED_DATA] = []; + } + $errs[self::FIELD_FIXED_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_SIGNATURE])) { + $v = $this->getFixedSignature(); + foreach($validationRules[self::FIELD_FIXED_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_SIGNATURE])) { + $errs[self::FIELD_FIXED_SIGNATURE] = []; + } + $errs[self::FIELD_FIXED_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_STRING])) { + $v = $this->getFixedString(); + foreach($validationRules[self::FIELD_FIXED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_STRING])) { + $errs[self::FIELD_FIXED_STRING] = []; + } + $errs[self::FIELD_FIXED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_TIME])) { + $v = $this->getFixedTime(); + foreach($validationRules[self::FIELD_FIXED_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_TIME])) { + $errs[self::FIELD_FIXED_TIME] = []; + } + $errs[self::FIELD_FIXED_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_TIMING])) { + $v = $this->getFixedTiming(); + foreach($validationRules[self::FIELD_FIXED_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_TIMING])) { + $errs[self::FIELD_FIXED_TIMING] = []; + } + $errs[self::FIELD_FIXED_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_TRIGGER_DEFINITION])) { + $v = $this->getFixedTriggerDefinition(); + foreach($validationRules[self::FIELD_FIXED_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_TRIGGER_DEFINITION])) { + $errs[self::FIELD_FIXED_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_FIXED_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_UNSIGNED_INT])) { + $v = $this->getFixedUnsignedInt(); + foreach($validationRules[self::FIELD_FIXED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_UNSIGNED_INT])) { + $errs[self::FIELD_FIXED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_FIXED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_URI])) { + $v = $this->getFixedUri(); + foreach($validationRules[self::FIELD_FIXED_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_URI])) { + $errs[self::FIELD_FIXED_URI] = []; + } + $errs[self::FIELD_FIXED_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_URL])) { + $v = $this->getFixedUrl(); + foreach($validationRules[self::FIELD_FIXED_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_URL])) { + $errs[self::FIELD_FIXED_URL] = []; + } + $errs[self::FIELD_FIXED_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_USAGE_CONTEXT])) { + $v = $this->getFixedUsageContext(); + foreach($validationRules[self::FIELD_FIXED_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_USAGE_CONTEXT])) { + $errs[self::FIELD_FIXED_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_FIXED_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_UUID])) { + $v = $this->getFixedUuid(); + foreach($validationRules[self::FIELD_FIXED_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_UUID])) { + $errs[self::FIELD_FIXED_UUID] = []; + } + $errs[self::FIELD_FIXED_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_MODIFIER])) { + $v = $this->getIsModifier(); + foreach($validationRules[self::FIELD_IS_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_IS_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_MODIFIER])) { + $errs[self::FIELD_IS_MODIFIER] = []; + } + $errs[self::FIELD_IS_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_MODIFIER_REASON])) { + $v = $this->getIsModifierReason(); + foreach($validationRules[self::FIELD_IS_MODIFIER_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_IS_MODIFIER_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_MODIFIER_REASON])) { + $errs[self::FIELD_IS_MODIFIER_REASON] = []; + } + $errs[self::FIELD_IS_MODIFIER_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_SUMMARY])) { + $v = $this->getIsSummary(); + foreach($validationRules[self::FIELD_IS_SUMMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_IS_SUMMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_SUMMARY])) { + $errs[self::FIELD_IS_SUMMARY] = []; + } + $errs[self::FIELD_IS_SUMMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAPPING])) { + $v = $this->getMapping(); + foreach($validationRules[self::FIELD_MAPPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAPPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAPPING])) { + $errs[self::FIELD_MAPPING] = []; + } + $errs[self::FIELD_MAPPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_LENGTH])) { + $v = $this->getMaxLength(); + foreach($validationRules[self::FIELD_MAX_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_LENGTH])) { + $errs[self::FIELD_MAX_LENGTH] = []; + } + $errs[self::FIELD_MAX_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_DATE])) { + $v = $this->getMaxValueDate(); + foreach($validationRules[self::FIELD_MAX_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_DATE])) { + $errs[self::FIELD_MAX_VALUE_DATE] = []; + } + $errs[self::FIELD_MAX_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_DATE_TIME])) { + $v = $this->getMaxValueDateTime(); + foreach($validationRules[self::FIELD_MAX_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_DATE_TIME])) { + $errs[self::FIELD_MAX_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_MAX_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_DECIMAL])) { + $v = $this->getMaxValueDecimal(); + foreach($validationRules[self::FIELD_MAX_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_DECIMAL])) { + $errs[self::FIELD_MAX_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_MAX_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_INSTANT])) { + $v = $this->getMaxValueInstant(); + foreach($validationRules[self::FIELD_MAX_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_INSTANT])) { + $errs[self::FIELD_MAX_VALUE_INSTANT] = []; + } + $errs[self::FIELD_MAX_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_INTEGER])) { + $v = $this->getMaxValueInteger(); + foreach($validationRules[self::FIELD_MAX_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_INTEGER])) { + $errs[self::FIELD_MAX_VALUE_INTEGER] = []; + } + $errs[self::FIELD_MAX_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_POSITIVE_INT])) { + $v = $this->getMaxValuePositiveInt(); + foreach($validationRules[self::FIELD_MAX_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_MAX_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_MAX_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_QUANTITY])) { + $v = $this->getMaxValueQuantity(); + foreach($validationRules[self::FIELD_MAX_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_QUANTITY])) { + $errs[self::FIELD_MAX_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_MAX_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_TIME])) { + $v = $this->getMaxValueTime(); + foreach($validationRules[self::FIELD_MAX_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_TIME])) { + $errs[self::FIELD_MAX_VALUE_TIME] = []; + } + $errs[self::FIELD_MAX_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { + $v = $this->getMaxValueUnsignedInt(); + foreach($validationRules[self::FIELD_MAX_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_MAX_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_MAX_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEANING_WHEN_MISSING])) { + $v = $this->getMeaningWhenMissing(); + foreach($validationRules[self::FIELD_MEANING_WHEN_MISSING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MEANING_WHEN_MISSING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEANING_WHEN_MISSING])) { + $errs[self::FIELD_MEANING_WHEN_MISSING] = []; + } + $errs[self::FIELD_MEANING_WHEN_MISSING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_DATE])) { + $v = $this->getMinValueDate(); + foreach($validationRules[self::FIELD_MIN_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_DATE])) { + $errs[self::FIELD_MIN_VALUE_DATE] = []; + } + $errs[self::FIELD_MIN_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_DATE_TIME])) { + $v = $this->getMinValueDateTime(); + foreach($validationRules[self::FIELD_MIN_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_DATE_TIME])) { + $errs[self::FIELD_MIN_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_MIN_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_DECIMAL])) { + $v = $this->getMinValueDecimal(); + foreach($validationRules[self::FIELD_MIN_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_DECIMAL])) { + $errs[self::FIELD_MIN_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_MIN_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_INSTANT])) { + $v = $this->getMinValueInstant(); + foreach($validationRules[self::FIELD_MIN_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_INSTANT])) { + $errs[self::FIELD_MIN_VALUE_INSTANT] = []; + } + $errs[self::FIELD_MIN_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_INTEGER])) { + $v = $this->getMinValueInteger(); + foreach($validationRules[self::FIELD_MIN_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_INTEGER])) { + $errs[self::FIELD_MIN_VALUE_INTEGER] = []; + } + $errs[self::FIELD_MIN_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_POSITIVE_INT])) { + $v = $this->getMinValuePositiveInt(); + foreach($validationRules[self::FIELD_MIN_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_MIN_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_MIN_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_QUANTITY])) { + $v = $this->getMinValueQuantity(); + foreach($validationRules[self::FIELD_MIN_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_QUANTITY])) { + $errs[self::FIELD_MIN_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_MIN_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_TIME])) { + $v = $this->getMinValueTime(); + foreach($validationRules[self::FIELD_MIN_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_TIME])) { + $errs[self::FIELD_MIN_VALUE_TIME] = []; + } + $errs[self::FIELD_MIN_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { + $v = $this->getMinValueUnsignedInt(); + foreach($validationRules[self::FIELD_MIN_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_MIN_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_MIN_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MUST_SUPPORT])) { + $v = $this->getMustSupport(); + foreach($validationRules[self::FIELD_MUST_SUPPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MUST_SUPPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MUST_SUPPORT])) { + $errs[self::FIELD_MUST_SUPPORT] = []; + } + $errs[self::FIELD_MUST_SUPPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDER_MEANING])) { + $v = $this->getOrderMeaning(); + foreach($validationRules[self::FIELD_ORDER_MEANING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_ORDER_MEANING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDER_MEANING])) { + $errs[self::FIELD_ORDER_MEANING] = []; + } + $errs[self::FIELD_ORDER_MEANING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ADDRESS])) { + $v = $this->getPatternAddress(); + foreach($validationRules[self::FIELD_PATTERN_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ADDRESS])) { + $errs[self::FIELD_PATTERN_ADDRESS] = []; + } + $errs[self::FIELD_PATTERN_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_AGE])) { + $v = $this->getPatternAge(); + foreach($validationRules[self::FIELD_PATTERN_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_AGE])) { + $errs[self::FIELD_PATTERN_AGE] = []; + } + $errs[self::FIELD_PATTERN_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ANNOTATION])) { + $v = $this->getPatternAnnotation(); + foreach($validationRules[self::FIELD_PATTERN_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ANNOTATION])) { + $errs[self::FIELD_PATTERN_ANNOTATION] = []; + } + $errs[self::FIELD_PATTERN_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ATTACHMENT])) { + $v = $this->getPatternAttachment(); + foreach($validationRules[self::FIELD_PATTERN_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ATTACHMENT])) { + $errs[self::FIELD_PATTERN_ATTACHMENT] = []; + } + $errs[self::FIELD_PATTERN_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_BASE_64BINARY])) { + $v = $this->getPatternBase64Binary(); + foreach($validationRules[self::FIELD_PATTERN_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_BASE_64BINARY])) { + $errs[self::FIELD_PATTERN_BASE_64BINARY] = []; + } + $errs[self::FIELD_PATTERN_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_BOOLEAN])) { + $v = $this->getPatternBoolean(); + foreach($validationRules[self::FIELD_PATTERN_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_BOOLEAN])) { + $errs[self::FIELD_PATTERN_BOOLEAN] = []; + } + $errs[self::FIELD_PATTERN_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CANONICAL])) { + $v = $this->getPatternCanonical(); + foreach($validationRules[self::FIELD_PATTERN_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CANONICAL])) { + $errs[self::FIELD_PATTERN_CANONICAL] = []; + } + $errs[self::FIELD_PATTERN_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CODE])) { + $v = $this->getPatternCode(); + foreach($validationRules[self::FIELD_PATTERN_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CODE])) { + $errs[self::FIELD_PATTERN_CODE] = []; + } + $errs[self::FIELD_PATTERN_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CODEABLE_CONCEPT])) { + $v = $this->getPatternCodeableConcept(); + foreach($validationRules[self::FIELD_PATTERN_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PATTERN_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PATTERN_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CODING])) { + $v = $this->getPatternCoding(); + foreach($validationRules[self::FIELD_PATTERN_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CODING])) { + $errs[self::FIELD_PATTERN_CODING] = []; + } + $errs[self::FIELD_PATTERN_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CONTACT_DETAIL])) { + $v = $this->getPatternContactDetail(); + foreach($validationRules[self::FIELD_PATTERN_CONTACT_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CONTACT_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CONTACT_DETAIL])) { + $errs[self::FIELD_PATTERN_CONTACT_DETAIL] = []; + } + $errs[self::FIELD_PATTERN_CONTACT_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CONTACT_POINT])) { + $v = $this->getPatternContactPoint(); + foreach($validationRules[self::FIELD_PATTERN_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CONTACT_POINT])) { + $errs[self::FIELD_PATTERN_CONTACT_POINT] = []; + } + $errs[self::FIELD_PATTERN_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CONTRIBUTOR])) { + $v = $this->getPatternContributor(); + foreach($validationRules[self::FIELD_PATTERN_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CONTRIBUTOR])) { + $errs[self::FIELD_PATTERN_CONTRIBUTOR] = []; + } + $errs[self::FIELD_PATTERN_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_COUNT])) { + $v = $this->getPatternCount(); + foreach($validationRules[self::FIELD_PATTERN_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_COUNT])) { + $errs[self::FIELD_PATTERN_COUNT] = []; + } + $errs[self::FIELD_PATTERN_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DATA_REQUIREMENT])) { + $v = $this->getPatternDataRequirement(); + foreach($validationRules[self::FIELD_PATTERN_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DATA_REQUIREMENT])) { + $errs[self::FIELD_PATTERN_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_PATTERN_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DATE])) { + $v = $this->getPatternDate(); + foreach($validationRules[self::FIELD_PATTERN_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DATE])) { + $errs[self::FIELD_PATTERN_DATE] = []; + } + $errs[self::FIELD_PATTERN_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DATE_TIME])) { + $v = $this->getPatternDateTime(); + foreach($validationRules[self::FIELD_PATTERN_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DATE_TIME])) { + $errs[self::FIELD_PATTERN_DATE_TIME] = []; + } + $errs[self::FIELD_PATTERN_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DECIMAL])) { + $v = $this->getPatternDecimal(); + foreach($validationRules[self::FIELD_PATTERN_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DECIMAL])) { + $errs[self::FIELD_PATTERN_DECIMAL] = []; + } + $errs[self::FIELD_PATTERN_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DISTANCE])) { + $v = $this->getPatternDistance(); + foreach($validationRules[self::FIELD_PATTERN_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DISTANCE])) { + $errs[self::FIELD_PATTERN_DISTANCE] = []; + } + $errs[self::FIELD_PATTERN_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DOSAGE])) { + $v = $this->getPatternDosage(); + foreach($validationRules[self::FIELD_PATTERN_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DOSAGE])) { + $errs[self::FIELD_PATTERN_DOSAGE] = []; + } + $errs[self::FIELD_PATTERN_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DURATION])) { + $v = $this->getPatternDuration(); + foreach($validationRules[self::FIELD_PATTERN_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DURATION])) { + $errs[self::FIELD_PATTERN_DURATION] = []; + } + $errs[self::FIELD_PATTERN_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_EXPRESSION])) { + $v = $this->getPatternExpression(); + foreach($validationRules[self::FIELD_PATTERN_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_EXPRESSION])) { + $errs[self::FIELD_PATTERN_EXPRESSION] = []; + } + $errs[self::FIELD_PATTERN_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_HUMAN_NAME])) { + $v = $this->getPatternHumanName(); + foreach($validationRules[self::FIELD_PATTERN_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_HUMAN_NAME])) { + $errs[self::FIELD_PATTERN_HUMAN_NAME] = []; + } + $errs[self::FIELD_PATTERN_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ID])) { + $v = $this->getPatternId(); + foreach($validationRules[self::FIELD_PATTERN_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ID])) { + $errs[self::FIELD_PATTERN_ID] = []; + } + $errs[self::FIELD_PATTERN_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_IDENTIFIER])) { + $v = $this->getPatternIdentifier(); + foreach($validationRules[self::FIELD_PATTERN_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_IDENTIFIER])) { + $errs[self::FIELD_PATTERN_IDENTIFIER] = []; + } + $errs[self::FIELD_PATTERN_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_INSTANT])) { + $v = $this->getPatternInstant(); + foreach($validationRules[self::FIELD_PATTERN_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_INSTANT])) { + $errs[self::FIELD_PATTERN_INSTANT] = []; + } + $errs[self::FIELD_PATTERN_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_INTEGER])) { + $v = $this->getPatternInteger(); + foreach($validationRules[self::FIELD_PATTERN_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_INTEGER])) { + $errs[self::FIELD_PATTERN_INTEGER] = []; + } + $errs[self::FIELD_PATTERN_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_MARKDOWN])) { + $v = $this->getPatternMarkdown(); + foreach($validationRules[self::FIELD_PATTERN_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_MARKDOWN])) { + $errs[self::FIELD_PATTERN_MARKDOWN] = []; + } + $errs[self::FIELD_PATTERN_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_META])) { + $v = $this->getPatternMeta(); + foreach($validationRules[self::FIELD_PATTERN_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_META])) { + $errs[self::FIELD_PATTERN_META] = []; + } + $errs[self::FIELD_PATTERN_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_MONEY])) { + $v = $this->getPatternMoney(); + foreach($validationRules[self::FIELD_PATTERN_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_MONEY])) { + $errs[self::FIELD_PATTERN_MONEY] = []; + } + $errs[self::FIELD_PATTERN_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_OID])) { + $v = $this->getPatternOid(); + foreach($validationRules[self::FIELD_PATTERN_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_OID])) { + $errs[self::FIELD_PATTERN_OID] = []; + } + $errs[self::FIELD_PATTERN_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_PARAMETER_DEFINITION])) { + $v = $this->getPatternParameterDefinition(); + foreach($validationRules[self::FIELD_PATTERN_PARAMETER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_PARAMETER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_PARAMETER_DEFINITION])) { + $errs[self::FIELD_PATTERN_PARAMETER_DEFINITION] = []; + } + $errs[self::FIELD_PATTERN_PARAMETER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_PERIOD])) { + $v = $this->getPatternPeriod(); + foreach($validationRules[self::FIELD_PATTERN_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_PERIOD])) { + $errs[self::FIELD_PATTERN_PERIOD] = []; + } + $errs[self::FIELD_PATTERN_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_POSITIVE_INT])) { + $v = $this->getPatternPositiveInt(); + foreach($validationRules[self::FIELD_PATTERN_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_POSITIVE_INT])) { + $errs[self::FIELD_PATTERN_POSITIVE_INT] = []; + } + $errs[self::FIELD_PATTERN_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_QUANTITY])) { + $v = $this->getPatternQuantity(); + foreach($validationRules[self::FIELD_PATTERN_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_QUANTITY])) { + $errs[self::FIELD_PATTERN_QUANTITY] = []; + } + $errs[self::FIELD_PATTERN_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_RANGE])) { + $v = $this->getPatternRange(); + foreach($validationRules[self::FIELD_PATTERN_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_RANGE])) { + $errs[self::FIELD_PATTERN_RANGE] = []; + } + $errs[self::FIELD_PATTERN_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_RATIO])) { + $v = $this->getPatternRatio(); + foreach($validationRules[self::FIELD_PATTERN_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_RATIO])) { + $errs[self::FIELD_PATTERN_RATIO] = []; + } + $errs[self::FIELD_PATTERN_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_REFERENCE])) { + $v = $this->getPatternReference(); + foreach($validationRules[self::FIELD_PATTERN_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_REFERENCE])) { + $errs[self::FIELD_PATTERN_REFERENCE] = []; + } + $errs[self::FIELD_PATTERN_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_RELATED_ARTIFACT])) { + $v = $this->getPatternRelatedArtifact(); + foreach($validationRules[self::FIELD_PATTERN_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_RELATED_ARTIFACT])) { + $errs[self::FIELD_PATTERN_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_PATTERN_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_SAMPLED_DATA])) { + $v = $this->getPatternSampledData(); + foreach($validationRules[self::FIELD_PATTERN_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_SAMPLED_DATA])) { + $errs[self::FIELD_PATTERN_SAMPLED_DATA] = []; + } + $errs[self::FIELD_PATTERN_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_SIGNATURE])) { + $v = $this->getPatternSignature(); + foreach($validationRules[self::FIELD_PATTERN_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_SIGNATURE])) { + $errs[self::FIELD_PATTERN_SIGNATURE] = []; + } + $errs[self::FIELD_PATTERN_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_STRING])) { + $v = $this->getPatternString(); + foreach($validationRules[self::FIELD_PATTERN_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_STRING])) { + $errs[self::FIELD_PATTERN_STRING] = []; + } + $errs[self::FIELD_PATTERN_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_TIME])) { + $v = $this->getPatternTime(); + foreach($validationRules[self::FIELD_PATTERN_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_TIME])) { + $errs[self::FIELD_PATTERN_TIME] = []; + } + $errs[self::FIELD_PATTERN_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_TIMING])) { + $v = $this->getPatternTiming(); + foreach($validationRules[self::FIELD_PATTERN_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_TIMING])) { + $errs[self::FIELD_PATTERN_TIMING] = []; + } + $errs[self::FIELD_PATTERN_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_TRIGGER_DEFINITION])) { + $v = $this->getPatternTriggerDefinition(); + foreach($validationRules[self::FIELD_PATTERN_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_TRIGGER_DEFINITION])) { + $errs[self::FIELD_PATTERN_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_PATTERN_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_UNSIGNED_INT])) { + $v = $this->getPatternUnsignedInt(); + foreach($validationRules[self::FIELD_PATTERN_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_UNSIGNED_INT])) { + $errs[self::FIELD_PATTERN_UNSIGNED_INT] = []; + } + $errs[self::FIELD_PATTERN_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_URI])) { + $v = $this->getPatternUri(); + foreach($validationRules[self::FIELD_PATTERN_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_URI])) { + $errs[self::FIELD_PATTERN_URI] = []; + } + $errs[self::FIELD_PATTERN_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_URL])) { + $v = $this->getPatternUrl(); + foreach($validationRules[self::FIELD_PATTERN_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_URL])) { + $errs[self::FIELD_PATTERN_URL] = []; + } + $errs[self::FIELD_PATTERN_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_USAGE_CONTEXT])) { + $v = $this->getPatternUsageContext(); + foreach($validationRules[self::FIELD_PATTERN_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_USAGE_CONTEXT])) { + $errs[self::FIELD_PATTERN_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_PATTERN_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_UUID])) { + $v = $this->getPatternUuid(); + foreach($validationRules[self::FIELD_PATTERN_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_UUID])) { + $errs[self::FIELD_PATTERN_UUID] = []; + } + $errs[self::FIELD_PATTERN_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPRESENTATION])) { + $v = $this->getRepresentation(); + foreach($validationRules[self::FIELD_REPRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_REPRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPRESENTATION])) { + $errs[self::FIELD_REPRESENTATION] = []; + } + $errs[self::FIELD_REPRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHORT])) { + $v = $this->getShort(); + foreach($validationRules[self::FIELD_SHORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_SHORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHORT])) { + $errs[self::FIELD_SHORT] = []; + } + $errs[self::FIELD_SHORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLICE_IS_CONSTRAINING])) { + $v = $this->getSliceIsConstraining(); + foreach($validationRules[self::FIELD_SLICE_IS_CONSTRAINING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_SLICE_IS_CONSTRAINING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLICE_IS_CONSTRAINING])) { + $errs[self::FIELD_SLICE_IS_CONSTRAINING] = []; + } + $errs[self::FIELD_SLICE_IS_CONSTRAINING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLICE_NAME])) { + $v = $this->getSliceName(); + foreach($validationRules[self::FIELD_SLICE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_SLICE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLICE_NAME])) { + $errs[self::FIELD_SLICE_NAME] = []; + } + $errs[self::FIELD_SLICE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLICING])) { + $v = $this->getSlicing(); + foreach($validationRules[self::FIELD_SLICING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_SLICING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLICING])) { + $errs[self::FIELD_SLICING] = []; + } + $errs[self::FIELD_SLICING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBase.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBase.php index 527f71aed2..e34adc1306 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRElementDefinitionBase extends FHIRBackboneElement * Validation map for fields in type ElementDefinition.Base * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionBase Constructor @@ -360,12 +360,114 @@ public function setPath($path = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BASE, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BASE, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BASE, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php index b225416c2a..ad65a0e0e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRElementDefinitionBinding extends FHIRBackboneElement * Validation map for fields in type ElementDefinition.Binding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionBinding Constructor @@ -350,12 +350,114 @@ public function setValueSet($valueSet = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStrength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET])) { + $v = $this->getValueSet(); + foreach($validationRules[self::FIELD_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET])) { + $errs[self::FIELD_VALUE_SET] = []; + } + $errs[self::FIELD_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php index dd5166bb04..9ac31f6776 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -190,7 +190,7 @@ class FHIRElementDefinitionConstraint extends FHIRBackboneElement * Validation map for fields in type ElementDefinition.Constraint * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionConstraint Constructor @@ -668,12 +668,182 @@ public function setXpath($xpath = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getHuman())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HUMAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getKey())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HUMAN])) { + $v = $this->getHuman(); + foreach($validationRules[self::FIELD_HUMAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_HUMAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HUMAN])) { + $errs[self::FIELD_HUMAN] = []; + } + $errs[self::FIELD_HUMAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KEY])) { + $v = $this->getKey(); + foreach($validationRules[self::FIELD_KEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_KEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KEY])) { + $errs[self::FIELD_KEY] = []; + } + $errs[self::FIELD_KEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH])) { + $v = $this->getXpath(); + foreach($validationRules[self::FIELD_XPATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_XPATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH])) { + $errs[self::FIELD_XPATH] = []; + } + $errs[self::FIELD_XPATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php index bb5256f4b1..d4b4a34322 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRElementDefinitionDiscriminator extends FHIRBackboneElement * Validation map for fields in type ElementDefinition.Discriminator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionDiscriminator Constructor @@ -272,12 +272,97 @@ public function setType(FHIRDiscriminatorType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_DISCRIMINATOR, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_DISCRIMINATOR, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExample.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExample.php index 1523552c82..2509f51ea6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExample.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExample.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -870,7 +870,7 @@ class FHIRElementDefinitionExample extends FHIRBackboneElement * Validation map for fields in type ElementDefinition.Example * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionExample Constructor @@ -3482,12 +3482,930 @@ public function setValueUuid($valueUuid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContributor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTRIBUTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueParameterDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRelatedArtifact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RELATED_ARTIFACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTriggerDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUsageContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_USAGE_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UUID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_AGE])) { + $v = $this->getValueAge(); + foreach($validationRules[self::FIELD_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_AGE])) { + $errs[self::FIELD_VALUE_AGE] = []; + } + $errs[self::FIELD_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CANONICAL])) { + $v = $this->getValueCanonical(); + foreach($validationRules[self::FIELD_VALUE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CANONICAL])) { + $errs[self::FIELD_VALUE_CANONICAL] = []; + } + $errs[self::FIELD_VALUE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_DETAIL])) { + $v = $this->getValueContactDetail(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CONTACT_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_DETAIL])) { + $errs[self::FIELD_VALUE_CONTACT_DETAIL] = []; + } + $errs[self::FIELD_VALUE_CONTACT_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTRIBUTOR])) { + $v = $this->getValueContributor(); + foreach($validationRules[self::FIELD_VALUE_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTRIBUTOR])) { + $errs[self::FIELD_VALUE_CONTRIBUTOR] = []; + } + $errs[self::FIELD_VALUE_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_COUNT])) { + $v = $this->getValueCount(); + foreach($validationRules[self::FIELD_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_COUNT])) { + $errs[self::FIELD_VALUE_COUNT] = []; + } + $errs[self::FIELD_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATA_REQUIREMENT])) { + $v = $this->getValueDataRequirement(); + foreach($validationRules[self::FIELD_VALUE_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATA_REQUIREMENT])) { + $errs[self::FIELD_VALUE_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_VALUE_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DISTANCE])) { + $v = $this->getValueDistance(); + foreach($validationRules[self::FIELD_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DISTANCE])) { + $errs[self::FIELD_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DOSAGE])) { + $v = $this->getValueDosage(); + foreach($validationRules[self::FIELD_VALUE_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DOSAGE])) { + $errs[self::FIELD_VALUE_DOSAGE] = []; + } + $errs[self::FIELD_VALUE_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_EXPRESSION])) { + $v = $this->getValueExpression(); + foreach($validationRules[self::FIELD_VALUE_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_EXPRESSION])) { + $errs[self::FIELD_VALUE_EXPRESSION] = []; + } + $errs[self::FIELD_VALUE_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PARAMETER_DEFINITION])) { + $v = $this->getValueParameterDefinition(); + foreach($validationRules[self::FIELD_VALUE_PARAMETER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_PARAMETER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PARAMETER_DEFINITION])) { + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RELATED_ARTIFACT])) { + $v = $this->getValueRelatedArtifact(); + foreach($validationRules[self::FIELD_VALUE_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RELATED_ARTIFACT])) { + $errs[self::FIELD_VALUE_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_VALUE_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TRIGGER_DEFINITION])) { + $v = $this->getValueTriggerDefinition(); + foreach($validationRules[self::FIELD_VALUE_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TRIGGER_DEFINITION])) { + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URL])) { + $v = $this->getValueUrl(); + foreach($validationRules[self::FIELD_VALUE_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URL])) { + $errs[self::FIELD_VALUE_URL] = []; + } + $errs[self::FIELD_VALUE_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_USAGE_CONTEXT])) { + $v = $this->getValueUsageContext(); + foreach($validationRules[self::FIELD_VALUE_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_USAGE_CONTEXT])) { + $errs[self::FIELD_VALUE_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_VALUE_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UUID])) { + $v = $this->getValueUuid(); + foreach($validationRules[self::FIELD_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UUID])) { + $errs[self::FIELD_VALUE_UUID] = []; + } + $errs[self::FIELD_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php index 463baa608a..51bfc80825 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRElementDefinitionMapping extends FHIRBackboneElement * Validation map for fields in type ElementDefinition.Mapping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionMapping Constructor @@ -438,12 +438,131 @@ public function setMap($map = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTITY])) { + $v = $this->getIdentity(); + foreach($validationRules[self::FIELD_IDENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_IDENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY])) { + $errs[self::FIELD_IDENTITY] = []; + } + $errs[self::FIELD_IDENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAP])) { + $v = $this->getMap(); + foreach($validationRules[self::FIELD_MAP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_MAP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAP])) { + $errs[self::FIELD_MAP] = []; + } + $errs[self::FIELD_MAP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php index 243d800ec8..69dfd24a20 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRElementDefinitionSlicing extends FHIRBackboneElement * Validation map for fields in type ElementDefinition.Slicing * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionSlicing Constructor @@ -452,12 +452,133 @@ public function setRules(FHIRSlicingRules $rules = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDiscriminator())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DISCRIMINATOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrdered())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED] = $fieldErrs; + } + } + if (null !== ($v = $this->getRules())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCRIMINATOR])) { + $v = $this->getDiscriminator(); + foreach($validationRules[self::FIELD_DISCRIMINATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_DISCRIMINATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCRIMINATOR])) { + $errs[self::FIELD_DISCRIMINATOR] = []; + } + $errs[self::FIELD_DISCRIMINATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED])) { + $v = $this->getOrdered(); + foreach($validationRules[self::FIELD_ORDERED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_ORDERED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED])) { + $errs[self::FIELD_ORDERED] = []; + } + $errs[self::FIELD_ORDERED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULES])) { + $v = $this->getRules(); + foreach($validationRules[self::FIELD_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULES])) { + $errs[self::FIELD_RULES] = []; + } + $errs[self::FIELD_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionType.php index ced43c6318..d387ed73dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -175,7 +175,7 @@ class FHIRElementDefinitionType extends FHIRBackboneElement * Validation map for fields in type ElementDefinition.Type * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionType Constructor @@ -684,12 +684,154 @@ public function setVersioning(FHIRReferenceVersionRules $versioning = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAggregation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGGREGATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTargetProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET_PROFILE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersioning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSIONING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGGREGATION])) { + $v = $this->getAggregation(); + foreach($validationRules[self::FIELD_AGGREGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_AGGREGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGGREGATION])) { + $errs[self::FIELD_AGGREGATION] = []; + } + $errs[self::FIELD_AGGREGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_PROFILE])) { + $v = $this->getTargetProfile(); + foreach($validationRules[self::FIELD_TARGET_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_TARGET_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_PROFILE])) { + $errs[self::FIELD_TARGET_PROFILE] = []; + } + $errs[self::FIELD_TARGET_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSIONING])) { + $v = $this->getVersioning(); + foreach($validationRules[self::FIELD_VERSIONING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_VERSIONING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSIONING])) { + $errs[self::FIELD_VERSIONING] = []; + } + $errs[self::FIELD_VERSIONING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php index 951f42a162..d805278993 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIREncounterClassHistory extends FHIRBackboneElement * Validation map for fields in type Encounter.ClassHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterClassHistory Constructor @@ -226,12 +226,97 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_CLASS_HISTORY, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_CLASS_HISTORY, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php index 0f0000a1db..122e8b6af8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIREncounterDiagnosis extends FHIRBackboneElement * Validation map for fields in type Encounter.Diagnosis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterDiagnosis Constructor @@ -316,12 +316,114 @@ public function setUse(FHIRCodeableConcept $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRank())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RANK] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_DIAGNOSIS, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RANK])) { + $v = $this->getRank(); + foreach($validationRules[self::FIELD_RANK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_DIAGNOSIS, self::FIELD_RANK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RANK])) { + $errs[self::FIELD_RANK] = []; + } + $errs[self::FIELD_RANK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_DIAGNOSIS, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php index 52a60dad2c..752a6f7912 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -204,7 +204,7 @@ class FHIREncounterHospitalization extends FHIRBackboneElement * Validation map for fields in type Encounter.Hospitalization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterHospitalization Constructor @@ -709,12 +709,222 @@ public function setSpecialCourtesy(array $specialCourtesy = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdmitSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADMIT_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDietPreference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIET_PREFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDischargeDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISCHARGE_DISPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreAdmissionIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReAdmission())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RE_ADMISSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecialArrangement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_ARRANGEMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialCourtesy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_COURTESY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADMIT_SOURCE])) { + $v = $this->getAdmitSource(); + foreach($validationRules[self::FIELD_ADMIT_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_ADMIT_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMIT_SOURCE])) { + $errs[self::FIELD_ADMIT_SOURCE] = []; + } + $errs[self::FIELD_ADMIT_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIET_PREFERENCE])) { + $v = $this->getDietPreference(); + foreach($validationRules[self::FIELD_DIET_PREFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DIET_PREFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIET_PREFERENCE])) { + $errs[self::FIELD_DIET_PREFERENCE] = []; + } + $errs[self::FIELD_DIET_PREFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCHARGE_DISPOSITION])) { + $v = $this->getDischargeDisposition(); + foreach($validationRules[self::FIELD_DISCHARGE_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DISCHARGE_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCHARGE_DISPOSITION])) { + $errs[self::FIELD_DISCHARGE_DISPOSITION] = []; + } + $errs[self::FIELD_DISCHARGE_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_ADMISSION_IDENTIFIER])) { + $v = $this->getPreAdmissionIdentifier(); + foreach($validationRules[self::FIELD_PRE_ADMISSION_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_PRE_ADMISSION_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_ADMISSION_IDENTIFIER])) { + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER] = []; + } + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RE_ADMISSION])) { + $v = $this->getReAdmission(); + foreach($validationRules[self::FIELD_RE_ADMISSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_RE_ADMISSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RE_ADMISSION])) { + $errs[self::FIELD_RE_ADMISSION] = []; + } + $errs[self::FIELD_RE_ADMISSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_ARRANGEMENT])) { + $v = $this->getSpecialArrangement(); + foreach($validationRules[self::FIELD_SPECIAL_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_SPECIAL_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_ARRANGEMENT])) { + $errs[self::FIELD_SPECIAL_ARRANGEMENT] = []; + } + $errs[self::FIELD_SPECIAL_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_COURTESY])) { + $v = $this->getSpecialCourtesy(); + foreach($validationRules[self::FIELD_SPECIAL_COURTESY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_SPECIAL_COURTESY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_COURTESY])) { + $errs[self::FIELD_SPECIAL_COURTESY] = []; + } + $errs[self::FIELD_SPECIAL_COURTESY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php index 8bc0d2c1d4..25d1079789 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIREncounterLocation extends FHIRBackboneElement * Validation map for fields in type Encounter.Location * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterLocation Constructor @@ -352,12 +352,131 @@ public function setStatus(FHIREncounterLocationStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPhysicalType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHYSICAL_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHYSICAL_TYPE])) { + $v = $this->getPhysicalType(); + foreach($validationRules[self::FIELD_PHYSICAL_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_PHYSICAL_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHYSICAL_TYPE])) { + $errs[self::FIELD_PHYSICAL_TYPE] = []; + } + $errs[self::FIELD_PHYSICAL_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php index ea23faf5e2..f2633181c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIREncounterParticipant extends FHIRBackboneElement * Validation map for fields in type Encounter.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterParticipant Constructor @@ -320,12 +320,116 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIndividual())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDIVIDUAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_INDIVIDUAL])) { + $v = $this->getIndividual(); + foreach($validationRules[self::FIELD_INDIVIDUAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_INDIVIDUAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDIVIDUAL])) { + $errs[self::FIELD_INDIVIDUAL] = []; + } + $errs[self::FIELD_INDIVIDUAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php index 76f2a80fed..46dc287a49 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIREncounterStatusHistory extends FHIRBackboneElement * Validation map for fields in type Encounter.StatusHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterStatusHistory Constructor @@ -240,12 +240,97 @@ public function setStatus(FHIREncounterStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_STATUS_HISTORY, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_STATUS_HISTORY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php index cd5bc4e65f..715279bcd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIREpisodeOfCareDiagnosis extends FHIRBackboneElement * Validation map for fields in type EpisodeOfCare.Diagnosis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCareDiagnosis Constructor @@ -311,12 +311,114 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRank())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RANK] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_DIAGNOSIS, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RANK])) { + $v = $this->getRank(); + foreach($validationRules[self::FIELD_RANK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_DIAGNOSIS, self::FIELD_RANK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RANK])) { + $errs[self::FIELD_RANK] = []; + } + $errs[self::FIELD_RANK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_DIAGNOSIS, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php index 1d23660d67..a30bc3525a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIREpisodeOfCareStatusHistory extends FHIRBackboneElement * Validation map for fields in type EpisodeOfCare.StatusHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCareStatusHistory Constructor @@ -241,12 +241,97 @@ public function setStatus(FHIREpisodeOfCareStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_STATUS_HISTORY, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_STATUS_HISTORY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristic.php index d4f6e85240..dd42fa199d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -322,7 +322,7 @@ class FHIREvidenceVariableCharacteristic extends FHIRBackboneElement * Validation map for fields in type EvidenceVariable.Characteristic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREvidenceVariableCharacteristic Constructor @@ -1147,12 +1147,320 @@ public function setUsageContext(array $usageContext = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinitionCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionTriggerDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_TRIGGER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExclude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroupMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_MEASURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectiveDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectiveTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimeFromStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME_FROM_START] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUsageContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USAGE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_CANONICAL])) { + $v = $this->getDefinitionCanonical(); + foreach($validationRules[self::FIELD_DEFINITION_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_DEFINITION_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_CANONICAL])) { + $errs[self::FIELD_DEFINITION_CANONICAL] = []; + } + $errs[self::FIELD_DEFINITION_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_CODEABLE_CONCEPT])) { + $v = $this->getDefinitionCodeableConcept(); + foreach($validationRules[self::FIELD_DEFINITION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_DEFINITION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DEFINITION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DEFINITION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_DATA_REQUIREMENT])) { + $v = $this->getDefinitionDataRequirement(); + foreach($validationRules[self::FIELD_DEFINITION_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_DEFINITION_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_DATA_REQUIREMENT])) { + $errs[self::FIELD_DEFINITION_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_DEFINITION_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_EXPRESSION])) { + $v = $this->getDefinitionExpression(); + foreach($validationRules[self::FIELD_DEFINITION_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_DEFINITION_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_EXPRESSION])) { + $errs[self::FIELD_DEFINITION_EXPRESSION] = []; + } + $errs[self::FIELD_DEFINITION_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_REFERENCE])) { + $v = $this->getDefinitionReference(); + foreach($validationRules[self::FIELD_DEFINITION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_DEFINITION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_REFERENCE])) { + $errs[self::FIELD_DEFINITION_REFERENCE] = []; + } + $errs[self::FIELD_DEFINITION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_TRIGGER_DEFINITION])) { + $v = $this->getDefinitionTriggerDefinition(); + foreach($validationRules[self::FIELD_DEFINITION_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_DEFINITION_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_TRIGGER_DEFINITION])) { + $errs[self::FIELD_DEFINITION_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_MEASURE])) { + $v = $this->getGroupMeasure(); + foreach($validationRules[self::FIELD_GROUP_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_GROUP_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_MEASURE])) { + $errs[self::FIELD_GROUP_MEASURE] = []; + } + $errs[self::FIELD_GROUP_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { + $v = $this->getParticipantEffectiveDateTime(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION])) { + $v = $this->getParticipantEffectiveDuration(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD])) { + $v = $this->getParticipantEffectivePeriod(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING])) { + $v = $this->getParticipantEffectiveTiming(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_FROM_START])) { + $v = $this->getTimeFromStart(); + foreach($validationRules[self::FIELD_TIME_FROM_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_TIME_FROM_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_FROM_START])) { + $errs[self::FIELD_TIME_FROM_START] = []; + } + $errs[self::FIELD_TIME_FROM_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE_CONTEXT])) { + $v = $this->getUsageContext(); + foreach($validationRules[self::FIELD_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_DOT_CHARACTERISTIC, self::FIELD_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE_CONTEXT])) { + $errs[self::FIELD_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActor.php index 8310ff7b3d..92b0f8cc48 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRExampleScenarioActor extends FHIRBackboneElement * Validation map for fields in type ExampleScenario.Actor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExampleScenarioActor Constructor @@ -425,12 +425,131 @@ public function setType(FHIRExampleScenarioActorType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActorId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR_ID])) { + $v = $this->getActorId(); + foreach($validationRules[self::FIELD_ACTOR_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_ACTOR, self::FIELD_ACTOR_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR_ID])) { + $errs[self::FIELD_ACTOR_ID] = []; + } + $errs[self::FIELD_ACTOR_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_ACTOR, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_ACTOR, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_ACTOR, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternative.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternative.php index ba4a6f95a3..c8e7ba6c68 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternative.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternative.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRExampleScenarioAlternative extends FHIRBackboneElement * Validation map for fields in type ExampleScenario.Alternative * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExampleScenarioAlternative Constructor @@ -371,12 +371,116 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStep())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STEP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_ALTERNATIVE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STEP])) { + $v = $this->getStep(); + foreach($validationRules[self::FIELD_STEP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_ALTERNATIVE, self::FIELD_STEP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STEP])) { + $errs[self::FIELD_STEP] = []; + } + $errs[self::FIELD_STEP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_ALTERNATIVE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstance.php index cb48df451c..442a53ff02 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRExampleScenarioContainedInstance extends FHIRBackboneElement * Validation map for fields in type ExampleScenario.ContainedInstance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExampleScenarioContainedInstance Constructor @@ -274,12 +274,97 @@ public function setVersionId($versionId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getResourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersionId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_RESOURCE_ID])) { + $v = $this->getResourceId(); + foreach($validationRules[self::FIELD_RESOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_CONTAINED_INSTANCE, self::FIELD_RESOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE_ID])) { + $errs[self::FIELD_RESOURCE_ID] = []; + } + $errs[self::FIELD_RESOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION_ID])) { + $v = $this->getVersionId(); + foreach($validationRules[self::FIELD_VERSION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_CONTAINED_INSTANCE, self::FIELD_VERSION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION_ID])) { + $errs[self::FIELD_VERSION_ID] = []; + } + $errs[self::FIELD_VERSION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstance.php index 59299ec6a0..b7efcc117b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -163,7 +163,7 @@ class FHIRExampleScenarioInstance extends FHIRBackboneElement * Validation map for fields in type ExampleScenario.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExampleScenarioInstance Constructor @@ -585,12 +585,169 @@ public function setVersion(array $version = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContainedInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINED_INSTANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getResourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getResourceType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVersion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VERSION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED_INSTANCE])) { + $v = $this->getContainedInstance(); + foreach($validationRules[self::FIELD_CONTAINED_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_INSTANCE, self::FIELD_CONTAINED_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED_INSTANCE])) { + $errs[self::FIELD_CONTAINED_INSTANCE] = []; + } + $errs[self::FIELD_CONTAINED_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_INSTANCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_INSTANCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE_ID])) { + $v = $this->getResourceId(); + foreach($validationRules[self::FIELD_RESOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_INSTANCE, self::FIELD_RESOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE_ID])) { + $errs[self::FIELD_RESOURCE_ID] = []; + } + $errs[self::FIELD_RESOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE_TYPE])) { + $v = $this->getResourceType(); + foreach($validationRules[self::FIELD_RESOURCE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_INSTANCE, self::FIELD_RESOURCE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE_TYPE])) { + $errs[self::FIELD_RESOURCE_TYPE] = []; + } + $errs[self::FIELD_RESOURCE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_INSTANCE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperation.php index 59193165d8..56fde89134 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -213,7 +213,7 @@ class FHIRExampleScenarioOperation extends FHIRBackboneElement * Validation map for fields in type ExampleScenario.Operation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExampleScenarioOperation Constructor @@ -812,12 +812,233 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitiator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitiatorActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIATOR_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReceiver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReceiverActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVER_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_OPERATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIATOR])) { + $v = $this->getInitiator(); + foreach($validationRules[self::FIELD_INITIATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_OPERATION, self::FIELD_INITIATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIATOR])) { + $errs[self::FIELD_INITIATOR] = []; + } + $errs[self::FIELD_INITIATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIATOR_ACTIVE])) { + $v = $this->getInitiatorActive(); + foreach($validationRules[self::FIELD_INITIATOR_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_OPERATION, self::FIELD_INITIATOR_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIATOR_ACTIVE])) { + $errs[self::FIELD_INITIATOR_ACTIVE] = []; + } + $errs[self::FIELD_INITIATOR_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_OPERATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_OPERATION, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_OPERATION, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER_ACTIVE])) { + $v = $this->getReceiverActive(); + foreach($validationRules[self::FIELD_RECEIVER_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_OPERATION, self::FIELD_RECEIVER_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER_ACTIVE])) { + $errs[self::FIELD_RECEIVER_ACTIVE] = []; + } + $errs[self::FIELD_RECEIVER_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_OPERATION, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_OPERATION, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_OPERATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcess.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcess.php index 13e891e5a1..867c5aa209 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcess.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcess.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -160,7 +160,7 @@ class FHIRExampleScenarioProcess extends FHIRBackboneElement * Validation map for fields in type ExampleScenario.Process * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExampleScenarioProcess Constructor @@ -537,12 +537,150 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPostConditions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POST_CONDITIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreConditions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRE_CONDITIONS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStep())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STEP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_PROCESS, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POST_CONDITIONS])) { + $v = $this->getPostConditions(); + foreach($validationRules[self::FIELD_POST_CONDITIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_PROCESS, self::FIELD_POST_CONDITIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POST_CONDITIONS])) { + $errs[self::FIELD_POST_CONDITIONS] = []; + } + $errs[self::FIELD_POST_CONDITIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_CONDITIONS])) { + $v = $this->getPreConditions(); + foreach($validationRules[self::FIELD_PRE_CONDITIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_PROCESS, self::FIELD_PRE_CONDITIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_CONDITIONS])) { + $errs[self::FIELD_PRE_CONDITIONS] = []; + } + $errs[self::FIELD_PRE_CONDITIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STEP])) { + $v = $this->getStep(); + foreach($validationRules[self::FIELD_STEP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_PROCESS, self::FIELD_STEP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STEP])) { + $errs[self::FIELD_STEP] = []; + } + $errs[self::FIELD_STEP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_PROCESS, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStep.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStep.php index e28832b52f..76c3a50901 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStep.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStep.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRExampleScenarioStep extends FHIRBackboneElement * Validation map for fields in type ExampleScenario.Step * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExampleScenarioStep Constructor @@ -400,12 +400,135 @@ public function setProcess(array $process = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAlternative())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALTERNATIVE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPause())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAUSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcess())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESS, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALTERNATIVE])) { + $v = $this->getAlternative(); + foreach($validationRules[self::FIELD_ALTERNATIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_STEP, self::FIELD_ALTERNATIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALTERNATIVE])) { + $errs[self::FIELD_ALTERNATIVE] = []; + } + $errs[self::FIELD_ALTERNATIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_STEP, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAUSE])) { + $v = $this->getPause(); + foreach($validationRules[self::FIELD_PAUSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_STEP, self::FIELD_PAUSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAUSE])) { + $errs[self::FIELD_PAUSE] = []; + } + $errs[self::FIELD_PAUSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESS])) { + $v = $this->getProcess(); + foreach($validationRules[self::FIELD_PROCESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_STEP, self::FIELD_PROCESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESS])) { + $errs[self::FIELD_PROCESS] = []; + } + $errs[self::FIELD_PROCESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersion.php index 24a6121e57..74b38b3d36 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRExampleScenarioVersion extends FHIRBackboneElement * Validation map for fields in type ExampleScenario.Version * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExampleScenarioVersion Constructor @@ -287,12 +287,97 @@ public function setVersionId($versionId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersionId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_VERSION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION_ID])) { + $v = $this->getVersionId(); + foreach($validationRules[self::FIELD_VERSION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_DOT_VERSION, self::FIELD_VERSION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION_ID])) { + $errs[self::FIELD_VERSION_ID] = []; + } + $errs[self::FIELD_VERSION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php index cc4bbe7c2f..5f4736bd98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -150,7 +150,7 @@ class FHIRExplanationOfBenefitAccident extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Accident * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitAccident Constructor @@ -385,12 +385,131 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ACCIDENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_ADDRESS])) { + $v = $this->getLocationAddress(); + foreach($validationRules[self::FIELD_LOCATION_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ACCIDENT, self::FIELD_LOCATION_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_ADDRESS])) { + $errs[self::FIELD_LOCATION_ADDRESS] = []; + } + $errs[self::FIELD_LOCATION_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ACCIDENT, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ACCIDENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php index 6d30ecbdb6..cc3a3cffba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -382,7 +382,7 @@ class FHIRExplanationOfBenefitAddItem extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.AddItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitAddItem Constructor @@ -1795,12 +1795,440 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetailSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItemSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocationAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProvider())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROVIDER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubDetailSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubSite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_SEQUENCE])) { + $v = $this->getDetailSequence(); + foreach($validationRules[self::FIELD_DETAIL_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_DETAIL_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_SEQUENCE])) { + $errs[self::FIELD_DETAIL_SEQUENCE] = []; + } + $errs[self::FIELD_DETAIL_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_SEQUENCE])) { + $v = $this->getItemSequence(); + foreach($validationRules[self::FIELD_ITEM_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_ITEM_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_SEQUENCE])) { + $errs[self::FIELD_ITEM_SEQUENCE] = []; + } + $errs[self::FIELD_ITEM_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_ADDRESS])) { + $v = $this->getLocationAddress(); + foreach($validationRules[self::FIELD_LOCATION_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_LOCATION_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_ADDRESS])) { + $errs[self::FIELD_LOCATION_ADDRESS] = []; + } + $errs[self::FIELD_LOCATION_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $v = $this->getLocationCodeableConcept(); + foreach($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_LOCATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_DATE])) { + $v = $this->getServicedDate(); + foreach($validationRules[self::FIELD_SERVICED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_SERVICED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_DATE])) { + $errs[self::FIELD_SERVICED_DATE] = []; + } + $errs[self::FIELD_SERVICED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_PERIOD])) { + $v = $this->getServicedPeriod(); + foreach($validationRules[self::FIELD_SERVICED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_SERVICED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_PERIOD])) { + $errs[self::FIELD_SERVICED_PERIOD] = []; + } + $errs[self::FIELD_SERVICED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL_SEQUENCE])) { + $v = $this->getSubDetailSequence(); + foreach($validationRules[self::FIELD_SUB_DETAIL_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_SUB_DETAIL_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL_SEQUENCE])) { + $errs[self::FIELD_SUB_DETAIL_SEQUENCE] = []; + } + $errs[self::FIELD_SUB_DETAIL_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_SITE])) { + $v = $this->getSubSite(); + foreach($validationRules[self::FIELD_SUB_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_SUB_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_SITE])) { + $errs[self::FIELD_SUB_SITE] = []; + } + $errs[self::FIELD_SUB_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php index e9e90b6ac5..821469a46b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRExplanationOfBenefitAdjudication extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Adjudication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitAdjudication Constructor @@ -378,12 +378,131 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADJUDICATION, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADJUDICATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADJUDICATION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADJUDICATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php index db8419ce53..0f62f47ddf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -195,7 +195,7 @@ class FHIRExplanationOfBenefitBenefitBalance extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.BenefitBalance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitBenefitBalance Constructor @@ -655,12 +655,201 @@ public function setUnit(FHIRCodeableConcept $unit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExcluded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFinancial())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FINANCIAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if (null !== ($v = $this->getTerm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TERM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDED])) { + $v = $this->getExcluded(); + foreach($validationRules[self::FIELD_EXCLUDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_EXCLUDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDED])) { + $errs[self::FIELD_EXCLUDED] = []; + } + $errs[self::FIELD_EXCLUDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FINANCIAL])) { + $v = $this->getFinancial(); + foreach($validationRules[self::FIELD_FINANCIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_FINANCIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FINANCIAL])) { + $errs[self::FIELD_FINANCIAL] = []; + } + $errs[self::FIELD_FINANCIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TERM])) { + $v = $this->getTerm(); + foreach($validationRules[self::FIELD_TERM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_TERM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TERM])) { + $errs[self::FIELD_TERM] = []; + } + $errs[self::FIELD_TERM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php index 553cb00a7e..a13177ca71 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRExplanationOfBenefitCareTeam extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.CareTeam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitCareTeam Constructor @@ -435,12 +435,148 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQualification())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUALIFICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_CARE_TEAM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFICATION])) { + $v = $this->getQualification(); + foreach($validationRules[self::FIELD_QUALIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_CARE_TEAM, self::FIELD_QUALIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFICATION])) { + $errs[self::FIELD_QUALIFICATION] = []; + } + $errs[self::FIELD_QUALIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_CARE_TEAM, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_CARE_TEAM, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_CARE_TEAM, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php index 58cdcc9ab7..12dce259cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -281,7 +281,7 @@ class FHIRExplanationOfBenefitDetail extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitDetail Constructor @@ -1178,12 +1178,313 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL])) { + $v = $this->getSubDetail(); + foreach($validationRules[self::FIELD_SUB_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_SUB_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL])) { + $errs[self::FIELD_SUB_DETAIL] = []; + } + $errs[self::FIELD_SUB_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php index b350fb4a9b..db057efd35 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -214,7 +214,7 @@ class FHIRExplanationOfBenefitDetail1 extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Detail1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitDetail1 Constructor @@ -817,12 +817,224 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL])) { + $v = $this->getSubDetail(); + foreach($validationRules[self::FIELD_SUB_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_SUB_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL])) { + $errs[self::FIELD_SUB_DETAIL] = []; + } + $errs[self::FIELD_SUB_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php index b808246e66..3a84632841 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -170,7 +170,7 @@ class FHIRExplanationOfBenefitDiagnosis extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Diagnosis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitDiagnosis Constructor @@ -511,12 +511,167 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiagnosisCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosisReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnAdmission())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_ADMISSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPackageCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PACKAGE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT])) { + $v = $this->getDiagnosisCodeableConcept(); + foreach($validationRules[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_REFERENCE])) { + $v = $this->getDiagnosisReference(); + foreach($validationRules[self::FIELD_DIAGNOSIS_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_REFERENCE])) { + $errs[self::FIELD_DIAGNOSIS_REFERENCE] = []; + } + $errs[self::FIELD_DIAGNOSIS_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_ADMISSION])) { + $v = $this->getOnAdmission(); + foreach($validationRules[self::FIELD_ON_ADMISSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_ON_ADMISSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_ADMISSION])) { + $errs[self::FIELD_ON_ADMISSION] = []; + } + $errs[self::FIELD_ON_ADMISSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE_CODE])) { + $v = $this->getPackageCode(); + foreach($validationRules[self::FIELD_PACKAGE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_PACKAGE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE_CODE])) { + $errs[self::FIELD_PACKAGE_CODE] = []; + } + $errs[self::FIELD_PACKAGE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php index 7997592b12..c75c44028e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRExplanationOfBenefitFinancial extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Financial * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitFinancial Constructor @@ -518,12 +518,165 @@ public function setUsedUnsignedInt($usedUnsignedInt = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllowedMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllowedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllowedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsedMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USED_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USED_UNSIGNED_INT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLOWED_MONEY])) { + $v = $this->getAllowedMoney(); + foreach($validationRules[self::FIELD_ALLOWED_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_ALLOWED_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_MONEY])) { + $errs[self::FIELD_ALLOWED_MONEY] = []; + } + $errs[self::FIELD_ALLOWED_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALLOWED_STRING])) { + $v = $this->getAllowedString(); + foreach($validationRules[self::FIELD_ALLOWED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_ALLOWED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_STRING])) { + $errs[self::FIELD_ALLOWED_STRING] = []; + } + $errs[self::FIELD_ALLOWED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $v = $this->getAllowedUnsignedInt(); + foreach($validationRules[self::FIELD_ALLOWED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_ALLOWED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $errs[self::FIELD_ALLOWED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_ALLOWED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_MONEY])) { + $v = $this->getUsedMoney(); + foreach($validationRules[self::FIELD_USED_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_USED_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_MONEY])) { + $errs[self::FIELD_USED_MONEY] = []; + } + $errs[self::FIELD_USED_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_UNSIGNED_INT])) { + $v = $this->getUsedUnsignedInt(); + foreach($validationRules[self::FIELD_USED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_USED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_UNSIGNED_INT])) { + $errs[self::FIELD_USED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_USED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php index f7b3cd6752..2385f6f0a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRExplanationOfBenefitInsurance extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Insurance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitInsurance Constructor @@ -382,12 +382,116 @@ public function setPreAuthRef(array $preAuthRef = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPreAuthRef())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRE_AUTH_REF, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INSURANCE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL])) { + $v = $this->getFocal(); + foreach($validationRules[self::FIELD_FOCAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INSURANCE, self::FIELD_FOCAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL])) { + $errs[self::FIELD_FOCAL] = []; + } + $errs[self::FIELD_FOCAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF])) { + $v = $this->getPreAuthRef(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INSURANCE, self::FIELD_PRE_AUTH_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF])) { + $errs[self::FIELD_PRE_AUTH_REF] = []; + } + $errs[self::FIELD_PRE_AUTH_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php index 7ba751de63..1ac1df4802 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -448,7 +448,7 @@ class FHIRExplanationOfBenefitItem extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitItem Constructor @@ -2181,12 +2181,529 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareTeamSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDiagnosisSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEncounter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENCOUNTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInformationSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INFORMATION_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocationAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProcedureSequence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE_SEQUENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubSite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_SITE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM_SEQUENCE])) { + $v = $this->getCareTeamSequence(); + foreach($validationRules[self::FIELD_CARE_TEAM_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_CARE_TEAM_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM_SEQUENCE])) { + $errs[self::FIELD_CARE_TEAM_SEQUENCE] = []; + } + $errs[self::FIELD_CARE_TEAM_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_SEQUENCE])) { + $v = $this->getDiagnosisSequence(); + foreach($validationRules[self::FIELD_DIAGNOSIS_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_DIAGNOSIS_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_SEQUENCE])) { + $errs[self::FIELD_DIAGNOSIS_SEQUENCE] = []; + } + $errs[self::FIELD_DIAGNOSIS_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORMATION_SEQUENCE])) { + $v = $this->getInformationSequence(); + foreach($validationRules[self::FIELD_INFORMATION_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_INFORMATION_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORMATION_SEQUENCE])) { + $errs[self::FIELD_INFORMATION_SEQUENCE] = []; + } + $errs[self::FIELD_INFORMATION_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_ADDRESS])) { + $v = $this->getLocationAddress(); + foreach($validationRules[self::FIELD_LOCATION_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_LOCATION_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_ADDRESS])) { + $errs[self::FIELD_LOCATION_ADDRESS] = []; + } + $errs[self::FIELD_LOCATION_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $v = $this->getLocationCodeableConcept(); + foreach($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_LOCATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_SEQUENCE])) { + $v = $this->getProcedureSequence(); + foreach($validationRules[self::FIELD_PROCEDURE_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_PROCEDURE_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_SEQUENCE])) { + $errs[self::FIELD_PROCEDURE_SEQUENCE] = []; + } + $errs[self::FIELD_PROCEDURE_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_DATE])) { + $v = $this->getServicedDate(); + foreach($validationRules[self::FIELD_SERVICED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_SERVICED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_DATE])) { + $errs[self::FIELD_SERVICED_DATE] = []; + } + $errs[self::FIELD_SERVICED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_PERIOD])) { + $v = $this->getServicedPeriod(); + foreach($validationRules[self::FIELD_SERVICED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_SERVICED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_PERIOD])) { + $errs[self::FIELD_SERVICED_PERIOD] = []; + } + $errs[self::FIELD_SERVICED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_SITE])) { + $v = $this->getSubSite(); + foreach($validationRules[self::FIELD_SUB_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_SUB_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_SITE])) { + $errs[self::FIELD_SUB_SITE] = []; + } + $errs[self::FIELD_SUB_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php index 4ada0d45d5..a795ad996d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRExplanationOfBenefitPayee extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Payee * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitPayee Constructor @@ -230,12 +230,97 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYEE, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYEE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php index 62b80be413..ac43590486 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRExplanationOfBenefitPayment extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Payment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitPayment Constructor @@ -465,12 +465,165 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdjustment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADJUSTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdjustmentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADJUSTMENT_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUSTMENT])) { + $v = $this->getAdjustment(); + foreach($validationRules[self::FIELD_ADJUSTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_ADJUSTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUSTMENT])) { + $errs[self::FIELD_ADJUSTMENT] = []; + } + $errs[self::FIELD_ADJUSTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADJUSTMENT_REASON])) { + $v = $this->getAdjustmentReason(); + foreach($validationRules[self::FIELD_ADJUSTMENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_ADJUSTMENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUSTMENT_REASON])) { + $errs[self::FIELD_ADJUSTMENT_REASON] = []; + } + $errs[self::FIELD_ADJUSTMENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php index ff15b55876..c7ec79dd0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRExplanationOfBenefitProcedure extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Procedure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitProcedure Constructor @@ -571,12 +571,169 @@ public function setUdi(array $udi = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedureCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedureReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCEDURE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { + $v = $this->getProcedureCodeableConcept(); + foreach($validationRules[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCEDURE, self::FIELD_PROCEDURE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_REFERENCE])) { + $v = $this->getProcedureReference(); + foreach($validationRules[self::FIELD_PROCEDURE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCEDURE, self::FIELD_PROCEDURE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_REFERENCE])) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = []; + } + $errs[self::FIELD_PROCEDURE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCEDURE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCEDURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCEDURE, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php index dbd8c46e29..3b38eaca75 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRExplanationOfBenefitProcessNote extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.ProcessNote * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitProcessNote Constructor @@ -391,12 +391,131 @@ public function setType(FHIRNoteType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCESS_NOTE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCESS_NOTE, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCESS_NOTE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCESS_NOTE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php index 8f43c88e47..b46156f35e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRExplanationOfBenefitRelated extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitRelated Constructor @@ -286,12 +286,114 @@ public function setRelationship(FHIRCodeableConcept $relationship = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClaim())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLAIM])) { + $v = $this->getClaim(); + foreach($validationRules[self::FIELD_CLAIM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_RELATED, self::FIELD_CLAIM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM])) { + $errs[self::FIELD_CLAIM] = []; + } + $errs[self::FIELD_CLAIM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_RELATED, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_RELATED, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php index b3edae9a2c..2a999db1ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -269,7 +269,7 @@ class FHIRExplanationOfBenefitSubDetail extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.SubDetail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitSubDetail Constructor @@ -1092,12 +1092,294 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1.php index 8f4602677b..4fdffc8b4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -202,7 +202,7 @@ class FHIRExplanationOfBenefitSubDetail1 extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.SubDetail1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitSubDetail1 Constructor @@ -731,12 +731,205 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductOrService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL_1, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL_1, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL_1, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL_1, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL_1, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_OR_SERVICE])) { + $v = $this->getProductOrService(); + foreach($validationRules[self::FIELD_PRODUCT_OR_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL_1, self::FIELD_PRODUCT_OR_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_OR_SERVICE])) { + $errs[self::FIELD_PRODUCT_OR_SERVICE] = []; + } + $errs[self::FIELD_PRODUCT_OR_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL_1, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL_1, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfo.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfo.php index fad9ac1706..5a0c018171 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfo.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -252,7 +252,7 @@ class FHIRExplanationOfBenefitSupportingInfo extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.SupportingInfo * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitSupportingInfo Constructor @@ -836,12 +836,250 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE])) { + $v = $this->getTimingDate(); + foreach($validationRules[self::FIELD_TIMING_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_TIMING_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE])) { + $errs[self::FIELD_TIMING_DATE] = []; + } + $errs[self::FIELD_TIMING_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUPPORTING_INFO, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotal.php index e552e406e8..d5f4a930d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRExplanationOfBenefitTotal extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Total * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitTotal Constructor @@ -242,12 +242,97 @@ public function setCategory(FHIRCodeableConcept $category = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_TOTAL, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_TOTAL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php index a76a3f410c..b3c25b5f7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -204,7 +204,7 @@ class FHIRFamilyMemberHistoryCondition extends FHIRBackboneElement * Validation map for fields in type FamilyMemberHistory.Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyMemberHistoryCondition Constructor @@ -655,12 +655,201 @@ public function setOutcome(FHIRCodeableConcept $outcome = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContributedToDeath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTRIBUTED_TO_DEATH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOnsetAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRIBUTED_TO_DEATH])) { + $v = $this->getContributedToDeath(); + foreach($validationRules[self::FIELD_CONTRIBUTED_TO_DEATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_CONTRIBUTED_TO_DEATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRIBUTED_TO_DEATH])) { + $errs[self::FIELD_CONTRIBUTED_TO_DEATH] = []; + } + $errs[self::FIELD_CONTRIBUTED_TO_DEATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_AGE])) { + $v = $this->getOnsetAge(); + foreach($validationRules[self::FIELD_ONSET_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_AGE])) { + $errs[self::FIELD_ONSET_AGE] = []; + } + $errs[self::FIELD_ONSET_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_PERIOD])) { + $v = $this->getOnsetPeriod(); + foreach($validationRules[self::FIELD_ONSET_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_PERIOD])) { + $errs[self::FIELD_ONSET_PERIOD] = []; + } + $errs[self::FIELD_ONSET_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_RANGE])) { + $v = $this->getOnsetRange(); + foreach($validationRules[self::FIELD_ONSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_RANGE])) { + $errs[self::FIELD_ONSET_RANGE] = []; + } + $errs[self::FIELD_ONSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_STRING])) { + $v = $this->getOnsetString(); + foreach($validationRules[self::FIELD_ONSET_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_STRING])) { + $errs[self::FIELD_ONSET_STRING] = []; + } + $errs[self::FIELD_ONSET_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php index b9a6a0e12a..b12ea2c60b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -262,7 +262,7 @@ class FHIRGoalTarget extends FHIRBackboneElement * Validation map for fields in type Goal.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGoalTarget Constructor @@ -855,12 +855,233 @@ public function setMeasure(FHIRCodeableConcept $measure = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetailBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAIL_BOOLEAN])) { + $v = $this->getDetailBoolean(); + foreach($validationRules[self::FIELD_DETAIL_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DETAIL_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_BOOLEAN])) { + $errs[self::FIELD_DETAIL_BOOLEAN] = []; + } + $errs[self::FIELD_DETAIL_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_CODEABLE_CONCEPT])) { + $v = $this->getDetailCodeableConcept(); + foreach($validationRules[self::FIELD_DETAIL_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DETAIL_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_INTEGER])) { + $v = $this->getDetailInteger(); + foreach($validationRules[self::FIELD_DETAIL_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DETAIL_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_INTEGER])) { + $errs[self::FIELD_DETAIL_INTEGER] = []; + } + $errs[self::FIELD_DETAIL_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_QUANTITY])) { + $v = $this->getDetailQuantity(); + foreach($validationRules[self::FIELD_DETAIL_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DETAIL_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_QUANTITY])) { + $errs[self::FIELD_DETAIL_QUANTITY] = []; + } + $errs[self::FIELD_DETAIL_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_RANGE])) { + $v = $this->getDetailRange(); + foreach($validationRules[self::FIELD_DETAIL_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DETAIL_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_RANGE])) { + $errs[self::FIELD_DETAIL_RANGE] = []; + } + $errs[self::FIELD_DETAIL_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_RATIO])) { + $v = $this->getDetailRatio(); + foreach($validationRules[self::FIELD_DETAIL_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DETAIL_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_RATIO])) { + $errs[self::FIELD_DETAIL_RATIO] = []; + } + $errs[self::FIELD_DETAIL_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_STRING])) { + $v = $this->getDetailString(); + foreach($validationRules[self::FIELD_DETAIL_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DETAIL_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_STRING])) { + $errs[self::FIELD_DETAIL_STRING] = []; + } + $errs[self::FIELD_DETAIL_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DUE_DATE])) { + $v = $this->getDueDate(); + foreach($validationRules[self::FIELD_DUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DUE_DATE])) { + $errs[self::FIELD_DUE_DATE] = []; + } + $errs[self::FIELD_DUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DUE_DURATION])) { + $v = $this->getDueDuration(); + foreach($validationRules[self::FIELD_DUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DUE_DURATION])) { + $errs[self::FIELD_DUE_DURATION] = []; + } + $errs[self::FIELD_DUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASURE])) { + $v = $this->getMeasure(); + foreach($validationRules[self::FIELD_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASURE])) { + $errs[self::FIELD_MEASURE] = []; + } + $errs[self::FIELD_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php index 3e045d0bba..e61bea5356 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -154,7 +154,7 @@ class FHIRGraphDefinitionCompartment extends FHIRBackboneElement * Validation map for fields in type GraphDefinition.Compartment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGraphDefinitionCompartment Constructor @@ -474,12 +474,148 @@ public function setUse(FHIRGraphCompartmentUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_COMPARTMENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_COMPARTMENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_COMPARTMENT, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_COMPARTMENT, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_COMPARTMENT, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php index 7106ba4a34..6b1a0d8ebe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -165,7 +165,7 @@ class FHIRGraphDefinitionLink extends FHIRBackboneElement * Validation map for fields in type GraphDefinition.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGraphDefinitionLink Constructor @@ -585,12 +585,167 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getSliceName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLICE_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLICE_NAME])) { + $v = $this->getSliceName(); + foreach($validationRules[self::FIELD_SLICE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_SLICE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLICE_NAME])) { + $errs[self::FIELD_SLICE_NAME] = []; + } + $errs[self::FIELD_SLICE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php index c2e8bab164..261382155a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -154,7 +154,7 @@ class FHIRGraphDefinitionTarget extends FHIRBackboneElement * Validation map for fields in type GraphDefinition.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGraphDefinitionTarget Constructor @@ -530,12 +530,152 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCompartment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPARTMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getParams())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARAMS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPARTMENT])) { + $v = $this->getCompartment(); + foreach($validationRules[self::FIELD_COMPARTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_TARGET, self::FIELD_COMPARTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARTMENT])) { + $errs[self::FIELD_COMPARTMENT] = []; + } + $errs[self::FIELD_COMPARTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_TARGET, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMS])) { + $v = $this->getParams(); + foreach($validationRules[self::FIELD_PARAMS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_TARGET, self::FIELD_PARAMS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMS])) { + $errs[self::FIELD_PARAMS] = []; + } + $errs[self::FIELD_PARAMS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_TARGET, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_TARGET, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php index 693e08f086..75d3c49b72 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -200,7 +200,7 @@ class FHIRGroupCharacteristic extends FHIRBackboneElement * Validation map for fields in type Group.Characteristic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupCharacteristic Constructor @@ -603,12 +603,199 @@ public function setValueReference(FHIRReference $valueReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExclude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php index 5530ff259c..5a97d1bb25 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRGroupMember extends FHIRBackboneElement * Validation map for fields in type Group.Member * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupMember Constructor @@ -306,12 +306,114 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEntity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getInactive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_MEMBER, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INACTIVE])) { + $v = $this->getInactive(); + foreach($validationRules[self::FIELD_INACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_MEMBER, self::FIELD_INACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INACTIVE])) { + $errs[self::FIELD_INACTIVE] = []; + } + $errs[self::FIELD_INACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_MEMBER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php index 63a8d5a7f8..cca4787136 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRHealthcareServiceAvailableTime extends FHIRBackboneElement * Validation map for fields in type HealthcareService.AvailableTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareServiceAvailableTime Constructor @@ -450,12 +450,133 @@ public function setDaysOfWeek(array $daysOfWeek = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllDay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALL_DAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailableEndTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABLE_END_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailableStartTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABLE_START_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDaysOfWeek())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DAYS_OF_WEEK, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALL_DAY])) { + $v = $this->getAllDay(); + foreach($validationRules[self::FIELD_ALL_DAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_ALL_DAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALL_DAY])) { + $errs[self::FIELD_ALL_DAY] = []; + } + $errs[self::FIELD_ALL_DAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_END_TIME])) { + $v = $this->getAvailableEndTime(); + foreach($validationRules[self::FIELD_AVAILABLE_END_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_AVAILABLE_END_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_END_TIME])) { + $errs[self::FIELD_AVAILABLE_END_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_END_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_START_TIME])) { + $v = $this->getAvailableStartTime(); + foreach($validationRules[self::FIELD_AVAILABLE_START_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_AVAILABLE_START_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_START_TIME])) { + $errs[self::FIELD_AVAILABLE_START_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_START_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAYS_OF_WEEK])) { + $v = $this->getDaysOfWeek(); + foreach($validationRules[self::FIELD_DAYS_OF_WEEK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_DAYS_OF_WEEK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAYS_OF_WEEK])) { + $errs[self::FIELD_DAYS_OF_WEEK] = []; + } + $errs[self::FIELD_DAYS_OF_WEEK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibility.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibility.php index defb629395..ad8d53b365 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibility.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibility.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRHealthcareServiceEligibility extends FHIRBackboneElement * Validation map for fields in type HealthcareService.Eligibility * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareServiceEligibility Constructor @@ -265,12 +265,97 @@ public function setComment($comment = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_ELIGIBILITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_ELIGIBILITY, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php index 2f3cd4e14e..e4f99b9962 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRHealthcareServiceNotAvailable extends FHIRBackboneElement * Validation map for fields in type HealthcareService.NotAvailable * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareServiceNotAvailable Constructor @@ -253,12 +253,97 @@ public function setDuring(FHIRPeriod $during = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuring())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_NOT_AVAILABLE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURING])) { + $v = $this->getDuring(); + foreach($validationRules[self::FIELD_DURING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_NOT_AVAILABLE, self::FIELD_DURING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURING])) { + $errs[self::FIELD_DURING] = []; + } + $errs[self::FIELD_DURING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php index 46ad46c78f..c97979f309 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRImagingStudyInstance extends FHIRBackboneElement * Validation map for fields in type ImagingStudy.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudyInstance Constructor @@ -413,12 +413,131 @@ public function setUid($uid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSopClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOP_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOP_CLASS])) { + $v = $this->getSopClass(); + foreach($validationRules[self::FIELD_SOP_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_SOP_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOP_CLASS])) { + $errs[self::FIELD_SOP_CLASS] = []; + } + $errs[self::FIELD_SOP_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformer.php index 38c0e557e0..73b9963f05 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRImagingStudyPerformer extends FHIRBackboneElement * Validation map for fields in type ImagingStudy.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudyPerformer Constructor @@ -232,12 +232,97 @@ public function setFunction(FHIRCodeableConcept $function = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getFunction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNCTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNCTION])) { + $v = $this->getFunction(); + foreach($validationRules[self::FIELD_FUNCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_PERFORMER, self::FIELD_FUNCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNCTION])) { + $errs[self::FIELD_FUNCTION] = []; + } + $errs[self::FIELD_FUNCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php index 662d9e134c..8de953ce35 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -265,7 +265,7 @@ class FHIRImagingStudySeries extends FHIRBackboneElement * Validation map for fields in type ImagingStudy.Series * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudySeries Constructor @@ -1069,12 +1069,275 @@ public function setUid($uid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLaterality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LATERALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getModality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfInstances())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStarted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STARTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LATERALITY])) { + $v = $this->getLaterality(); + foreach($validationRules[self::FIELD_LATERALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_LATERALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LATERALITY])) { + $errs[self::FIELD_LATERALITY] = []; + } + $errs[self::FIELD_LATERALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODALITY])) { + $v = $this->getModality(); + foreach($validationRules[self::FIELD_MODALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_MODALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODALITY])) { + $errs[self::FIELD_MODALITY] = []; + } + $errs[self::FIELD_MODALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_INSTANCES])) { + $v = $this->getNumberOfInstances(); + foreach($validationRules[self::FIELD_NUMBER_OF_INSTANCES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_NUMBER_OF_INSTANCES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_INSTANCES])) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = []; + } + $errs[self::FIELD_NUMBER_OF_INSTANCES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STARTED])) { + $v = $this->getStarted(); + foreach($validationRules[self::FIELD_STARTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_STARTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STARTED])) { + $errs[self::FIELD_STARTED] = []; + } + $errs[self::FIELD_STARTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducation.php index 5b16fe2037..57bfa04198 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRImmunizationEducation extends FHIRBackboneElement * Validation map for fields in type Immunization.Education * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationEducation Constructor @@ -446,12 +446,131 @@ public function setReference($reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPresentationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESENTATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublicationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLICATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENT_TYPE])) { + $v = $this->getDocumentType(); + foreach($validationRules[self::FIELD_DOCUMENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_EDUCATION, self::FIELD_DOCUMENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENT_TYPE])) { + $errs[self::FIELD_DOCUMENT_TYPE] = []; + } + $errs[self::FIELD_DOCUMENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESENTATION_DATE])) { + $v = $this->getPresentationDate(); + foreach($validationRules[self::FIELD_PRESENTATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_EDUCATION, self::FIELD_PRESENTATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESENTATION_DATE])) { + $errs[self::FIELD_PRESENTATION_DATE] = []; + } + $errs[self::FIELD_PRESENTATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLICATION_DATE])) { + $v = $this->getPublicationDate(); + foreach($validationRules[self::FIELD_PUBLICATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_EDUCATION, self::FIELD_PUBLICATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLICATION_DATE])) { + $errs[self::FIELD_PUBLICATION_DATE] = []; + } + $errs[self::FIELD_PUBLICATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_EDUCATION, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformer.php index c228ba2240..e15b16d5f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRImmunizationPerformer extends FHIRBackboneElement * Validation map for fields in type Immunization.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationPerformer Constructor @@ -232,12 +232,97 @@ public function setFunction(FHIRCodeableConcept $function = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getFunction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNCTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNCTION])) { + $v = $this->getFunction(); + foreach($validationRules[self::FIELD_FUNCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PERFORMER, self::FIELD_FUNCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNCTION])) { + $errs[self::FIELD_FUNCTION] = []; + } + $errs[self::FIELD_FUNCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolApplied.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolApplied.php index 86fe9b7d23..530f2492e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolApplied.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolApplied.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -183,7 +183,7 @@ class FHIRImmunizationProtocolApplied extends FHIRBackboneElement * Validation map for fields in type Immunization.ProtocolApplied * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationProtocolApplied Constructor @@ -651,12 +651,184 @@ public function setTargetDisease(array $targetDisease = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseNumberPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseNumberString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_NUMBER_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeriesDosesPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES_DOSES_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeriesDosesString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES_DOSES_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTargetDisease())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET_DISEASE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PROTOCOL_APPLIED, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { + $v = $this->getDoseNumberPositiveInt(); + foreach($validationRules[self::FIELD_DOSE_NUMBER_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PROTOCOL_APPLIED, self::FIELD_DOSE_NUMBER_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { + $errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT] = []; + } + $errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_NUMBER_STRING])) { + $v = $this->getDoseNumberString(); + foreach($validationRules[self::FIELD_DOSE_NUMBER_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PROTOCOL_APPLIED, self::FIELD_DOSE_NUMBER_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_NUMBER_STRING])) { + $errs[self::FIELD_DOSE_NUMBER_STRING] = []; + } + $errs[self::FIELD_DOSE_NUMBER_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PROTOCOL_APPLIED, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { + $v = $this->getSeriesDosesPositiveInt(); + foreach($validationRules[self::FIELD_SERIES_DOSES_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PROTOCOL_APPLIED, self::FIELD_SERIES_DOSES_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { + $errs[self::FIELD_SERIES_DOSES_POSITIVE_INT] = []; + } + $errs[self::FIELD_SERIES_DOSES_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES_DOSES_STRING])) { + $v = $this->getSeriesDosesString(); + foreach($validationRules[self::FIELD_SERIES_DOSES_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PROTOCOL_APPLIED, self::FIELD_SERIES_DOSES_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES_DOSES_STRING])) { + $errs[self::FIELD_SERIES_DOSES_STRING] = []; + } + $errs[self::FIELD_SERIES_DOSES_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_DISEASE])) { + $v = $this->getTargetDisease(); + foreach($validationRules[self::FIELD_TARGET_DISEASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PROTOCOL_APPLIED, self::FIELD_TARGET_DISEASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_DISEASE])) { + $errs[self::FIELD_TARGET_DISEASE] = []; + } + $errs[self::FIELD_TARGET_DISEASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php index cdd4ef7938..56d5843600 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRImmunizationReaction extends FHIRBackboneElement * Validation map for fields in type Immunization.Reaction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationReaction Constructor @@ -332,12 +332,114 @@ public function setReported($reported = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getReported())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTED])) { + $v = $this->getReported(); + foreach($validationRules[self::FIELD_REPORTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_REPORTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTED])) { + $errs[self::FIELD_REPORTED] = []; + } + $errs[self::FIELD_REPORTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php index da8a9e3732..12af721676 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRImmunizationRecommendationDateCriterion extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.DateCriterion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationDateCriterion Constructor @@ -266,12 +266,97 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_DATE_CRITERION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_DATE_CRITERION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php index 13b006f3b7..14e5ea41c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -277,7 +277,7 @@ class FHIRImmunizationRecommendationRecommendation extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.Recommendation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationRecommendation Constructor @@ -1235,12 +1235,313 @@ public function setVaccineCode(array $vaccineCode = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContraindicatedVaccineCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRAINDICATED_VACCINE_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDateCriterion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATE_CRITERION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseNumberPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseNumberString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_NUMBER_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getForecastReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FORECAST_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getForecastStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORECAST_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeriesDosesPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES_DOSES_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeriesDosesString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES_DOSES_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingImmunization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_IMMUNIZATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSupportingPatientInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_PATIENT_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTargetDisease())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_DISEASE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVaccineCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VACCINE_CODE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CONTRAINDICATED_VACCINE_CODE])) { + $v = $this->getContraindicatedVaccineCode(); + foreach($validationRules[self::FIELD_CONTRAINDICATED_VACCINE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_CONTRAINDICATED_VACCINE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRAINDICATED_VACCINE_CODE])) { + $errs[self::FIELD_CONTRAINDICATED_VACCINE_CODE] = []; + } + $errs[self::FIELD_CONTRAINDICATED_VACCINE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_CRITERION])) { + $v = $this->getDateCriterion(); + foreach($validationRules[self::FIELD_DATE_CRITERION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DATE_CRITERION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_CRITERION])) { + $errs[self::FIELD_DATE_CRITERION] = []; + } + $errs[self::FIELD_DATE_CRITERION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { + $v = $this->getDoseNumberPositiveInt(); + foreach($validationRules[self::FIELD_DOSE_NUMBER_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DOSE_NUMBER_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { + $errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT] = []; + } + $errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_NUMBER_STRING])) { + $v = $this->getDoseNumberString(); + foreach($validationRules[self::FIELD_DOSE_NUMBER_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DOSE_NUMBER_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_NUMBER_STRING])) { + $errs[self::FIELD_DOSE_NUMBER_STRING] = []; + } + $errs[self::FIELD_DOSE_NUMBER_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORECAST_REASON])) { + $v = $this->getForecastReason(); + foreach($validationRules[self::FIELD_FORECAST_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_FORECAST_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORECAST_REASON])) { + $errs[self::FIELD_FORECAST_REASON] = []; + } + $errs[self::FIELD_FORECAST_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORECAST_STATUS])) { + $v = $this->getForecastStatus(); + foreach($validationRules[self::FIELD_FORECAST_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_FORECAST_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORECAST_STATUS])) { + $errs[self::FIELD_FORECAST_STATUS] = []; + } + $errs[self::FIELD_FORECAST_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { + $v = $this->getSeriesDosesPositiveInt(); + foreach($validationRules[self::FIELD_SERIES_DOSES_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SERIES_DOSES_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { + $errs[self::FIELD_SERIES_DOSES_POSITIVE_INT] = []; + } + $errs[self::FIELD_SERIES_DOSES_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES_DOSES_STRING])) { + $v = $this->getSeriesDosesString(); + foreach($validationRules[self::FIELD_SERIES_DOSES_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SERIES_DOSES_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES_DOSES_STRING])) { + $errs[self::FIELD_SERIES_DOSES_STRING] = []; + } + $errs[self::FIELD_SERIES_DOSES_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_IMMUNIZATION])) { + $v = $this->getSupportingImmunization(); + foreach($validationRules[self::FIELD_SUPPORTING_IMMUNIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SUPPORTING_IMMUNIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_IMMUNIZATION])) { + $errs[self::FIELD_SUPPORTING_IMMUNIZATION] = []; + } + $errs[self::FIELD_SUPPORTING_IMMUNIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_PATIENT_INFORMATION])) { + $v = $this->getSupportingPatientInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_PATIENT_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SUPPORTING_PATIENT_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_DISEASE])) { + $v = $this->getTargetDisease(); + foreach($validationRules[self::FIELD_TARGET_DISEASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_TARGET_DISEASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_DISEASE])) { + $errs[self::FIELD_TARGET_DISEASE] = []; + } + $errs[self::FIELD_TARGET_DISEASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINE_CODE])) { + $v = $this->getVaccineCode(); + foreach($validationRules[self::FIELD_VACCINE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_VACCINE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINE_CODE])) { + $errs[self::FIELD_VACCINE_CODE] = []; + } + $errs[self::FIELD_VACCINE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinition.php index 8a037f1cda..47f1548f78 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -156,7 +156,7 @@ class FHIRImplementationGuideDefinition extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Definition * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RESOURCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -559,12 +559,156 @@ public function setTemplate(array $template = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getGrouping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTemplate())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEMPLATE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_GROUPING])) { + $v = $this->getGrouping(); + foreach($validationRules[self::FIELD_GROUPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEFINITION, self::FIELD_GROUPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUPING])) { + $errs[self::FIELD_GROUPING] = []; + } + $errs[self::FIELD_GROUPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAGE])) { + $v = $this->getPage(); + foreach($validationRules[self::FIELD_PAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEFINITION, self::FIELD_PAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAGE])) { + $errs[self::FIELD_PAGE] = []; + } + $errs[self::FIELD_PAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEFINITION, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEFINITION, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEMPLATE])) { + $v = $this->getTemplate(); + foreach($validationRules[self::FIELD_TEMPLATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEFINITION, self::FIELD_TEMPLATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEMPLATE])) { + $errs[self::FIELD_TEMPLATE] = []; + } + $errs[self::FIELD_TEMPLATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOn.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOn.php index 0e0a7cf55d..62f6a3115a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOn.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRImplementationGuideDependsOn extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.DependsOn * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideDependsOn Constructor @@ -368,12 +368,114 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPackageId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PACKAGE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PACKAGE_ID])) { + $v = $this->getPackageId(); + foreach($validationRules[self::FIELD_PACKAGE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEPENDS_ON, self::FIELD_PACKAGE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE_ID])) { + $errs[self::FIELD_PACKAGE_ID] = []; + } + $errs[self::FIELD_PACKAGE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEPENDS_ON, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEPENDS_ON, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php index 14c73967ff..1704626386 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRImplementationGuideGlobal extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Global * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideGlobal Constructor @@ -284,12 +284,97 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_GLOBAL, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_GLOBAL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGrouping.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGrouping.php index b1e29a0e6e..3ef7c6848b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGrouping.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGrouping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRImplementationGuideGrouping extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Grouping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideGrouping Constructor @@ -280,12 +280,97 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_GROUPING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_GROUPING, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifest.php index e1b445262c..0e96f57578 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -160,7 +160,7 @@ class FHIRImplementationGuideManifest extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Manifest * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RESOURCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -641,12 +641,156 @@ public function setResource(array $resource = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getImage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOther())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OTHER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRendering())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RENDERING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_IMAGE])) { + $v = $this->getImage(); + foreach($validationRules[self::FIELD_IMAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_MANIFEST, self::FIELD_IMAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGE])) { + $errs[self::FIELD_IMAGE] = []; + } + $errs[self::FIELD_IMAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OTHER])) { + $v = $this->getOther(); + foreach($validationRules[self::FIELD_OTHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_MANIFEST, self::FIELD_OTHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OTHER])) { + $errs[self::FIELD_OTHER] = []; + } + $errs[self::FIELD_OTHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAGE])) { + $v = $this->getPage(); + foreach($validationRules[self::FIELD_PAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_MANIFEST, self::FIELD_PAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAGE])) { + $errs[self::FIELD_PAGE] = []; + } + $errs[self::FIELD_PAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RENDERING])) { + $v = $this->getRendering(); + foreach($validationRules[self::FIELD_RENDERING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_MANIFEST, self::FIELD_RENDERING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RENDERING])) { + $errs[self::FIELD_RENDERING] = []; + } + $errs[self::FIELD_RENDERING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_MANIFEST, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php index d81bca8080..3bc2aa9445 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRImplementationGuidePage extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Page * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuidePage Constructor @@ -485,12 +485,150 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getGeneration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENERATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNameReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNameUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_GENERATION])) { + $v = $this->getGeneration(); + foreach($validationRules[self::FIELD_GENERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_GENERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENERATION])) { + $errs[self::FIELD_GENERATION] = []; + } + $errs[self::FIELD_GENERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME_REFERENCE])) { + $v = $this->getNameReference(); + foreach($validationRules[self::FIELD_NAME_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_NAME_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME_REFERENCE])) { + $errs[self::FIELD_NAME_REFERENCE] = []; + } + $errs[self::FIELD_NAME_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME_URL])) { + $v = $this->getNameUrl(); + foreach($validationRules[self::FIELD_NAME_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_NAME_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME_URL])) { + $errs[self::FIELD_NAME_URL] = []; + } + $errs[self::FIELD_NAME_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAGE])) { + $v = $this->getPage(); + foreach($validationRules[self::FIELD_PAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_PAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAGE])) { + $errs[self::FIELD_PAGE] = []; + } + $errs[self::FIELD_PAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1.php index 43aa0544ff..a5009c02e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRImplementationGuidePage1 extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Page1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuidePage1 Constructor @@ -392,12 +392,116 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAnchor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ANCHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ANCHOR])) { + $v = $this->getAnchor(); + foreach($validationRules[self::FIELD_ANCHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE_1, self::FIELD_ANCHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANCHOR])) { + $errs[self::FIELD_ANCHOR] = []; + } + $errs[self::FIELD_ANCHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE_1, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE_1, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameter.php index 370cfc08fa..7f686c7ede 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRImplementationGuideParameter extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideParameter Constructor @@ -273,12 +273,97 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PARAMETER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PARAMETER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php index 4a46bf1f94..cc5d5fc0e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -192,7 +192,7 @@ class FHIRImplementationGuideResource extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Resource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideResource Constructor @@ -687,12 +687,184 @@ public function setReference(FHIRReference $reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_CANONICAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFhirVersion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FHIR_VERSION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGroupingId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUPING_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_BOOLEAN])) { + $v = $this->getExampleBoolean(); + foreach($validationRules[self::FIELD_EXAMPLE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_EXAMPLE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_BOOLEAN])) { + $errs[self::FIELD_EXAMPLE_BOOLEAN] = []; + } + $errs[self::FIELD_EXAMPLE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_CANONICAL])) { + $v = $this->getExampleCanonical(); + foreach($validationRules[self::FIELD_EXAMPLE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_EXAMPLE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_CANONICAL])) { + $errs[self::FIELD_EXAMPLE_CANONICAL] = []; + } + $errs[self::FIELD_EXAMPLE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUPING_ID])) { + $v = $this->getGroupingId(); + foreach($validationRules[self::FIELD_GROUPING_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_GROUPING_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUPING_ID])) { + $errs[self::FIELD_GROUPING_ID] = []; + } + $errs[self::FIELD_GROUPING_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1.php index 0508b25097..1788e1a001 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRImplementationGuideResource1 extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Resource1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideResource1 Constructor @@ -415,12 +415,131 @@ public function setRelativePath($relativePath = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExampleBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelativePath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIVE_PATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_BOOLEAN])) { + $v = $this->getExampleBoolean(); + foreach($validationRules[self::FIELD_EXAMPLE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE_1, self::FIELD_EXAMPLE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_BOOLEAN])) { + $errs[self::FIELD_EXAMPLE_BOOLEAN] = []; + } + $errs[self::FIELD_EXAMPLE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_CANONICAL])) { + $v = $this->getExampleCanonical(); + foreach($validationRules[self::FIELD_EXAMPLE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE_1, self::FIELD_EXAMPLE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_CANONICAL])) { + $errs[self::FIELD_EXAMPLE_CANONICAL] = []; + } + $errs[self::FIELD_EXAMPLE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE_1, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIVE_PATH])) { + $v = $this->getRelativePath(); + foreach($validationRules[self::FIELD_RELATIVE_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE_1, self::FIELD_RELATIVE_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIVE_PATH])) { + $errs[self::FIELD_RELATIVE_PATH] = []; + } + $errs[self::FIELD_RELATIVE_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplate.php index 62c0c37d48..74024da007 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRImplementationGuideTemplate extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Template * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideTemplate Constructor @@ -355,12 +355,114 @@ public function setSource($source = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getScope())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCOPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_TEMPLATE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCOPE])) { + $v = $this->getScope(); + foreach($validationRules[self::FIELD_SCOPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_TEMPLATE, self::FIELD_SCOPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCOPE])) { + $errs[self::FIELD_SCOPE] = []; + } + $errs[self::FIELD_SCOPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_TEMPLATE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit.php index 0e9b0fe915..1a81056da8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRInsurancePlanBenefit extends FHIRBackboneElement * Validation map for fields in type InsurancePlan.Benefit * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInsurancePlanBenefit Constructor @@ -331,12 +331,116 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getLimit())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIMIT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LIMIT])) { + $v = $this->getLimit(); + foreach($validationRules[self::FIELD_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_BENEFIT, self::FIELD_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIMIT])) { + $errs[self::FIELD_LIMIT] = []; + } + $errs[self::FIELD_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENT])) { + $v = $this->getRequirement(); + foreach($validationRules[self::FIELD_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_BENEFIT, self::FIELD_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENT])) { + $errs[self::FIELD_REQUIREMENT] = []; + } + $errs[self::FIELD_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_BENEFIT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1.php index 0b4540e739..3c8c059fc4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRInsurancePlanBenefit1 extends FHIRBackboneElement * Validation map for fields in type InsurancePlan.Benefit1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInsurancePlanBenefit1 Constructor @@ -259,12 +259,99 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCost())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COST])) { + $v = $this->getCost(); + foreach($validationRules[self::FIELD_COST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_BENEFIT_1, self::FIELD_COST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COST])) { + $errs[self::FIELD_COST] = []; + } + $errs[self::FIELD_COST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_BENEFIT_1, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContact.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContact.php index 6691ce7ab1..27886a9115 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContact.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRInsurancePlanContact extends FHIRBackboneElement * Validation map for fields in type InsurancePlan.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInsurancePlanContact Constructor @@ -385,12 +385,133 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_CONTACT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_CONTACT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCost.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCost.php index 1ab3ed1e40..69a55b3c67 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCost.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCost.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRInsurancePlanCost extends FHIRBackboneElement * Validation map for fields in type InsurancePlan.Cost * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInsurancePlanCost Constructor @@ -386,12 +386,133 @@ public function setValue(FHIRQuantity $value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApplicability())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPLICABILITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getQualifiers())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUALIFIERS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPLICABILITY])) { + $v = $this->getApplicability(); + foreach($validationRules[self::FIELD_APPLICABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_COST, self::FIELD_APPLICABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLICABILITY])) { + $errs[self::FIELD_APPLICABILITY] = []; + } + $errs[self::FIELD_APPLICABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFIERS])) { + $v = $this->getQualifiers(); + foreach($validationRules[self::FIELD_QUALIFIERS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_COST, self::FIELD_QUALIFIERS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFIERS])) { + $errs[self::FIELD_QUALIFIERS] = []; + } + $errs[self::FIELD_QUALIFIERS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_COST, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_COST, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverage.php index 816f7c330a..0e6508ac6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRInsurancePlanCoverage extends FHIRBackboneElement * Validation map for fields in type InsurancePlan.Coverage * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_BENEFIT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -350,12 +350,118 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBenefit())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BENEFIT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNetwork())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NETWORK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BENEFIT])) { + $v = $this->getBenefit(); + foreach($validationRules[self::FIELD_BENEFIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_COVERAGE, self::FIELD_BENEFIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFIT])) { + $errs[self::FIELD_BENEFIT] = []; + } + $errs[self::FIELD_BENEFIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_COVERAGE, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_COVERAGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCost.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCost.php index ce80f2b51b..8d3922452b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCost.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCost.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRInsurancePlanGeneralCost extends FHIRBackboneElement * Validation map for fields in type InsurancePlan.GeneralCost * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInsurancePlanGeneralCost Constructor @@ -378,12 +378,131 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCost())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COST] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroupSize())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_SIZE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_GENERAL_COST, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COST])) { + $v = $this->getCost(); + foreach($validationRules[self::FIELD_COST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_GENERAL_COST, self::FIELD_COST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COST])) { + $errs[self::FIELD_COST] = []; + } + $errs[self::FIELD_COST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_SIZE])) { + $v = $this->getGroupSize(); + foreach($validationRules[self::FIELD_GROUP_SIZE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_GENERAL_COST, self::FIELD_GROUP_SIZE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_SIZE])) { + $errs[self::FIELD_GROUP_SIZE] = []; + } + $errs[self::FIELD_GROUP_SIZE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_GENERAL_COST, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimit.php index a90d1f95d1..1c5039612a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRInsurancePlanLimit extends FHIRBackboneElement * Validation map for fields in type InsurancePlan.Limit * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInsurancePlanLimit Constructor @@ -237,12 +237,97 @@ public function setValue(FHIRQuantity $value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_LIMIT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_LIMIT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlan.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlan.php index f8d2ba0496..38c07a5e68 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlan.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -158,7 +158,7 @@ class FHIRInsurancePlanPlan extends FHIRBackboneElement * Validation map for fields in type InsurancePlan.Plan * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInsurancePlanPlan Constructor @@ -602,12 +602,175 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCoverageArea())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COVERAGE_AREA, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGeneralCost())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GENERAL_COST, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNetwork())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NETWORK, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecificCost())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIFIC_COST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COVERAGE_AREA])) { + $v = $this->getCoverageArea(); + foreach($validationRules[self::FIELD_COVERAGE_AREA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_PLAN, self::FIELD_COVERAGE_AREA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE_AREA])) { + $errs[self::FIELD_COVERAGE_AREA] = []; + } + $errs[self::FIELD_COVERAGE_AREA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENERAL_COST])) { + $v = $this->getGeneralCost(); + foreach($validationRules[self::FIELD_GENERAL_COST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_PLAN, self::FIELD_GENERAL_COST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENERAL_COST])) { + $errs[self::FIELD_GENERAL_COST] = []; + } + $errs[self::FIELD_GENERAL_COST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_PLAN, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_PLAN, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIFIC_COST])) { + $v = $this->getSpecificCost(); + foreach($validationRules[self::FIELD_SPECIFIC_COST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_PLAN, self::FIELD_SPECIFIC_COST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIFIC_COST])) { + $errs[self::FIELD_SPECIFIC_COST] = []; + } + $errs[self::FIELD_SPECIFIC_COST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_PLAN, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCost.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCost.php index f662f0b9e4..78515486b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCost.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCost.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRInsurancePlanSpecificCost extends FHIRBackboneElement * Validation map for fields in type InsurancePlan.SpecificCost * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInsurancePlanSpecificCost Constructor @@ -259,12 +259,99 @@ public function setCategory(FHIRCodeableConcept $category = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBenefit())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BENEFIT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BENEFIT])) { + $v = $this->getBenefit(); + foreach($validationRules[self::FIELD_BENEFIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_SPECIFIC_COST, self::FIELD_BENEFIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFIT])) { + $errs[self::FIELD_BENEFIT] = []; + } + $errs[self::FIELD_BENEFIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN_DOT_SPECIFIC_COST, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItem.php index 366c23a165..d7008e75db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -148,7 +148,7 @@ class FHIRInvoiceLineItem extends FHIRBackboneElement * Validation map for fields in type Invoice.LineItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInvoiceLineItem Constructor @@ -424,12 +424,133 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getChargeItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHARGE_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getChargeItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHARGE_ITEM_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPriceComponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRICE_COMPONENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CHARGE_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getChargeItemCodeableConcept(); + foreach($validationRules[self::FIELD_CHARGE_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_DOT_LINE_ITEM, self::FIELD_CHARGE_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARGE_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_CHARGE_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_CHARGE_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARGE_ITEM_REFERENCE])) { + $v = $this->getChargeItemReference(); + foreach($validationRules[self::FIELD_CHARGE_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_DOT_LINE_ITEM, self::FIELD_CHARGE_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARGE_ITEM_REFERENCE])) { + $errs[self::FIELD_CHARGE_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_CHARGE_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRICE_COMPONENT])) { + $v = $this->getPriceComponent(); + foreach($validationRules[self::FIELD_PRICE_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_DOT_LINE_ITEM, self::FIELD_PRICE_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRICE_COMPONENT])) { + $errs[self::FIELD_PRICE_COMPONENT] = []; + } + $errs[self::FIELD_PRICE_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_DOT_LINE_ITEM, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipant.php index 1308e7e3e3..60998c04ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRInvoiceParticipant extends FHIRBackboneElement * Validation map for fields in type Invoice.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInvoiceParticipant Constructor @@ -235,12 +235,97 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_DOT_PARTICIPANT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponent.php index 796fff2bf6..6c6fed58fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRInvoicePriceComponent extends FHIRBackboneElement * Validation map for fields in type Invoice.PriceComponent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInvoicePriceComponent Constructor @@ -377,12 +377,131 @@ public function setType(FHIRInvoicePriceComponentType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_DOT_PRICE_COMPONENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_DOT_PRICE_COMPONENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_DOT_PRICE_COMPONENT, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_DOT_PRICE_COMPONENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php index 9cf9a97f31..cd367393ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRLinkageItem extends FHIRBackboneElement * Validation map for fields in type Linkage.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLinkageItem Constructor @@ -246,12 +246,97 @@ public function setType(FHIRLinkageType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE_DOT_ITEM, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE_DOT_ITEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php index 173c87b86b..3eadfdf944 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRListEntry extends FHIRBackboneElement * Validation map for fields in type List.Entry * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListEntry Constructor @@ -387,12 +387,131 @@ public function setItem(FHIRReference $item = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeleted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DELETED] = $fieldErrs; + } + } + if (null !== ($v = $this->getFlag())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FLAG] = $fieldErrs; + } + } + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DELETED])) { + $v = $this->getDeleted(); + foreach($validationRules[self::FIELD_DELETED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_DELETED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DELETED])) { + $errs[self::FIELD_DELETED] = []; + } + $errs[self::FIELD_DELETED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FLAG])) { + $v = $this->getFlag(); + foreach($validationRules[self::FIELD_FLAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_FLAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FLAG])) { + $errs[self::FIELD_FLAG] = []; + } + $errs[self::FIELD_FLAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperation.php index 3856771230..27c4b6bcb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRLocationHoursOfOperation extends FHIRBackboneElement * Validation map for fields in type Location.HoursOfOperation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationHoursOfOperation Constructor @@ -446,12 +446,133 @@ public function setOpeningTime($openingTime = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllDay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALL_DAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getClosingTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLOSING_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDaysOfWeek())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DAYS_OF_WEEK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOpeningTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPENING_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALL_DAY])) { + $v = $this->getAllDay(); + foreach($validationRules[self::FIELD_ALL_DAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_HOURS_OF_OPERATION, self::FIELD_ALL_DAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALL_DAY])) { + $errs[self::FIELD_ALL_DAY] = []; + } + $errs[self::FIELD_ALL_DAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLOSING_TIME])) { + $v = $this->getClosingTime(); + foreach($validationRules[self::FIELD_CLOSING_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_HOURS_OF_OPERATION, self::FIELD_CLOSING_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLOSING_TIME])) { + $errs[self::FIELD_CLOSING_TIME] = []; + } + $errs[self::FIELD_CLOSING_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAYS_OF_WEEK])) { + $v = $this->getDaysOfWeek(); + foreach($validationRules[self::FIELD_DAYS_OF_WEEK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_HOURS_OF_OPERATION, self::FIELD_DAYS_OF_WEEK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAYS_OF_WEEK])) { + $errs[self::FIELD_DAYS_OF_WEEK] = []; + } + $errs[self::FIELD_DAYS_OF_WEEK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPENING_TIME])) { + $v = $this->getOpeningTime(); + foreach($validationRules[self::FIELD_OPENING_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_HOURS_OF_OPERATION, self::FIELD_OPENING_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPENING_TIME])) { + $errs[self::FIELD_OPENING_TIME] = []; + } + $errs[self::FIELD_OPENING_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php index 9a14b39e19..de1ba77832 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRLocationPosition extends FHIRBackboneElement * Validation map for fields in type Location.Position * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationPosition Constructor @@ -368,12 +368,114 @@ public function setLongitude($longitude = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAltitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALTITUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLatitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LATITUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLongitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LONGITUDE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALTITUDE])) { + $v = $this->getAltitude(); + foreach($validationRules[self::FIELD_ALTITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_ALTITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALTITUDE])) { + $errs[self::FIELD_ALTITUDE] = []; + } + $errs[self::FIELD_ALTITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LATITUDE])) { + $v = $this->getLatitude(); + foreach($validationRules[self::FIELD_LATITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_LATITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LATITUDE])) { + $errs[self::FIELD_LATITUDE] = []; + } + $errs[self::FIELD_LATITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LONGITUDE])) { + $v = $this->getLongitude(); + foreach($validationRules[self::FIELD_LONGITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_LONGITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LONGITUDE])) { + $errs[self::FIELD_LONGITUDE] = []; + } + $errs[self::FIELD_LONGITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMarketingStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMarketingStatus.php index a976642e09..c2600c1bb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMarketingStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMarketingStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -172,7 +172,7 @@ class FHIRMarketingStatus extends FHIRBackboneElement * Validation map for fields in type MarketingStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMarketingStatus Constructor @@ -464,12 +464,148 @@ public function setStatus(FHIRCodeableConcept $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCountry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNTRY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getJurisdiction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_JURISDICTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRestoreDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESTORE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COUNTRY])) { + $v = $this->getCountry(); + foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKETING_STATUS, self::FIELD_COUNTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY])) { + $errs[self::FIELD_COUNTRY] = []; + } + $errs[self::FIELD_COUNTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_RANGE])) { + $v = $this->getDateRange(); + foreach($validationRules[self::FIELD_DATE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKETING_STATUS, self::FIELD_DATE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_RANGE])) { + $errs[self::FIELD_DATE_RANGE] = []; + } + $errs[self::FIELD_DATE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKETING_STATUS, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESTORE_DATE])) { + $v = $this->getRestoreDate(); + foreach($validationRules[self::FIELD_RESTORE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKETING_STATUS, self::FIELD_RESTORE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESTORE_DATE])) { + $errs[self::FIELD_RESTORE_DATE] = []; + } + $errs[self::FIELD_RESTORE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKETING_STATUS, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponent.php index 3800de8a49..f59268f010 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRMeasureComponent extends FHIRBackboneElement * Validation map for fields in type Measure.Component * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureComponent Constructor @@ -321,12 +321,114 @@ public function setDescription($description = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCriteria())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITERIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_COMPONENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITERIA])) { + $v = $this->getCriteria(); + foreach($validationRules[self::FIELD_CRITERIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_COMPONENT, self::FIELD_CRITERIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITERIA])) { + $errs[self::FIELD_CRITERIA] = []; + } + $errs[self::FIELD_CRITERIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_COMPONENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php index 14f788c887..9e261866de 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -136,7 +136,7 @@ class FHIRMeasureGroup extends FHIRBackboneElement * Validation map for fields in type Measure.Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureGroup Constructor @@ -423,12 +423,135 @@ public function setStratifier(array $stratifier = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPopulation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POPULATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getStratifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRATIFIER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_GROUP, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_GROUP, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_GROUP, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRATIFIER])) { + $v = $this->getStratifier(); + foreach($validationRules[self::FIELD_STRATIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_GROUP, self::FIELD_STRATIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRATIFIER])) { + $errs[self::FIELD_STRATIFIER] = []; + } + $errs[self::FIELD_STRATIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php index 792f6bc924..87880588f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRMeasurePopulation extends FHIRBackboneElement * Validation map for fields in type Measure.Population * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasurePopulation Constructor @@ -312,12 +312,114 @@ public function setDescription($description = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCriteria())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITERIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_POPULATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITERIA])) { + $v = $this->getCriteria(); + foreach($validationRules[self::FIELD_CRITERIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_POPULATION, self::FIELD_CRITERIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITERIA])) { + $errs[self::FIELD_CRITERIA] = []; + } + $errs[self::FIELD_CRITERIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_POPULATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php index 1414a80152..ed71e0a65e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRMeasureStratifier extends FHIRBackboneElement * Validation map for fields in type Measure.Stratifier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureStratifier Constructor @@ -407,12 +407,133 @@ public function setDescription($description = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPONENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCriteria())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITERIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_STRATIFIER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPONENT])) { + $v = $this->getComponent(); + foreach($validationRules[self::FIELD_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_STRATIFIER, self::FIELD_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPONENT])) { + $errs[self::FIELD_COMPONENT] = []; + } + $errs[self::FIELD_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITERIA])) { + $v = $this->getCriteria(); + foreach($validationRules[self::FIELD_CRITERIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_STRATIFIER, self::FIELD_CRITERIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITERIA])) { + $errs[self::FIELD_CRITERIA] = []; + } + $errs[self::FIELD_CRITERIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_STRATIFIER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php index eb6468f037..3139c3c774 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -149,7 +149,7 @@ class FHIRMeasureSupplementalData extends FHIRBackboneElement * Validation map for fields in type Measure.SupplementalData * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureSupplementalData Constructor @@ -430,12 +430,133 @@ public function setUsage(array $usage = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCriteria())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITERIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUsage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USAGE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_SUPPLEMENTAL_DATA, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITERIA])) { + $v = $this->getCriteria(); + foreach($validationRules[self::FIELD_CRITERIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_SUPPLEMENTAL_DATA, self::FIELD_CRITERIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITERIA])) { + $errs[self::FIELD_CRITERIA] = []; + } + $errs[self::FIELD_CRITERIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_SUPPLEMENTAL_DATA, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_SUPPLEMENTAL_DATA, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponent.php index 8eb95e2478..e1aa401fba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRMeasureReportComponent extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Component * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportComponent Constructor @@ -231,12 +231,97 @@ public function setValue(FHIRCodeableConcept $value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_COMPONENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_COMPONENT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php index c94bd6f269..fb263ee293 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRMeasureReportGroup extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportGroup Constructor @@ -413,12 +413,135 @@ public function setStratifier(array $stratifier = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasureScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE_SCORE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPopulation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POPULATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getStratifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRATIFIER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_GROUP, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASURE_SCORE])) { + $v = $this->getMeasureScore(); + foreach($validationRules[self::FIELD_MEASURE_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_GROUP, self::FIELD_MEASURE_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASURE_SCORE])) { + $errs[self::FIELD_MEASURE_SCORE] = []; + } + $errs[self::FIELD_MEASURE_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_GROUP, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRATIFIER])) { + $v = $this->getStratifier(); + foreach($validationRules[self::FIELD_STRATIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_GROUP, self::FIELD_STRATIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRATIFIER])) { + $errs[self::FIELD_STRATIFIER] = []; + } + $errs[self::FIELD_STRATIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php index 660b7af167..dcf239e134 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRMeasureReportPopulation extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Population * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportPopulation Constructor @@ -307,12 +307,114 @@ public function setSubjectResults(FHIRReference $subjectResults = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectResults())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_RESULTS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT])) { + $v = $this->getCount(); + foreach($validationRules[self::FIELD_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION, self::FIELD_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT])) { + $errs[self::FIELD_COUNT] = []; + } + $errs[self::FIELD_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_RESULTS])) { + $v = $this->getSubjectResults(); + foreach($validationRules[self::FIELD_SUBJECT_RESULTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION, self::FIELD_SUBJECT_RESULTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_RESULTS])) { + $errs[self::FIELD_SUBJECT_RESULTS] = []; + } + $errs[self::FIELD_SUBJECT_RESULTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php index 45bbdeddf1..f7f7e19323 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRMeasureReportPopulation1 extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Population1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportPopulation1 Constructor @@ -307,12 +307,114 @@ public function setSubjectResults(FHIRReference $subjectResults = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectResults())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_RESULTS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION_1, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT])) { + $v = $this->getCount(); + foreach($validationRules[self::FIELD_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION_1, self::FIELD_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT])) { + $errs[self::FIELD_COUNT] = []; + } + $errs[self::FIELD_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_RESULTS])) { + $v = $this->getSubjectResults(); + foreach($validationRules[self::FIELD_SUBJECT_RESULTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION_1, self::FIELD_SUBJECT_RESULTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_RESULTS])) { + $errs[self::FIELD_SUBJECT_RESULTS] = []; + } + $errs[self::FIELD_SUBJECT_RESULTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php index 7ea2ce8df6..9f0377ce6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRMeasureReportStratifier extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Stratifier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportStratifier Constructor @@ -307,12 +307,101 @@ public function setStratum(array $stratum = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getStratum())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRATUM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATIFIER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRATUM])) { + $v = $this->getStratum(); + foreach($validationRules[self::FIELD_STRATUM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATIFIER, self::FIELD_STRATUM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRATUM])) { + $errs[self::FIELD_STRATUM] = []; + } + $errs[self::FIELD_STRATUM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php index 83e4881532..6b46a9aa45 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRMeasureReportStratum extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Stratum * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportStratum Constructor @@ -412,12 +412,135 @@ public function setValue(FHIRCodeableConcept $value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getComponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPONENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMeasureScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE_SCORE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPopulation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POPULATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPONENT])) { + $v = $this->getComponent(); + foreach($validationRules[self::FIELD_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATUM, self::FIELD_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPONENT])) { + $errs[self::FIELD_COMPONENT] = []; + } + $errs[self::FIELD_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASURE_SCORE])) { + $v = $this->getMeasureScore(); + foreach($validationRules[self::FIELD_MEASURE_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATUM, self::FIELD_MEASURE_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASURE_SCORE])) { + $errs[self::FIELD_MEASURE_SCORE] = []; + } + $errs[self::FIELD_MEASURE_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATUM, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATUM, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php index 58003aa78d..667eeaa4eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRMedicationBatch extends FHIRBackboneElement * Validation map for fields in type Medication.Batch * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationBatch Constructor @@ -286,12 +286,97 @@ public function setLotNumber($lotNumber = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpirationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPIRATION_DATE])) { + $v = $this->getExpirationDate(); + foreach($validationRules[self::FIELD_EXPIRATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_BATCH, self::FIELD_EXPIRATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRATION_DATE])) { + $errs[self::FIELD_EXPIRATION_DATE] = []; + } + $errs[self::FIELD_EXPIRATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_BATCH, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php index 319002e364..ce8dcb0d53 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRMedicationIngredient extends FHIRBackboneElement * Validation map for fields in type Medication.Ingredient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationIngredient Constructor @@ -370,12 +370,131 @@ public function setStrength(FHIRRatio $strength = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIsActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStrength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRENGTH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IS_ACTIVE])) { + $v = $this->getIsActive(); + foreach($validationRules[self::FIELD_IS_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_IS_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_ACTIVE])) { + $errs[self::FIELD_IS_ACTIVE] = []; + } + $errs[self::FIELD_IS_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php index 4c072a4e19..3dafde1f61 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -204,7 +204,7 @@ class FHIRMedicationAdministrationDosage extends FHIRBackboneElement * Validation map for fields in type MedicationAdministration.Dosage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministrationDosage Constructor @@ -582,12 +582,182 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOSE])) { + $v = $this->getDose(); + foreach($validationRules[self::FIELD_DOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_DOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE])) { + $errs[self::FIELD_DOSE] = []; + } + $errs[self::FIELD_DOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_QUANTITY])) { + $v = $this->getRateQuantity(); + foreach($validationRules[self::FIELD_RATE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_RATE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_QUANTITY])) { + $errs[self::FIELD_RATE_QUANTITY] = []; + } + $errs[self::FIELD_RATE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php index d88b594962..134a7ad74b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRMedicationAdministrationPerformer extends FHIRBackboneElement * Validation map for fields in type MedicationAdministration.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministrationPerformer Constructor @@ -235,12 +235,97 @@ public function setFunction(FHIRCodeableConcept $function = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getFunction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNCTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNCTION])) { + $v = $this->getFunction(); + foreach($validationRules[self::FIELD_FUNCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_PERFORMER, self::FIELD_FUNCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNCTION])) { + $errs[self::FIELD_FUNCTION] = []; + } + $errs[self::FIELD_FUNCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php index af9d2b8ca8..a40c977e5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRMedicationDispensePerformer extends FHIRBackboneElement * Validation map for fields in type MedicationDispense.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispensePerformer Constructor @@ -237,12 +237,97 @@ public function setFunction(FHIRCodeableConcept $function = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getFunction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNCTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNCTION])) { + $v = $this->getFunction(); + foreach($validationRules[self::FIELD_FUNCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_PERFORMER, self::FIELD_FUNCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNCTION])) { + $errs[self::FIELD_FUNCTION] = []; + } + $errs[self::FIELD_FUNCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php index 19fdefa7ab..bb034dad17 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRMedicationDispenseSubstitution extends FHIRBackboneElement * Validation map for fields in type MedicationDispense.Substitution * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispenseSubstitution Constructor @@ -440,12 +440,135 @@ public function setWasSubstituted($wasSubstituted = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResponsibleParty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESPONSIBLE_PARTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWasSubstituted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WAS_SUBSTITUTED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE_PARTY])) { + $v = $this->getResponsibleParty(); + foreach($validationRules[self::FIELD_RESPONSIBLE_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_RESPONSIBLE_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE_PARTY])) { + $errs[self::FIELD_RESPONSIBLE_PARTY] = []; + } + $errs[self::FIELD_RESPONSIBLE_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WAS_SUBSTITUTED])) { + $v = $this->getWasSubstituted(); + foreach($validationRules[self::FIELD_WAS_SUBSTITUTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_WAS_SUBSTITUTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WAS_SUBSTITUTED])) { + $errs[self::FIELD_WAS_SUBSTITUTED] = []; + } + $errs[self::FIELD_WAS_SUBSTITUTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelines.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelines.php index b79674ac04..d3642a1ec0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelines.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelines.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRMedicationKnowledgeAdministrationGuidelines extends FHIRBackboneElemen * Validation map for fields in type MedicationKnowledge.AdministrationGuidelines * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeAdministrationGuidelines Constructor @@ -394,12 +394,135 @@ public function setPatientCharacteristics(array $patientCharacteristics = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDosage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIndicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIndicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDICATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPatientCharacteristics())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PATIENT_CHARACTERISTICS, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_ADMINISTRATION_GUIDELINES, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION_CODEABLE_CONCEPT])) { + $v = $this->getIndicationCodeableConcept(); + foreach($validationRules[self::FIELD_INDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_ADMINISTRATION_GUIDELINES, self::FIELD_INDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_INDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_INDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION_REFERENCE])) { + $v = $this->getIndicationReference(); + foreach($validationRules[self::FIELD_INDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_ADMINISTRATION_GUIDELINES, self::FIELD_INDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION_REFERENCE])) { + $errs[self::FIELD_INDICATION_REFERENCE] = []; + } + $errs[self::FIELD_INDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT_CHARACTERISTICS])) { + $v = $this->getPatientCharacteristics(); + foreach($validationRules[self::FIELD_PATIENT_CHARACTERISTICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_ADMINISTRATION_GUIDELINES, self::FIELD_PATIENT_CHARACTERISTICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT_CHARACTERISTICS])) { + $errs[self::FIELD_PATIENT_CHARACTERISTICS] = []; + } + $errs[self::FIELD_PATIENT_CHARACTERISTICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCost.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCost.php index 43c9cb9e2a..9854796d7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCost.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCost.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRMedicationKnowledgeCost extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.Cost * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeCost Constructor @@ -306,12 +306,114 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCost())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COST] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COST])) { + $v = $this->getCost(); + foreach($validationRules[self::FIELD_COST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_COST, self::FIELD_COST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COST])) { + $errs[self::FIELD_COST] = []; + } + $errs[self::FIELD_COST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_COST, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_COST, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosage.php index d6d4367868..8bc1795f1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRMedicationKnowledgeDosage extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.Dosage * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_DOSAGE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -269,12 +269,99 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDosage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_DOSAGE, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_DOSAGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristic.php index 37263d728d..17ccb75689 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRMedicationKnowledgeDrugCharacteristic extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.DrugCharacteristic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeDrugCharacteristic Constructor @@ -439,12 +439,148 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_DRUG_CHARACTERISTIC, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_DRUG_CHARACTERISTIC, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_DRUG_CHARACTERISTIC, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_DRUG_CHARACTERISTIC, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_DRUG_CHARACTERISTIC, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredient.php index f2f82db35e..b95e1dbeed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRMedicationKnowledgeIngredient extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.Ingredient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeIngredient Constructor @@ -368,12 +368,131 @@ public function setStrength(FHIRRatio $strength = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIsActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStrength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRENGTH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IS_ACTIVE])) { + $v = $this->getIsActive(); + foreach($validationRules[self::FIELD_IS_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_INGREDIENT, self::FIELD_IS_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_ACTIVE])) { + $errs[self::FIELD_IS_ACTIVE] = []; + } + $errs[self::FIELD_IS_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_INGREDIENT, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_INGREDIENT, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_INGREDIENT, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKinetics.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKinetics.php index 099a071929..3a94c67b90 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKinetics.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKinetics.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRMedicationKnowledgeKinetics extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.Kinetics * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeKinetics Constructor @@ -367,12 +367,118 @@ public function setLethalDose50(array $lethalDose50 = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAreaUnderCurve())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AREA_UNDER_CURVE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getHalfLifePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HALF_LIFE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLethalDose50())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LETHAL_DOSE_50, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AREA_UNDER_CURVE])) { + $v = $this->getAreaUnderCurve(); + foreach($validationRules[self::FIELD_AREA_UNDER_CURVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_KINETICS, self::FIELD_AREA_UNDER_CURVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AREA_UNDER_CURVE])) { + $errs[self::FIELD_AREA_UNDER_CURVE] = []; + } + $errs[self::FIELD_AREA_UNDER_CURVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HALF_LIFE_PERIOD])) { + $v = $this->getHalfLifePeriod(); + foreach($validationRules[self::FIELD_HALF_LIFE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_KINETICS, self::FIELD_HALF_LIFE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HALF_LIFE_PERIOD])) { + $errs[self::FIELD_HALF_LIFE_PERIOD] = []; + } + $errs[self::FIELD_HALF_LIFE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LETHAL_DOSE_50])) { + $v = $this->getLethalDose50(); + foreach($validationRules[self::FIELD_LETHAL_DOSE_50] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_KINETICS, self::FIELD_LETHAL_DOSE_50, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LETHAL_DOSE_50])) { + $errs[self::FIELD_LETHAL_DOSE_50] = []; + } + $errs[self::FIELD_LETHAL_DOSE_50][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispense.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispense.php index ab12ce210e..99cc79c1a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRMedicationKnowledgeMaxDispense extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.MaxDispense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeMaxDispense Constructor @@ -231,12 +231,97 @@ public function setQuantity(FHIRQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_MAX_DISPENSE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_MAX_DISPENSE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassification.php index d0c9c83625..56349b1a90 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRMedicationKnowledgeMedicineClassification extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.MedicineClassification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeMedicineClassification Constructor @@ -275,12 +275,99 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getClassification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CLASSIFICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLASSIFICATION])) { + $v = $this->getClassification(); + foreach($validationRules[self::FIELD_CLASSIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_MEDICINE_CLASSIFICATION, self::FIELD_CLASSIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASSIFICATION])) { + $errs[self::FIELD_CLASSIFICATION] = []; + } + $errs[self::FIELD_CLASSIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_MEDICINE_CLASSIFICATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgram.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgram.php index dd94eb3577..0adf065cae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgram.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgram.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRMedicationKnowledgeMonitoringProgram extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.MonitoringProgram * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeMonitoringProgram Constructor @@ -253,12 +253,97 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_MONITORING_PROGRAM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_MONITORING_PROGRAM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonograph.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonograph.php index 72c6f6de00..d8edc41426 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonograph.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonograph.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRMedicationKnowledgeMonograph extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.Monograph * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeMonograph Constructor @@ -231,12 +231,97 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_MONOGRAPH, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_MONOGRAPH, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackaging.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackaging.php index 696bab44a3..e6bd5f3512 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackaging.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackaging.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRMedicationKnowledgePackaging extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.Packaging * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgePackaging Constructor @@ -237,12 +237,97 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_PACKAGING, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_PACKAGING, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristics.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristics.php index 99848decd0..00f3b5ba70 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristics.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristics.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRMedicationKnowledgePatientCharacteristics extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.PatientCharacteristics * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgePatientCharacteristics Constructor @@ -356,12 +356,116 @@ public function setValue(array $value = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCharacteristicCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHARACTERISTIC_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCharacteristicQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHARACTERISTIC_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC_CODEABLE_CONCEPT])) { + $v = $this->getCharacteristicCodeableConcept(); + foreach($validationRules[self::FIELD_CHARACTERISTIC_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_PATIENT_CHARACTERISTICS, self::FIELD_CHARACTERISTIC_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC_CODEABLE_CONCEPT])) { + $errs[self::FIELD_CHARACTERISTIC_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_CHARACTERISTIC_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC_QUANTITY])) { + $v = $this->getCharacteristicQuantity(); + foreach($validationRules[self::FIELD_CHARACTERISTIC_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_PATIENT_CHARACTERISTICS, self::FIELD_CHARACTERISTIC_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC_QUANTITY])) { + $errs[self::FIELD_CHARACTERISTIC_QUANTITY] = []; + } + $errs[self::FIELD_CHARACTERISTIC_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_PATIENT_CHARACTERISTICS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatory.php index 3150684ca5..305a7e8eed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRMedicationKnowledgeRegulatory extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.Regulatory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeRegulatory Constructor @@ -378,12 +378,135 @@ public function setSubstitution(array $substitution = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMaxDispense())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DISPENSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRegulatoryAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REGULATORY_AUTHORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSchedule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SCHEDULE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubstitution())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBSTITUTION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DISPENSE])) { + $v = $this->getMaxDispense(); + foreach($validationRules[self::FIELD_MAX_DISPENSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_REGULATORY, self::FIELD_MAX_DISPENSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DISPENSE])) { + $errs[self::FIELD_MAX_DISPENSE] = []; + } + $errs[self::FIELD_MAX_DISPENSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REGULATORY_AUTHORITY])) { + $v = $this->getRegulatoryAuthority(); + foreach($validationRules[self::FIELD_REGULATORY_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_REGULATORY, self::FIELD_REGULATORY_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REGULATORY_AUTHORITY])) { + $errs[self::FIELD_REGULATORY_AUTHORITY] = []; + } + $errs[self::FIELD_REGULATORY_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_REGULATORY, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTITUTION])) { + $v = $this->getSubstitution(); + foreach($validationRules[self::FIELD_SUBSTITUTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_REGULATORY, self::FIELD_SUBSTITUTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTITUTION])) { + $errs[self::FIELD_SUBSTITUTION] = []; + } + $errs[self::FIELD_SUBSTITUTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledge.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledge.php index 4f379074ce..50b5a1bb7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledge.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRMedicationKnowledgeRelatedMedicationKnowledge extends FHIRBackboneElem * Validation map for fields in type MedicationKnowledge.RelatedMedicationKnowledge * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_REFERENCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -269,12 +269,99 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_RELATED_MEDICATION_KNOWLEDGE, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_RELATED_MEDICATION_KNOWLEDGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSchedule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSchedule.php index 14a1dd3a77..0b72b84756 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSchedule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSchedule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRMedicationKnowledgeSchedule extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.Schedule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeSchedule Constructor @@ -178,12 +178,80 @@ public function setSchedule(FHIRCodeableConcept $schedule = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_SCHEDULE, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitution.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitution.php index a8e18bcc2f..983a73ea4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRMedicationKnowledgeSubstitution extends FHIRBackboneElement * Validation map for fields in type MedicationKnowledge.Substitution * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledgeSubstitution Constructor @@ -250,12 +250,97 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllowed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLOWED])) { + $v = $this->getAllowed(); + foreach($validationRules[self::FIELD_ALLOWED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_SUBSTITUTION, self::FIELD_ALLOWED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED])) { + $errs[self::FIELD_ALLOWED] = []; + } + $errs[self::FIELD_ALLOWED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE_DOT_SUBSTITUTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php index b3fd296e6a..65666dbf0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -190,7 +190,7 @@ class FHIRMedicationRequestDispenseRequest extends FHIRBackboneElement * Validation map for fields in type MedicationRequest.DispenseRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequestDispenseRequest Constructor @@ -538,12 +538,182 @@ public function setValidityPeriod(FHIRPeriod $validityPeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDispenseInterval())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPENSE_INTERVAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpectedSupplyDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialFill())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_FILL] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfRepeatsAllowed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidityPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDITY_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISPENSE_INTERVAL])) { + $v = $this->getDispenseInterval(); + foreach($validationRules[self::FIELD_DISPENSE_INTERVAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_DISPENSE_INTERVAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSE_INTERVAL])) { + $errs[self::FIELD_DISPENSE_INTERVAL] = []; + } + $errs[self::FIELD_DISPENSE_INTERVAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPECTED_SUPPLY_DURATION])) { + $v = $this->getExpectedSupplyDuration(); + foreach($validationRules[self::FIELD_EXPECTED_SUPPLY_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_EXPECTED_SUPPLY_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPECTED_SUPPLY_DURATION])) { + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION] = []; + } + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_FILL])) { + $v = $this->getInitialFill(); + foreach($validationRules[self::FIELD_INITIAL_FILL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_INITIAL_FILL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_FILL])) { + $errs[self::FIELD_INITIAL_FILL] = []; + } + $errs[self::FIELD_INITIAL_FILL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $v = $this->getNumberOfRepeatsAllowed(); + foreach($validationRules[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_NUMBER_OF_REPEATS_ALLOWED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = []; + } + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDITY_PERIOD])) { + $v = $this->getValidityPeriod(); + foreach($validationRules[self::FIELD_VALIDITY_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_VALIDITY_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDITY_PERIOD])) { + $errs[self::FIELD_VALIDITY_PERIOD] = []; + } + $errs[self::FIELD_VALIDITY_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFill.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFill.php index 1aa97320cf..03b678092f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFill.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFill.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRMedicationRequestInitialFill extends FHIRBackboneElement * Validation map for fields in type MedicationRequest.InitialFill * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequestInitialFill Constructor @@ -235,12 +235,97 @@ public function setQuantity(FHIRQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_INITIAL_FILL, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_INITIAL_FILL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php index ed71ed0766..84247d8695 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRMedicationRequestSubstitution extends FHIRBackboneElement * Validation map for fields in type MedicationRequest.Substitution * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequestSubstitution Constructor @@ -315,12 +315,114 @@ public function setReason(FHIRCodeableConcept $reason = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllowedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllowedCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLOWED_BOOLEAN])) { + $v = $this->getAllowedBoolean(); + foreach($validationRules[self::FIELD_ALLOWED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_SUBSTITUTION, self::FIELD_ALLOWED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_BOOLEAN])) { + $errs[self::FIELD_ALLOWED_BOOLEAN] = []; + } + $errs[self::FIELD_ALLOWED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALLOWED_CODEABLE_CONCEPT])) { + $v = $this->getAllowedCodeableConcept(); + foreach($validationRules[self::FIELD_ALLOWED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_SUBSTITUTION, self::FIELD_ALLOWED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ALLOWED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ALLOWED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_SUBSTITUTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguage.php index 5d353d1a4a..db42bd3885 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRMedicinalProductCountryLanguage extends FHIRBackboneElement * Validation map for fields in type MedicinalProduct.CountryLanguage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductCountryLanguage Constructor @@ -283,12 +283,114 @@ public function setLanguage(FHIRCodeableConcept $language = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCountry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNTRY] = $fieldErrs; + } + } + if (null !== ($v = $this->getJurisdiction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_JURISDICTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COUNTRY])) { + $v = $this->getCountry(); + foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_COUNTRY_LANGUAGE, self::FIELD_COUNTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY])) { + $errs[self::FIELD_COUNTRY] = []; + } + $errs[self::FIELD_COUNTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_COUNTRY_LANGUAGE, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_COUNTRY_LANGUAGE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperation.php index 100a0dc205..6751601b75 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRMedicinalProductManufacturingBusinessOperation extends FHIRBackboneEle * Validation map for fields in type MedicinalProduct.ManufacturingBusinessOperation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductManufacturingBusinessOperation Constructor @@ -504,12 +504,167 @@ public function setRegulator(FHIRReference $regulator = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthorisationReferenceNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORISATION_REFERENCE_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getConfidentialityIndicator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFIDENTIALITY_INDICATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getManufacturer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANUFACTURER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOperationType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRegulator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REGULATOR] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORISATION_REFERENCE_NUMBER])) { + $v = $this->getAuthorisationReferenceNumber(); + foreach($validationRules[self::FIELD_AUTHORISATION_REFERENCE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_MANUFACTURING_BUSINESS_OPERATION, self::FIELD_AUTHORISATION_REFERENCE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORISATION_REFERENCE_NUMBER])) { + $errs[self::FIELD_AUTHORISATION_REFERENCE_NUMBER] = []; + } + $errs[self::FIELD_AUTHORISATION_REFERENCE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONFIDENTIALITY_INDICATOR])) { + $v = $this->getConfidentialityIndicator(); + foreach($validationRules[self::FIELD_CONFIDENTIALITY_INDICATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_MANUFACTURING_BUSINESS_OPERATION, self::FIELD_CONFIDENTIALITY_INDICATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONFIDENTIALITY_INDICATOR])) { + $errs[self::FIELD_CONFIDENTIALITY_INDICATOR] = []; + } + $errs[self::FIELD_CONFIDENTIALITY_INDICATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE])) { + $v = $this->getEffectiveDate(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_MANUFACTURING_BUSINESS_OPERATION, self::FIELD_EFFECTIVE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE])) { + $errs[self::FIELD_EFFECTIVE_DATE] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_MANUFACTURING_BUSINESS_OPERATION, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION_TYPE])) { + $v = $this->getOperationType(); + foreach($validationRules[self::FIELD_OPERATION_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_MANUFACTURING_BUSINESS_OPERATION, self::FIELD_OPERATION_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION_TYPE])) { + $errs[self::FIELD_OPERATION_TYPE] = []; + } + $errs[self::FIELD_OPERATION_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REGULATOR])) { + $v = $this->getRegulator(); + foreach($validationRules[self::FIELD_REGULATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_MANUFACTURING_BUSINESS_OPERATION, self::FIELD_REGULATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REGULATOR])) { + $errs[self::FIELD_REGULATOR] = []; + } + $errs[self::FIELD_REGULATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductName.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductName.php index 806221e794..41f0e4ed1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductName.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRMedicinalProductName extends FHIRBackboneElement * Validation map for fields in type MedicinalProduct.Name * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductName Constructor @@ -365,12 +365,118 @@ public function setProductName($productName = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCountryLanguage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COUNTRY_LANGUAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNamePart())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME_PART, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COUNTRY_LANGUAGE])) { + $v = $this->getCountryLanguage(); + foreach($validationRules[self::FIELD_COUNTRY_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_NAME, self::FIELD_COUNTRY_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY_LANGUAGE])) { + $errs[self::FIELD_COUNTRY_LANGUAGE] = []; + } + $errs[self::FIELD_COUNTRY_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME_PART])) { + $v = $this->getNamePart(); + foreach($validationRules[self::FIELD_NAME_PART] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_NAME, self::FIELD_NAME_PART, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME_PART])) { + $errs[self::FIELD_NAME_PART] = []; + } + $errs[self::FIELD_NAME_PART][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_NAME])) { + $v = $this->getProductName(); + foreach($validationRules[self::FIELD_PRODUCT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_NAME, self::FIELD_PRODUCT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_NAME])) { + $errs[self::FIELD_PRODUCT_NAME] = []; + } + $errs[self::FIELD_PRODUCT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePart.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePart.php index 85640ad62b..bfeb80be77 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePart.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePart.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRMedicinalProductNamePart extends FHIRBackboneElement * Validation map for fields in type MedicinalProduct.NamePart * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductNamePart Constructor @@ -251,12 +251,97 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PART])) { + $v = $this->getPart(); + foreach($validationRules[self::FIELD_PART] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_NAME_PART, self::FIELD_PART, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART])) { + $errs[self::FIELD_PART] = []; + } + $errs[self::FIELD_PART][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_NAME_PART, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignation.php index dbf3f35e31..2e008e67a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -197,7 +197,7 @@ class FHIRMedicinalProductSpecialDesignation extends FHIRBackboneElement * Validation map for fields in type MedicinalProduct.SpecialDesignation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductSpecialDesignation Constructor @@ -618,12 +618,201 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIndicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIndicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDICATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIntendedUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENDED_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_SPECIAL_DESIGNATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_SPECIAL_DESIGNATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION_CODEABLE_CONCEPT])) { + $v = $this->getIndicationCodeableConcept(); + foreach($validationRules[self::FIELD_INDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_SPECIAL_DESIGNATION, self::FIELD_INDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_INDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_INDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION_REFERENCE])) { + $v = $this->getIndicationReference(); + foreach($validationRules[self::FIELD_INDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_SPECIAL_DESIGNATION, self::FIELD_INDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION_REFERENCE])) { + $errs[self::FIELD_INDICATION_REFERENCE] = []; + } + $errs[self::FIELD_INDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENDED_USE])) { + $v = $this->getIntendedUse(); + foreach($validationRules[self::FIELD_INTENDED_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_SPECIAL_DESIGNATION, self::FIELD_INTENDED_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENDED_USE])) { + $errs[self::FIELD_INTENDED_USE] = []; + } + $errs[self::FIELD_INTENDED_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIES])) { + $v = $this->getSpecies(); + foreach($validationRules[self::FIELD_SPECIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_SPECIAL_DESIGNATION, self::FIELD_SPECIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIES])) { + $errs[self::FIELD_SPECIES] = []; + } + $errs[self::FIELD_SPECIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_SPECIAL_DESIGNATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_DOT_SPECIAL_DESIGNATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorization.php index edd0d9eb4b..72739f42a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -151,7 +151,7 @@ class FHIRMedicinalProductAuthorizationJurisdictionalAuthorization extends FHIRB * Validation map for fields in type MedicinalProductAuthorization.JurisdictionalAuthorization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductAuthorizationJurisdictionalAuthorization Constructor @@ -461,12 +461,152 @@ public function setValidityPeriod(FHIRPeriod $validityPeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCountry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNTRY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLegalStatusOfSupply())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidityPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDITY_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COUNTRY])) { + $v = $this->getCountry(); + foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION_DOT_JURISDICTIONAL_AUTHORIZATION, self::FIELD_COUNTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY])) { + $errs[self::FIELD_COUNTRY] = []; + } + $errs[self::FIELD_COUNTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION_DOT_JURISDICTIONAL_AUTHORIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION_DOT_JURISDICTIONAL_AUTHORIZATION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEGAL_STATUS_OF_SUPPLY])) { + $v = $this->getLegalStatusOfSupply(); + foreach($validationRules[self::FIELD_LEGAL_STATUS_OF_SUPPLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION_DOT_JURISDICTIONAL_AUTHORIZATION, self::FIELD_LEGAL_STATUS_OF_SUPPLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY])) { + $errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY] = []; + } + $errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDITY_PERIOD])) { + $v = $this->getValidityPeriod(); + foreach($validationRules[self::FIELD_VALIDITY_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION_DOT_JURISDICTIONAL_AUTHORIZATION, self::FIELD_VALIDITY_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDITY_PERIOD])) { + $errs[self::FIELD_VALIDITY_PERIOD] = []; + } + $errs[self::FIELD_VALIDITY_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedure.php index 5551aa6deb..ac9bdb9d8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRMedicinalProductAuthorizationProcedure extends FHIRBackboneElement * Validation map for fields in type MedicinalProductAuthorization.Procedure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductAuthorizationProcedure Constructor @@ -443,12 +443,150 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getApplication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_APPLICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDateDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDatePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPLICATION])) { + $v = $this->getApplication(); + foreach($validationRules[self::FIELD_APPLICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION_DOT_PROCEDURE, self::FIELD_APPLICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLICATION])) { + $errs[self::FIELD_APPLICATION] = []; + } + $errs[self::FIELD_APPLICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_DATE_TIME])) { + $v = $this->getDateDateTime(); + foreach($validationRules[self::FIELD_DATE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION_DOT_PROCEDURE, self::FIELD_DATE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_DATE_TIME])) { + $errs[self::FIELD_DATE_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_PERIOD])) { + $v = $this->getDatePeriod(); + foreach($validationRules[self::FIELD_DATE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION_DOT_PROCEDURE, self::FIELD_DATE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_PERIOD])) { + $errs[self::FIELD_DATE_PERIOD] = []; + } + $errs[self::FIELD_DATE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION_DOT_PROCEDURE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION_DOT_PROCEDURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapy.php index d258da76f5..a1da94e3db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRMedicinalProductContraindicationOtherTherapy extends FHIRBackboneEleme * Validation map for fields in type MedicinalProductContraindication.OtherTherapy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductContraindicationOtherTherapy Constructor @@ -296,12 +296,114 @@ public function setTherapyRelationshipType(FHIRCodeableConcept $therapyRelations } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTherapyRelationshipType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_THERAPY_RELATIONSHIP_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_CONTRAINDICATION_DOT_OTHER_THERAPY, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_CONTRAINDICATION_DOT_OTHER_THERAPY, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_THERAPY_RELATIONSHIP_TYPE])) { + $v = $this->getTherapyRelationshipType(); + foreach($validationRules[self::FIELD_THERAPY_RELATIONSHIP_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_CONTRAINDICATION_DOT_OTHER_THERAPY, self::FIELD_THERAPY_RELATIONSHIP_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_THERAPY_RELATIONSHIP_TYPE])) { + $errs[self::FIELD_THERAPY_RELATIONSHIP_TYPE] = []; + } + $errs[self::FIELD_THERAPY_RELATIONSHIP_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapy.php index ae792f988d..433275d778 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRMedicinalProductIndicationOtherTherapy extends FHIRBackboneElement * Validation map for fields in type MedicinalProductIndication.OtherTherapy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductIndicationOtherTherapy Constructor @@ -295,12 +295,114 @@ public function setTherapyRelationshipType(FHIRCodeableConcept $therapyRelations } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTherapyRelationshipType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_THERAPY_RELATIONSHIP_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION_DOT_OTHER_THERAPY, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION_DOT_OTHER_THERAPY, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_THERAPY_RELATIONSHIP_TYPE])) { + $v = $this->getTherapyRelationshipType(); + foreach($validationRules[self::FIELD_THERAPY_RELATIONSHIP_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION_DOT_OTHER_THERAPY, self::FIELD_THERAPY_RELATIONSHIP_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_THERAPY_RELATIONSHIP_TYPE])) { + $errs[self::FIELD_THERAPY_RELATIONSHIP_TYPE] = []; + } + $errs[self::FIELD_THERAPY_RELATIONSHIP_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrength.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrength.php index cc6bc10b63..3474931536 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrength.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrength.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRMedicinalProductIngredientReferenceStrength extends FHIRBackboneElemen * Validation map for fields in type MedicinalProductIngredient.ReferenceStrength * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductIngredientReferenceStrength Constructor @@ -448,12 +448,150 @@ public function setSubstance(FHIRCodeableConcept $substance = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCountry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COUNTRY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMeasurementPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASUREMENT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStrength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getStrengthLowLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRENGTH_LOW_LIMIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COUNTRY])) { + $v = $this->getCountry(); + foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_REFERENCE_STRENGTH, self::FIELD_COUNTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY])) { + $errs[self::FIELD_COUNTRY] = []; + } + $errs[self::FIELD_COUNTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASUREMENT_POINT])) { + $v = $this->getMeasurementPoint(); + foreach($validationRules[self::FIELD_MEASUREMENT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_REFERENCE_STRENGTH, self::FIELD_MEASUREMENT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASUREMENT_POINT])) { + $errs[self::FIELD_MEASUREMENT_POINT] = []; + } + $errs[self::FIELD_MEASUREMENT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_REFERENCE_STRENGTH, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRENGTH_LOW_LIMIT])) { + $v = $this->getStrengthLowLimit(); + foreach($validationRules[self::FIELD_STRENGTH_LOW_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_REFERENCE_STRENGTH, self::FIELD_STRENGTH_LOW_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH_LOW_LIMIT])) { + $errs[self::FIELD_STRENGTH_LOW_LIMIT] = []; + } + $errs[self::FIELD_STRENGTH_LOW_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_REFERENCE_STRENGTH, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstance.php index fc06ac22cd..c0e92d3d15 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRMedicinalProductIngredientSpecifiedSubstance extends FHIRBackboneEleme * Validation map for fields in type MedicinalProductIngredient.SpecifiedSubstance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductIngredientSpecifiedSubstance Constructor @@ -364,12 +364,133 @@ public function setStrength(array $strength = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getConfidentiality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFIDENTIALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStrength())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRENGTH, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_SPECIFIED_SUBSTANCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONFIDENTIALITY])) { + $v = $this->getConfidentiality(); + foreach($validationRules[self::FIELD_CONFIDENTIALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_SPECIFIED_SUBSTANCE, self::FIELD_CONFIDENTIALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONFIDENTIALITY])) { + $errs[self::FIELD_CONFIDENTIALITY] = []; + } + $errs[self::FIELD_CONFIDENTIALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_SPECIFIED_SUBSTANCE, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_SPECIFIED_SUBSTANCE, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrength.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrength.php index 2b763064c6..5a8c27ef25 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrength.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrength.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -179,7 +179,7 @@ class FHIRMedicinalProductIngredientStrength extends FHIRBackboneElement * Validation map for fields in type MedicinalProductIngredient.Strength * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductIngredientStrength Constructor @@ -590,12 +590,186 @@ public function setReferenceStrength(array $referenceStrength = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getConcentration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCENTRATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getConcentrationLowLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCENTRATION_LOW_LIMIT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCountry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COUNTRY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMeasurementPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASUREMENT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPresentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPresentationLowLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESENTATION_LOW_LIMIT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferenceStrength())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_STRENGTH, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CONCENTRATION])) { + $v = $this->getConcentration(); + foreach($validationRules[self::FIELD_CONCENTRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_STRENGTH, self::FIELD_CONCENTRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCENTRATION])) { + $errs[self::FIELD_CONCENTRATION] = []; + } + $errs[self::FIELD_CONCENTRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCENTRATION_LOW_LIMIT])) { + $v = $this->getConcentrationLowLimit(); + foreach($validationRules[self::FIELD_CONCENTRATION_LOW_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_STRENGTH, self::FIELD_CONCENTRATION_LOW_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCENTRATION_LOW_LIMIT])) { + $errs[self::FIELD_CONCENTRATION_LOW_LIMIT] = []; + } + $errs[self::FIELD_CONCENTRATION_LOW_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNTRY])) { + $v = $this->getCountry(); + foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_STRENGTH, self::FIELD_COUNTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY])) { + $errs[self::FIELD_COUNTRY] = []; + } + $errs[self::FIELD_COUNTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASUREMENT_POINT])) { + $v = $this->getMeasurementPoint(); + foreach($validationRules[self::FIELD_MEASUREMENT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_STRENGTH, self::FIELD_MEASUREMENT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASUREMENT_POINT])) { + $errs[self::FIELD_MEASUREMENT_POINT] = []; + } + $errs[self::FIELD_MEASUREMENT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESENTATION])) { + $v = $this->getPresentation(); + foreach($validationRules[self::FIELD_PRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_STRENGTH, self::FIELD_PRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESENTATION])) { + $errs[self::FIELD_PRESENTATION] = []; + } + $errs[self::FIELD_PRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESENTATION_LOW_LIMIT])) { + $v = $this->getPresentationLowLimit(); + foreach($validationRules[self::FIELD_PRESENTATION_LOW_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_STRENGTH, self::FIELD_PRESENTATION_LOW_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESENTATION_LOW_LIMIT])) { + $errs[self::FIELD_PRESENTATION_LOW_LIMIT] = []; + } + $errs[self::FIELD_PRESENTATION_LOW_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_STRENGTH])) { + $v = $this->getReferenceStrength(); + foreach($validationRules[self::FIELD_REFERENCE_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_STRENGTH, self::FIELD_REFERENCE_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_STRENGTH])) { + $errs[self::FIELD_REFERENCE_STRENGTH] = []; + } + $errs[self::FIELD_REFERENCE_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstance.php index 52d82a9bdf..cc1472f4d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRMedicinalProductIngredientSubstance extends FHIRBackboneElement * Validation map for fields in type MedicinalProductIngredient.Substance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductIngredientSubstance Constructor @@ -260,12 +260,99 @@ public function setStrength(array $strength = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStrength())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRENGTH, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_SUBSTANCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT_DOT_SUBSTANCE, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractant.php index f1b1f86a83..b4f9dacc21 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRMedicinalProductInteractionInteractant extends FHIRBackboneElement * Validation map for fields in type MedicinalProductInteraction.Interactant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductInteractionInteractant Constructor @@ -235,12 +235,97 @@ public function setItemReference(FHIRReference $itemReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INTERACTION_DOT_INTERACTANT, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INTERACTION_DOT_INTERACTANT, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifier.php index 943b93cf54..0a38e9deba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRMedicinalProductPackagedBatchIdentifier extends FHIRBackboneElement * Validation map for fields in type MedicinalProductPackaged.BatchIdentifier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductPackagedBatchIdentifier Constructor @@ -230,12 +230,97 @@ public function setOuterPackaging(FHIRIdentifier $outerPackaging = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getImmediatePackaging())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMEDIATE_PACKAGING] = $fieldErrs; + } + } + if (null !== ($v = $this->getOuterPackaging())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTER_PACKAGING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IMMEDIATE_PACKAGING])) { + $v = $this->getImmediatePackaging(); + foreach($validationRules[self::FIELD_IMMEDIATE_PACKAGING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_BATCH_IDENTIFIER, self::FIELD_IMMEDIATE_PACKAGING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMMEDIATE_PACKAGING])) { + $errs[self::FIELD_IMMEDIATE_PACKAGING] = []; + } + $errs[self::FIELD_IMMEDIATE_PACKAGING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTER_PACKAGING])) { + $v = $this->getOuterPackaging(); + foreach($validationRules[self::FIELD_OUTER_PACKAGING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_BATCH_IDENTIFIER, self::FIELD_OUTER_PACKAGING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTER_PACKAGING])) { + $errs[self::FIELD_OUTER_PACKAGING] = []; + } + $errs[self::FIELD_OUTER_PACKAGING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItem.php index 46dfb3e4c9..c10b4860c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -242,7 +242,7 @@ class FHIRMedicinalProductPackagedPackageItem extends FHIRBackboneElement * Validation map for fields in type MedicinalProductPackaged.PackageItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductPackagedPackageItem Constructor @@ -1079,12 +1079,285 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAlternateMaterial())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALTERNATE_MATERIAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getManufacturedItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANUFACTURED_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getManufacturer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANUFACTURER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMaterial())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MATERIAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOtherCharacteristics())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OTHER_CHARACTERISTICS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPackageItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PACKAGE_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPhysicalCharacteristics())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHYSICAL_CHARACTERISTICS] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getShelfLifeStorage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SHELF_LIFE_STORAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALTERNATE_MATERIAL])) { + $v = $this->getAlternateMaterial(); + foreach($validationRules[self::FIELD_ALTERNATE_MATERIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_ALTERNATE_MATERIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALTERNATE_MATERIAL])) { + $errs[self::FIELD_ALTERNATE_MATERIAL] = []; + } + $errs[self::FIELD_ALTERNATE_MATERIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURED_ITEM])) { + $v = $this->getManufacturedItem(); + foreach($validationRules[self::FIELD_MANUFACTURED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_MANUFACTURED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURED_ITEM])) { + $errs[self::FIELD_MANUFACTURED_ITEM] = []; + } + $errs[self::FIELD_MANUFACTURED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MATERIAL])) { + $v = $this->getMaterial(); + foreach($validationRules[self::FIELD_MATERIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_MATERIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MATERIAL])) { + $errs[self::FIELD_MATERIAL] = []; + } + $errs[self::FIELD_MATERIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OTHER_CHARACTERISTICS])) { + $v = $this->getOtherCharacteristics(); + foreach($validationRules[self::FIELD_OTHER_CHARACTERISTICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_OTHER_CHARACTERISTICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OTHER_CHARACTERISTICS])) { + $errs[self::FIELD_OTHER_CHARACTERISTICS] = []; + } + $errs[self::FIELD_OTHER_CHARACTERISTICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE_ITEM])) { + $v = $this->getPackageItem(); + foreach($validationRules[self::FIELD_PACKAGE_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_PACKAGE_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE_ITEM])) { + $errs[self::FIELD_PACKAGE_ITEM] = []; + } + $errs[self::FIELD_PACKAGE_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHYSICAL_CHARACTERISTICS])) { + $v = $this->getPhysicalCharacteristics(); + foreach($validationRules[self::FIELD_PHYSICAL_CHARACTERISTICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_PHYSICAL_CHARACTERISTICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHYSICAL_CHARACTERISTICS])) { + $errs[self::FIELD_PHYSICAL_CHARACTERISTICS] = []; + } + $errs[self::FIELD_PHYSICAL_CHARACTERISTICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHELF_LIFE_STORAGE])) { + $v = $this->getShelfLifeStorage(); + foreach($validationRules[self::FIELD_SHELF_LIFE_STORAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_SHELF_LIFE_STORAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHELF_LIFE_STORAGE])) { + $errs[self::FIELD_SHELF_LIFE_STORAGE] = []; + } + $errs[self::FIELD_SHELF_LIFE_STORAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED_DOT_PACKAGE_ITEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristics.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristics.php index f089c25135..c26333ee26 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristics.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristics.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRMedicinalProductPharmaceuticalCharacteristics extends FHIRBackboneElem * Validation map for fields in type MedicinalProductPharmaceutical.Characteristics * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductPharmaceuticalCharacteristics Constructor @@ -230,12 +230,97 @@ public function setStatus(FHIRCodeableConcept $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_CHARACTERISTICS, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_CHARACTERISTICS, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministration.php index d501aeba79..017407c366 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -187,7 +187,7 @@ class FHIRMedicinalProductPharmaceuticalRouteOfAdministration extends FHIRBackbo * Validation map for fields in type MedicinalProductPharmaceutical.RouteOfAdministration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductPharmaceuticalRouteOfAdministration Constructor @@ -552,12 +552,184 @@ public function setTargetSpecies(array $targetSpecies = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFirstDose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIRST_DOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerDay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_DAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerTreatmentPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_TREATMENT_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxSingleDose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_SINGLE_DOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxTreatmentPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_TREATMENT_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTargetSpecies())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET_SPECIES, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_ROUTE_OF_ADMINISTRATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIRST_DOSE])) { + $v = $this->getFirstDose(); + foreach($validationRules[self::FIELD_FIRST_DOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_ROUTE_OF_ADMINISTRATION, self::FIELD_FIRST_DOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIRST_DOSE])) { + $errs[self::FIELD_FIRST_DOSE] = []; + } + $errs[self::FIELD_FIRST_DOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_DAY])) { + $v = $this->getMaxDosePerDay(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_DAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_ROUTE_OF_ADMINISTRATION, self::FIELD_MAX_DOSE_PER_DAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_DAY])) { + $errs[self::FIELD_MAX_DOSE_PER_DAY] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_DAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_TREATMENT_PERIOD])) { + $v = $this->getMaxDosePerTreatmentPeriod(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_TREATMENT_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_ROUTE_OF_ADMINISTRATION, self::FIELD_MAX_DOSE_PER_TREATMENT_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_TREATMENT_PERIOD])) { + $errs[self::FIELD_MAX_DOSE_PER_TREATMENT_PERIOD] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_TREATMENT_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_SINGLE_DOSE])) { + $v = $this->getMaxSingleDose(); + foreach($validationRules[self::FIELD_MAX_SINGLE_DOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_ROUTE_OF_ADMINISTRATION, self::FIELD_MAX_SINGLE_DOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_SINGLE_DOSE])) { + $errs[self::FIELD_MAX_SINGLE_DOSE] = []; + } + $errs[self::FIELD_MAX_SINGLE_DOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_TREATMENT_PERIOD])) { + $v = $this->getMaxTreatmentPeriod(); + foreach($validationRules[self::FIELD_MAX_TREATMENT_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_ROUTE_OF_ADMINISTRATION, self::FIELD_MAX_TREATMENT_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_TREATMENT_PERIOD])) { + $errs[self::FIELD_MAX_TREATMENT_PERIOD] = []; + } + $errs[self::FIELD_MAX_TREATMENT_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_SPECIES])) { + $v = $this->getTargetSpecies(); + foreach($validationRules[self::FIELD_TARGET_SPECIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_ROUTE_OF_ADMINISTRATION, self::FIELD_TARGET_SPECIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_SPECIES])) { + $errs[self::FIELD_TARGET_SPECIES] = []; + } + $errs[self::FIELD_TARGET_SPECIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpecies.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpecies.php index 1e493e52eb..1eea827a63 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpecies.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpecies.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRMedicinalProductPharmaceuticalTargetSpecies extends FHIRBackboneElemen * Validation map for fields in type MedicinalProductPharmaceutical.TargetSpecies * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductPharmaceuticalTargetSpecies Constructor @@ -260,12 +260,99 @@ public function setWithdrawalPeriod(array $withdrawalPeriod = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getWithdrawalPeriod())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_WITHDRAWAL_PERIOD, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_TARGET_SPECIES, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WITHDRAWAL_PERIOD])) { + $v = $this->getWithdrawalPeriod(); + foreach($validationRules[self::FIELD_WITHDRAWAL_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_TARGET_SPECIES, self::FIELD_WITHDRAWAL_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WITHDRAWAL_PERIOD])) { + $errs[self::FIELD_WITHDRAWAL_PERIOD] = []; + } + $errs[self::FIELD_WITHDRAWAL_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriod.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriod.php index 509e13f58d..43df068d92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriod.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriod.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRMedicinalProductPharmaceuticalWithdrawalPeriod extends FHIRBackboneEle * Validation map for fields in type MedicinalProductPharmaceutical.WithdrawalPeriod * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductPharmaceuticalWithdrawalPeriod Constructor @@ -312,12 +312,114 @@ public function setValue(FHIRQuantity $value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSupportingInformation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getTissue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TISSUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_WITHDRAWAL_PERIOD, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TISSUE])) { + $v = $this->getTissue(); + foreach($validationRules[self::FIELD_TISSUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_WITHDRAWAL_PERIOD, self::FIELD_TISSUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TISSUE])) { + $errs[self::FIELD_TISSUE] = []; + } + $errs[self::FIELD_TISSUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL_DOT_WITHDRAWAL_PERIOD, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php index 7dc789e287..45a4addbca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRMessageDefinitionAllowedResponse extends FHIRBackboneElement * Validation map for fields in type MessageDefinition.AllowedResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageDefinitionAllowedResponse Constructor @@ -298,12 +298,97 @@ public function setSituation($situation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMessage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSituation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITUATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MESSAGE])) { + $v = $this->getMessage(); + foreach($validationRules[self::FIELD_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_ALLOWED_RESPONSE, self::FIELD_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MESSAGE])) { + $errs[self::FIELD_MESSAGE] = []; + } + $errs[self::FIELD_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITUATION])) { + $v = $this->getSituation(); + foreach($validationRules[self::FIELD_SITUATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_ALLOWED_RESPONSE, self::FIELD_SITUATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITUATION])) { + $errs[self::FIELD_SITUATION] = []; + } + $errs[self::FIELD_SITUATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php index 05f960d477..c2215f4646 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRMessageDefinitionFocus extends FHIRBackboneElement * Validation map for fields in type MessageDefinition.Focus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageDefinitionFocus Constructor @@ -442,12 +442,131 @@ public function setProfile($profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_FOCUS, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_FOCUS, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_FOCUS, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_FOCUS, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php index 21d78fe663..4228a36e98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRMessageHeaderDestination extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Destination * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderDestination Constructor @@ -383,12 +383,131 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getReceiver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php index 8b8562f887..574446b6a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRMessageHeaderResponse extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Response * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderResponse Constructor @@ -329,12 +329,114 @@ public function setIdentifier($identifier = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAILS] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAILS])) { + $v = $this->getDetails(); + foreach($validationRules[self::FIELD_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAILS])) { + $errs[self::FIELD_DETAILS] = []; + } + $errs[self::FIELD_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php index 6c8b79cfe5..564f0af6f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRMessageHeaderSource extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderSource Constructor @@ -485,12 +485,148 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getSoftware())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOFTWARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOFTWARE])) { + $v = $this->getSoftware(); + foreach($validationRules[self::FIELD_SOFTWARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_SOFTWARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOFTWARE])) { + $errs[self::FIELD_SOFTWARE] = []; + } + $errs[self::FIELD_SOFTWARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInner.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInner.php index e126033f00..1e24b07a73 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInner.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRMolecularSequenceInner extends FHIRBackboneElement * Validation map for fields in type MolecularSequence.Inner * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMolecularSequenceInner Constructor @@ -283,12 +283,97 @@ public function setStart($start = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_INNER, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_INNER, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuter.php index 6406843ae3..20d269ef8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRMolecularSequenceOuter extends FHIRBackboneElement * Validation map for fields in type MolecularSequence.Outer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMolecularSequenceOuter Constructor @@ -283,12 +283,97 @@ public function setStart($start = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_OUTER, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_OUTER, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQuality.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQuality.php index 3cccdfd67b..be7ddcf8de 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQuality.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQuality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -308,7 +308,7 @@ class FHIRMolecularSequenceQuality extends FHIRBackboneElement * Validation map for fields in type MolecularSequence.Quality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMolecularSequenceQuality Constructor @@ -1216,12 +1216,318 @@ public function setType(FHIRQualityType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getFScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_F_SCORE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGtFP())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GT_FP] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrecision())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRECISION] = $fieldErrs; + } + } + if (null !== ($v = $this->getQueryFP())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUERY_FP] = $fieldErrs; + } + } + if (null !== ($v = $this->getQueryTP())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUERY_TP] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecall())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECALL] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoc())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROC] = $fieldErrs; + } + } + if (null !== ($v = $this->getScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCORE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStandardSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STANDARD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getTruthFN())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRUTH_FN] = $fieldErrs; + } + } + if (null !== ($v = $this->getTruthTP())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRUTH_TP] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_F_SCORE])) { + $v = $this->getFScore(); + foreach($validationRules[self::FIELD_F_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_F_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_F_SCORE])) { + $errs[self::FIELD_F_SCORE] = []; + } + $errs[self::FIELD_F_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GT_FP])) { + $v = $this->getGtFP(); + foreach($validationRules[self::FIELD_GT_FP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_GT_FP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GT_FP])) { + $errs[self::FIELD_GT_FP] = []; + } + $errs[self::FIELD_GT_FP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECISION])) { + $v = $this->getPrecision(); + foreach($validationRules[self::FIELD_PRECISION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_PRECISION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECISION])) { + $errs[self::FIELD_PRECISION] = []; + } + $errs[self::FIELD_PRECISION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUERY_FP])) { + $v = $this->getQueryFP(); + foreach($validationRules[self::FIELD_QUERY_FP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_QUERY_FP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUERY_FP])) { + $errs[self::FIELD_QUERY_FP] = []; + } + $errs[self::FIELD_QUERY_FP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUERY_TP])) { + $v = $this->getQueryTP(); + foreach($validationRules[self::FIELD_QUERY_TP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_QUERY_TP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUERY_TP])) { + $errs[self::FIELD_QUERY_TP] = []; + } + $errs[self::FIELD_QUERY_TP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECALL])) { + $v = $this->getRecall(); + foreach($validationRules[self::FIELD_RECALL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_RECALL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECALL])) { + $errs[self::FIELD_RECALL] = []; + } + $errs[self::FIELD_RECALL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROC])) { + $v = $this->getRoc(); + foreach($validationRules[self::FIELD_ROC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_ROC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROC])) { + $errs[self::FIELD_ROC] = []; + } + $errs[self::FIELD_ROC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORE])) { + $v = $this->getScore(); + foreach($validationRules[self::FIELD_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORE])) { + $errs[self::FIELD_SCORE] = []; + } + $errs[self::FIELD_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STANDARD_SEQUENCE])) { + $v = $this->getStandardSequence(); + foreach($validationRules[self::FIELD_STANDARD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_STANDARD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STANDARD_SEQUENCE])) { + $errs[self::FIELD_STANDARD_SEQUENCE] = []; + } + $errs[self::FIELD_STANDARD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRUTH_FN])) { + $v = $this->getTruthFN(); + foreach($validationRules[self::FIELD_TRUTH_FN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_TRUTH_FN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRUTH_FN])) { + $errs[self::FIELD_TRUTH_FN] = []; + } + $errs[self::FIELD_TRUTH_FN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRUTH_TP])) { + $v = $this->getTruthTP(); + foreach($validationRules[self::FIELD_TRUTH_TP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_TRUTH_TP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRUTH_TP])) { + $errs[self::FIELD_TRUTH_TP] = []; + } + $errs[self::FIELD_TRUTH_TP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_QUALITY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeq.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeq.php index e32e12a583..9c4de2c7ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeq.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeq.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -220,7 +220,7 @@ class FHIRMolecularSequenceReferenceSeq extends FHIRBackboneElement * Validation map for fields in type MolecularSequence.ReferenceSeq * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMolecularSequenceReferenceSeq Constructor @@ -754,12 +754,216 @@ public function setWindowStart($windowStart = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getChromosome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHROMOSOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getGenomeBuild())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENOME_BUILD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrientation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceSeqId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_SEQ_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceSeqPointer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_SEQ_POINTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceSeqString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_SEQ_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getStrand())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRAND] = $fieldErrs; + } + } + if (null !== ($v = $this->getWindowEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WINDOW_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getWindowStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WINDOW_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CHROMOSOME])) { + $v = $this->getChromosome(); + foreach($validationRules[self::FIELD_CHROMOSOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_CHROMOSOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHROMOSOME])) { + $errs[self::FIELD_CHROMOSOME] = []; + } + $errs[self::FIELD_CHROMOSOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENOME_BUILD])) { + $v = $this->getGenomeBuild(); + foreach($validationRules[self::FIELD_GENOME_BUILD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_GENOME_BUILD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENOME_BUILD])) { + $errs[self::FIELD_GENOME_BUILD] = []; + } + $errs[self::FIELD_GENOME_BUILD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIENTATION])) { + $v = $this->getOrientation(); + foreach($validationRules[self::FIELD_ORIENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_ORIENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIENTATION])) { + $errs[self::FIELD_ORIENTATION] = []; + } + $errs[self::FIELD_ORIENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_SEQ_ID])) { + $v = $this->getReferenceSeqId(); + foreach($validationRules[self::FIELD_REFERENCE_SEQ_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_REFERENCE_SEQ_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_SEQ_ID])) { + $errs[self::FIELD_REFERENCE_SEQ_ID] = []; + } + $errs[self::FIELD_REFERENCE_SEQ_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_SEQ_POINTER])) { + $v = $this->getReferenceSeqPointer(); + foreach($validationRules[self::FIELD_REFERENCE_SEQ_POINTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_REFERENCE_SEQ_POINTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_SEQ_POINTER])) { + $errs[self::FIELD_REFERENCE_SEQ_POINTER] = []; + } + $errs[self::FIELD_REFERENCE_SEQ_POINTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_SEQ_STRING])) { + $v = $this->getReferenceSeqString(); + foreach($validationRules[self::FIELD_REFERENCE_SEQ_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_REFERENCE_SEQ_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_SEQ_STRING])) { + $errs[self::FIELD_REFERENCE_SEQ_STRING] = []; + } + $errs[self::FIELD_REFERENCE_SEQ_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRAND])) { + $v = $this->getStrand(); + foreach($validationRules[self::FIELD_STRAND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_STRAND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRAND])) { + $errs[self::FIELD_STRAND] = []; + } + $errs[self::FIELD_STRAND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WINDOW_END])) { + $v = $this->getWindowEnd(); + foreach($validationRules[self::FIELD_WINDOW_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_WINDOW_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WINDOW_END])) { + $errs[self::FIELD_WINDOW_END] = []; + } + $errs[self::FIELD_WINDOW_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WINDOW_START])) { + $v = $this->getWindowStart(); + foreach($validationRules[self::FIELD_WINDOW_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_WINDOW_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WINDOW_START])) { + $errs[self::FIELD_WINDOW_START] = []; + } + $errs[self::FIELD_WINDOW_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepository.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepository.php index 7012bbd50d..ffc8e2bcb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepository.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepository.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -169,7 +169,7 @@ class FHIRMolecularSequenceRepository extends FHIRBackboneElement * Validation map for fields in type MolecularSequence.Repository * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMolecularSequenceRepository Constructor @@ -576,12 +576,165 @@ public function setVariantsetId($variantsetId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDatasetId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATASET_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getReadsetId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_READSET_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariantsetId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIANTSET_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATASET_ID])) { + $v = $this->getDatasetId(); + foreach($validationRules[self::FIELD_DATASET_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REPOSITORY, self::FIELD_DATASET_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATASET_ID])) { + $errs[self::FIELD_DATASET_ID] = []; + } + $errs[self::FIELD_DATASET_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REPOSITORY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_READSET_ID])) { + $v = $this->getReadsetId(); + foreach($validationRules[self::FIELD_READSET_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REPOSITORY, self::FIELD_READSET_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_READSET_ID])) { + $errs[self::FIELD_READSET_ID] = []; + } + $errs[self::FIELD_READSET_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REPOSITORY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REPOSITORY, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIANTSET_ID])) { + $v = $this->getVariantsetId(); + foreach($validationRules[self::FIELD_VARIANTSET_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_REPOSITORY, self::FIELD_VARIANTSET_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIANTSET_ID])) { + $errs[self::FIELD_VARIANTSET_ID] = []; + } + $errs[self::FIELD_VARIANTSET_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRoc.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRoc.php index a5408a51d8..99916c6cda 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRoc.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRoc.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -183,7 +183,7 @@ class FHIRMolecularSequenceRoc extends FHIRBackboneElement * Validation map for fields in type MolecularSequence.Roc * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMolecularSequenceRoc Constructor @@ -956,12 +956,196 @@ public function setSensitivity(array $sensitivity = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getFMeasure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_F_MEASURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNumFN())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NUM_FN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNumFP())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NUM_FP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNumTP())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NUM_TP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPrecision())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRECISION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getScore())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SCORE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSensitivity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SENSITIVITY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_F_MEASURE])) { + $v = $this->getFMeasure(); + foreach($validationRules[self::FIELD_F_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_ROC, self::FIELD_F_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_F_MEASURE])) { + $errs[self::FIELD_F_MEASURE] = []; + } + $errs[self::FIELD_F_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUM_FN])) { + $v = $this->getNumFN(); + foreach($validationRules[self::FIELD_NUM_FN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_ROC, self::FIELD_NUM_FN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUM_FN])) { + $errs[self::FIELD_NUM_FN] = []; + } + $errs[self::FIELD_NUM_FN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUM_FP])) { + $v = $this->getNumFP(); + foreach($validationRules[self::FIELD_NUM_FP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_ROC, self::FIELD_NUM_FP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUM_FP])) { + $errs[self::FIELD_NUM_FP] = []; + } + $errs[self::FIELD_NUM_FP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUM_TP])) { + $v = $this->getNumTP(); + foreach($validationRules[self::FIELD_NUM_TP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_ROC, self::FIELD_NUM_TP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUM_TP])) { + $errs[self::FIELD_NUM_TP] = []; + } + $errs[self::FIELD_NUM_TP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECISION])) { + $v = $this->getPrecision(); + foreach($validationRules[self::FIELD_PRECISION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_ROC, self::FIELD_PRECISION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECISION])) { + $errs[self::FIELD_PRECISION] = []; + } + $errs[self::FIELD_PRECISION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORE])) { + $v = $this->getScore(); + foreach($validationRules[self::FIELD_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_ROC, self::FIELD_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORE])) { + $errs[self::FIELD_SCORE] = []; + } + $errs[self::FIELD_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENSITIVITY])) { + $v = $this->getSensitivity(); + foreach($validationRules[self::FIELD_SENSITIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_ROC, self::FIELD_SENSITIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENSITIVITY])) { + $errs[self::FIELD_SENSITIVITY] = []; + } + $errs[self::FIELD_SENSITIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariant.php index 1d1d2fc8c7..b3c41df9e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRMolecularSequenceStructureVariant extends FHIRBackboneElement * Validation map for fields in type MolecularSequence.StructureVariant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMolecularSequenceStructureVariant Constructor @@ -411,12 +411,148 @@ public function setVariantType(FHIRCodeableConcept $variantType = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getInner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getOuter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariantType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIANT_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXACT])) { + $v = $this->getExact(); + foreach($validationRules[self::FIELD_EXACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_STRUCTURE_VARIANT, self::FIELD_EXACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXACT])) { + $errs[self::FIELD_EXACT] = []; + } + $errs[self::FIELD_EXACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INNER])) { + $v = $this->getInner(); + foreach($validationRules[self::FIELD_INNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_STRUCTURE_VARIANT, self::FIELD_INNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INNER])) { + $errs[self::FIELD_INNER] = []; + } + $errs[self::FIELD_INNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LENGTH])) { + $v = $this->getLength(); + foreach($validationRules[self::FIELD_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_STRUCTURE_VARIANT, self::FIELD_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LENGTH])) { + $errs[self::FIELD_LENGTH] = []; + } + $errs[self::FIELD_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTER])) { + $v = $this->getOuter(); + foreach($validationRules[self::FIELD_OUTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_STRUCTURE_VARIANT, self::FIELD_OUTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTER])) { + $errs[self::FIELD_OUTER] = []; + } + $errs[self::FIELD_OUTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIANT_TYPE])) { + $v = $this->getVariantType(); + foreach($validationRules[self::FIELD_VARIANT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_STRUCTURE_VARIANT, self::FIELD_VARIANT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIANT_TYPE])) { + $errs[self::FIELD_VARIANT_TYPE] = []; + } + $errs[self::FIELD_VARIANT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariant.php index f27935e81a..b17054f2fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -180,7 +180,7 @@ class FHIRMolecularSequenceVariant extends FHIRBackboneElement * Validation map for fields in type MolecularSequence.Variant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMolecularSequenceVariant Constructor @@ -595,12 +595,165 @@ public function setVariantPointer(FHIRReference $variantPointer = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCigar())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CIGAR] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getObservedAllele())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVED_ALLELE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceAllele())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_ALLELE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariantPointer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIANT_POINTER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CIGAR])) { + $v = $this->getCigar(); + foreach($validationRules[self::FIELD_CIGAR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_VARIANT, self::FIELD_CIGAR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CIGAR])) { + $errs[self::FIELD_CIGAR] = []; + } + $errs[self::FIELD_CIGAR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_VARIANT, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OBSERVED_ALLELE])) { + $v = $this->getObservedAllele(); + foreach($validationRules[self::FIELD_OBSERVED_ALLELE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_VARIANT, self::FIELD_OBSERVED_ALLELE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBSERVED_ALLELE])) { + $errs[self::FIELD_OBSERVED_ALLELE] = []; + } + $errs[self::FIELD_OBSERVED_ALLELE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_ALLELE])) { + $v = $this->getReferenceAllele(); + foreach($validationRules[self::FIELD_REFERENCE_ALLELE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_VARIANT, self::FIELD_REFERENCE_ALLELE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_ALLELE])) { + $errs[self::FIELD_REFERENCE_ALLELE] = []; + } + $errs[self::FIELD_REFERENCE_ALLELE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_VARIANT, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIANT_POINTER])) { + $v = $this->getVariantPointer(); + foreach($validationRules[self::FIELD_VARIANT_POINTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE_DOT_VARIANT, self::FIELD_VARIANT_POINTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIANT_POINTER])) { + $errs[self::FIELD_VARIANT_POINTER] = []; + } + $errs[self::FIELD_VARIANT_POINTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php index 4ced216a3b..3b268f0593 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRNamingSystemUniqueId extends FHIRBackboneElement * Validation map for fields in type NamingSystem.UniqueId * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNamingSystemUniqueId Constructor @@ -471,12 +471,148 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreferred())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFERRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFERRED])) { + $v = $this->getPreferred(); + foreach($validationRules[self::FIELD_PREFERRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_PREFERRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFERRED])) { + $errs[self::FIELD_PREFERRED] = []; + } + $errs[self::FIELD_PREFERRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php index 4449d4989d..9f1c903c4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -149,7 +149,7 @@ class FHIRNutritionOrderAdministration extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Administration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderAdministration Constructor @@ -364,12 +364,131 @@ public function setSchedule(FHIRTiming $schedule = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_QUANTITY])) { + $v = $this->getRateQuantity(); + foreach($validationRules[self::FIELD_RATE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_RATE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_QUANTITY])) { + $errs[self::FIELD_RATE_QUANTITY] = []; + } + $errs[self::FIELD_RATE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php index c651bccfca..22243a6a62 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -219,7 +219,7 @@ class FHIRNutritionOrderEnteralFormula extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.EnteralFormula * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderEnteralFormula Constructor @@ -744,12 +744,218 @@ public function setRouteofAdministration(FHIRCodeableConcept $routeofAdministrat } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditiveProductName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_PRODUCT_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdditiveType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAdministration())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADMINISTRATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAdministrationInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADMINISTRATION_INSTRUCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getBaseFormulaProductName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getBaseFormulaType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE_FORMULA_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCaloricDensity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CALORIC_DENSITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxVolumeToDeliver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VOLUME_TO_DELIVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRouteofAdministration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTEOF_ADMINISTRATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_PRODUCT_NAME])) { + $v = $this->getAdditiveProductName(); + foreach($validationRules[self::FIELD_ADDITIVE_PRODUCT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADDITIVE_PRODUCT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_PRODUCT_NAME])) { + $errs[self::FIELD_ADDITIVE_PRODUCT_NAME] = []; + } + $errs[self::FIELD_ADDITIVE_PRODUCT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_TYPE])) { + $v = $this->getAdditiveType(); + foreach($validationRules[self::FIELD_ADDITIVE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADDITIVE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_TYPE])) { + $errs[self::FIELD_ADDITIVE_TYPE] = []; + } + $errs[self::FIELD_ADDITIVE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADMINISTRATION])) { + $v = $this->getAdministration(); + foreach($validationRules[self::FIELD_ADMINISTRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADMINISTRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMINISTRATION])) { + $errs[self::FIELD_ADMINISTRATION] = []; + } + $errs[self::FIELD_ADMINISTRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADMINISTRATION_INSTRUCTION])) { + $v = $this->getAdministrationInstruction(); + foreach($validationRules[self::FIELD_ADMINISTRATION_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADMINISTRATION_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMINISTRATION_INSTRUCTION])) { + $errs[self::FIELD_ADMINISTRATION_INSTRUCTION] = []; + } + $errs[self::FIELD_ADMINISTRATION_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { + $v = $this->getBaseFormulaProductName(); + foreach($validationRules[self::FIELD_BASE_FORMULA_PRODUCT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_BASE_FORMULA_PRODUCT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { + $errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME] = []; + } + $errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE_FORMULA_TYPE])) { + $v = $this->getBaseFormulaType(); + foreach($validationRules[self::FIELD_BASE_FORMULA_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_BASE_FORMULA_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE_FORMULA_TYPE])) { + $errs[self::FIELD_BASE_FORMULA_TYPE] = []; + } + $errs[self::FIELD_BASE_FORMULA_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CALORIC_DENSITY])) { + $v = $this->getCaloricDensity(); + foreach($validationRules[self::FIELD_CALORIC_DENSITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_CALORIC_DENSITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CALORIC_DENSITY])) { + $errs[self::FIELD_CALORIC_DENSITY] = []; + } + $errs[self::FIELD_CALORIC_DENSITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VOLUME_TO_DELIVER])) { + $v = $this->getMaxVolumeToDeliver(); + foreach($validationRules[self::FIELD_MAX_VOLUME_TO_DELIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_MAX_VOLUME_TO_DELIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VOLUME_TO_DELIVER])) { + $errs[self::FIELD_MAX_VOLUME_TO_DELIVER] = []; + } + $errs[self::FIELD_MAX_VOLUME_TO_DELIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTEOF_ADMINISTRATION])) { + $v = $this->getRouteofAdministration(); + foreach($validationRules[self::FIELD_ROUTEOF_ADMINISTRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ROUTEOF_ADMINISTRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTEOF_ADMINISTRATION])) { + $errs[self::FIELD_ROUTEOF_ADMINISTRATION] = []; + } + $errs[self::FIELD_ROUTEOF_ADMINISTRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php index 6d366ebb22..f386d367a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRNutritionOrderNutrient extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Nutrient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderNutrient Constructor @@ -235,12 +235,97 @@ public function setModifier(FHIRCodeableConcept $modifier = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getModifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODIFIER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_NUTRIENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_NUTRIENT, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php index f58ce3bf03..37e1ac0e40 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRNutritionOrderOralDiet extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.OralDiet * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderOralDiet Constructor @@ -673,12 +673,175 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getFluidConsistencyType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FLUID_CONSISTENCY_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTRUCTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNutrient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NUTRIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSchedule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SCHEDULE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTexture())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEXTURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_FLUID_CONSISTENCY_TYPE])) { + $v = $this->getFluidConsistencyType(); + foreach($validationRules[self::FIELD_FLUID_CONSISTENCY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_FLUID_CONSISTENCY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FLUID_CONSISTENCY_TYPE])) { + $errs[self::FIELD_FLUID_CONSISTENCY_TYPE] = []; + } + $errs[self::FIELD_FLUID_CONSISTENCY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTRUCTION])) { + $v = $this->getInstruction(); + foreach($validationRules[self::FIELD_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTRUCTION])) { + $errs[self::FIELD_INSTRUCTION] = []; + } + $errs[self::FIELD_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUTRIENT])) { + $v = $this->getNutrient(); + foreach($validationRules[self::FIELD_NUTRIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_NUTRIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUTRIENT])) { + $errs[self::FIELD_NUTRIENT] = []; + } + $errs[self::FIELD_NUTRIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXTURE])) { + $v = $this->getTexture(); + foreach($validationRules[self::FIELD_TEXTURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_TEXTURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXTURE])) { + $errs[self::FIELD_TEXTURE] = []; + } + $errs[self::FIELD_TEXTURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php index 2554f40f58..c9e062a703 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -163,7 +163,7 @@ class FHIRNutritionOrderSupplement extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Supplement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderSupplement Constructor @@ -504,12 +504,150 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTRUCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSchedule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SCHEDULE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INSTRUCTION])) { + $v = $this->getInstruction(); + foreach($validationRules[self::FIELD_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTRUCTION])) { + $errs[self::FIELD_INSTRUCTION] = []; + } + $errs[self::FIELD_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_NAME])) { + $v = $this->getProductName(); + foreach($validationRules[self::FIELD_PRODUCT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_PRODUCT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_NAME])) { + $errs[self::FIELD_PRODUCT_NAME] = []; + } + $errs[self::FIELD_PRODUCT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php index e4d6b693e8..0c1b734879 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRNutritionOrderTexture extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Texture * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderTexture Constructor @@ -237,12 +237,97 @@ public function setModifier(FHIRCodeableConcept $modifier = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFoodType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOOD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getModifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODIFIER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FOOD_TYPE])) { + $v = $this->getFoodType(); + foreach($validationRules[self::FIELD_FOOD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_TEXTURE, self::FIELD_FOOD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOOD_TYPE])) { + $errs[self::FIELD_FOOD_TYPE] = []; + } + $errs[self::FIELD_FOOD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_TEXTURE, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php index adb4b63d49..3c0f8fc844 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -303,7 +303,7 @@ class FHIRObservationComponent extends FHIRBackboneElement * Validation map for fields in type Observation.Component * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationComponent Constructor @@ -1139,12 +1139,322 @@ public function setValueTime($valueTime = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataAbsentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ABSENT_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInterpretation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERPRETATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReferenceRange())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_RANGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_ABSENT_REASON])) { + $v = $this->getDataAbsentReason(); + foreach($validationRules[self::FIELD_DATA_ABSENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_DATA_ABSENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_ABSENT_REASON])) { + $errs[self::FIELD_DATA_ABSENT_REASON] = []; + } + $errs[self::FIELD_DATA_ABSENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERPRETATION])) { + $v = $this->getInterpretation(); + foreach($validationRules[self::FIELD_INTERPRETATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_INTERPRETATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERPRETATION])) { + $errs[self::FIELD_INTERPRETATION] = []; + } + $errs[self::FIELD_INTERPRETATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_RANGE])) { + $v = $this->getReferenceRange(); + foreach($validationRules[self::FIELD_REFERENCE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_REFERENCE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_RANGE])) { + $errs[self::FIELD_REFERENCE_RANGE] = []; + } + $errs[self::FIELD_REFERENCE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php index fd90dcacad..18e3ce93a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -182,7 +182,7 @@ class FHIRObservationReferenceRange extends FHIRBackboneElement * Validation map for fields in type Observation.ReferenceRange * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationReferenceRange Constructor @@ -551,12 +551,167 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAppliesTo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_APPLIES_TO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getHigh())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIGH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLow())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOW] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGE])) { + $v = $this->getAge(); + foreach($validationRules[self::FIELD_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE])) { + $errs[self::FIELD_AGE] = []; + } + $errs[self::FIELD_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPLIES_TO])) { + $v = $this->getAppliesTo(); + foreach($validationRules[self::FIELD_APPLIES_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_APPLIES_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES_TO])) { + $errs[self::FIELD_APPLIES_TO] = []; + } + $errs[self::FIELD_APPLIES_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HIGH])) { + $v = $this->getHigh(); + foreach($validationRules[self::FIELD_HIGH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_HIGH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIGH])) { + $errs[self::FIELD_HIGH] = []; + } + $errs[self::FIELD_HIGH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOW])) { + $v = $this->getLow(); + foreach($validationRules[self::FIELD_LOW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_LOW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOW])) { + $errs[self::FIELD_LOW] = []; + } + $errs[self::FIELD_LOW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedInterval.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedInterval.php index 13ab52dca2..8eca4b793d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedInterval.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedInterval.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -193,7 +193,7 @@ class FHIRObservationDefinitionQualifiedInterval extends FHIRBackboneElement * Validation map for fields in type ObservationDefinition.QualifiedInterval * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationDefinitionQualifiedInterval Constructor @@ -632,12 +632,201 @@ public function setRange(FHIRRange $range = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAppliesTo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_APPLIES_TO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getGestationalAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GESTATIONAL_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGE])) { + $v = $this->getAge(); + foreach($validationRules[self::FIELD_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUALIFIED_INTERVAL, self::FIELD_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE])) { + $errs[self::FIELD_AGE] = []; + } + $errs[self::FIELD_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPLIES_TO])) { + $v = $this->getAppliesTo(); + foreach($validationRules[self::FIELD_APPLIES_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUALIFIED_INTERVAL, self::FIELD_APPLIES_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES_TO])) { + $errs[self::FIELD_APPLIES_TO] = []; + } + $errs[self::FIELD_APPLIES_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUALIFIED_INTERVAL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUALIFIED_INTERVAL, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUALIFIED_INTERVAL, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUALIFIED_INTERVAL, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GESTATIONAL_AGE])) { + $v = $this->getGestationalAge(); + foreach($validationRules[self::FIELD_GESTATIONAL_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUALIFIED_INTERVAL, self::FIELD_GESTATIONAL_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GESTATIONAL_AGE])) { + $errs[self::FIELD_GESTATIONAL_AGE] = []; + } + $errs[self::FIELD_GESTATIONAL_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RANGE])) { + $v = $this->getRange(); + foreach($validationRules[self::FIELD_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUALIFIED_INTERVAL, self::FIELD_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RANGE])) { + $errs[self::FIELD_RANGE] = []; + } + $errs[self::FIELD_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetails.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetails.php index 69f36316b0..f1eed61510 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetails.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetails.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRObservationDefinitionQuantitativeDetails extends FHIRBackboneElement * Validation map for fields in type ObservationDefinition.QuantitativeDetails * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationDefinitionQuantitativeDetails Constructor @@ -396,12 +396,131 @@ public function setUnit(FHIRCodeableConcept $unit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getConversionFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONVERSION_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCustomaryUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CUSTOMARY_UNIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDecimalPrecision())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECIMAL_PRECISION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONVERSION_FACTOR])) { + $v = $this->getConversionFactor(); + foreach($validationRules[self::FIELD_CONVERSION_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUANTITATIVE_DETAILS, self::FIELD_CONVERSION_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONVERSION_FACTOR])) { + $errs[self::FIELD_CONVERSION_FACTOR] = []; + } + $errs[self::FIELD_CONVERSION_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CUSTOMARY_UNIT])) { + $v = $this->getCustomaryUnit(); + foreach($validationRules[self::FIELD_CUSTOMARY_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUANTITATIVE_DETAILS, self::FIELD_CUSTOMARY_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CUSTOMARY_UNIT])) { + $errs[self::FIELD_CUSTOMARY_UNIT] = []; + } + $errs[self::FIELD_CUSTOMARY_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECIMAL_PRECISION])) { + $v = $this->getDecimalPrecision(); + foreach($validationRules[self::FIELD_DECIMAL_PRECISION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUANTITATIVE_DETAILS, self::FIELD_DECIMAL_PRECISION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECIMAL_PRECISION])) { + $errs[self::FIELD_DECIMAL_PRECISION] = []; + } + $errs[self::FIELD_DECIMAL_PRECISION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION_DOT_QUANTITATIVE_DETAILS, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php index 87cec64fdd..5f3aa78fb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIROperationDefinitionBinding extends FHIRBackboneElement * Validation map for fields in type OperationDefinition.Binding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinitionBinding Constructor @@ -277,12 +277,97 @@ public function setValueSet($valueSet = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getStrength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_BINDING, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET])) { + $v = $this->getValueSet(); + foreach($validationRules[self::FIELD_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_BINDING, self::FIELD_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET])) { + $errs[self::FIELD_VALUE_SET] = []; + } + $errs[self::FIELD_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php index 9fe9c236b9..096b6d96ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIROperationDefinitionOverload extends FHIRBackboneElement * Validation map for fields in type OperationDefinition.Overload * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinitionOverload Constructor @@ -316,12 +316,99 @@ public function setParameterName(array $parameterName = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameterName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER_NAME, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_OVERLOAD, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER_NAME])) { + $v = $this->getParameterName(); + foreach($validationRules[self::FIELD_PARAMETER_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_OVERLOAD, self::FIELD_PARAMETER_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER_NAME])) { + $errs[self::FIELD_PARAMETER_NAME] = []; + } + $errs[self::FIELD_PARAMETER_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php index 8c6ee0ea34..e45807cdc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -239,7 +239,7 @@ class FHIROperationDefinitionParameter extends FHIRBackboneElement * Validation map for fields in type OperationDefinition.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinitionParameter Constructor @@ -1001,12 +1001,256 @@ public function setUse(FHIROperationParameterUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBinding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPart())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReferencedFrom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCED_FROM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSearchType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTargetProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET_PROFILE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BINDING])) { + $v = $this->getBinding(); + foreach($validationRules[self::FIELD_BINDING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_BINDING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING])) { + $errs[self::FIELD_BINDING] = []; + } + $errs[self::FIELD_BINDING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART])) { + $v = $this->getPart(); + foreach($validationRules[self::FIELD_PART] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_PART, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART])) { + $errs[self::FIELD_PART] = []; + } + $errs[self::FIELD_PART][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCED_FROM])) { + $v = $this->getReferencedFrom(); + foreach($validationRules[self::FIELD_REFERENCED_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_REFERENCED_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCED_FROM])) { + $errs[self::FIELD_REFERENCED_FROM] = []; + } + $errs[self::FIELD_REFERENCED_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_TYPE])) { + $v = $this->getSearchType(); + foreach($validationRules[self::FIELD_SEARCH_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_SEARCH_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_TYPE])) { + $errs[self::FIELD_SEARCH_TYPE] = []; + } + $errs[self::FIELD_SEARCH_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_PROFILE])) { + $v = $this->getTargetProfile(); + foreach($validationRules[self::FIELD_TARGET_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_TARGET_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_PROFILE])) { + $errs[self::FIELD_TARGET_PROFILE] = []; + } + $errs[self::FIELD_TARGET_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFrom.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFrom.php index 8fd0d9734a..0cc3ad2526 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFrom.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFrom.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIROperationDefinitionReferencedFrom extends FHIRBackboneElement * Validation map for fields in type OperationDefinition.ReferencedFrom * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinitionReferencedFrom Constructor @@ -281,12 +281,97 @@ public function setSourceId($sourceId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_REFERENCED_FROM, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ID])) { + $v = $this->getSourceId(); + foreach($validationRules[self::FIELD_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_REFERENCED_FROM, self::FIELD_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ID])) { + $errs[self::FIELD_SOURCE_ID] = []; + } + $errs[self::FIELD_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php index 3c63a0d37f..6284f3f66a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -175,7 +175,7 @@ class FHIROperationOutcomeIssue extends FHIRBackboneElement * Validation map for fields in type OperationOutcome.Issue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationOutcomeIssue Constructor @@ -649,12 +649,169 @@ public function setSeverity(FHIRIssueSeverity $severity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAILS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnostics())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTICS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExpression())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXPRESSION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAILS])) { + $v = $this->getDetails(); + foreach($validationRules[self::FIELD_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAILS])) { + $errs[self::FIELD_DETAILS] = []; + } + $errs[self::FIELD_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSTICS])) { + $v = $this->getDiagnostics(); + foreach($validationRules[self::FIELD_DIAGNOSTICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_DIAGNOSTICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSTICS])) { + $errs[self::FIELD_DIAGNOSTICS] = []; + } + $errs[self::FIELD_DIAGNOSTICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php index ec6dd324a4..9b9895687a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIROrganizationContact extends FHIRBackboneElement * Validation map for fields in type Organization.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrganizationContact Constructor @@ -388,12 +388,133 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php index c69540e530..3120a78d55 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -844,7 +844,7 @@ class FHIRParametersParameter extends FHIRBackboneElement * Validation map for fields in type Parameters.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParametersParameter Constructor @@ -3482,12 +3482,966 @@ public function setValueUuid($valueUuid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPart())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContributor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTRIBUTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueParameterDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRelatedArtifact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RELATED_ARTIFACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTriggerDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUsageContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_USAGE_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UUID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART])) { + $v = $this->getPart(); + foreach($validationRules[self::FIELD_PART] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_PART, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART])) { + $errs[self::FIELD_PART] = []; + } + $errs[self::FIELD_PART][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_AGE])) { + $v = $this->getValueAge(); + foreach($validationRules[self::FIELD_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_AGE])) { + $errs[self::FIELD_VALUE_AGE] = []; + } + $errs[self::FIELD_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CANONICAL])) { + $v = $this->getValueCanonical(); + foreach($validationRules[self::FIELD_VALUE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CANONICAL])) { + $errs[self::FIELD_VALUE_CANONICAL] = []; + } + $errs[self::FIELD_VALUE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_DETAIL])) { + $v = $this->getValueContactDetail(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CONTACT_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_DETAIL])) { + $errs[self::FIELD_VALUE_CONTACT_DETAIL] = []; + } + $errs[self::FIELD_VALUE_CONTACT_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTRIBUTOR])) { + $v = $this->getValueContributor(); + foreach($validationRules[self::FIELD_VALUE_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTRIBUTOR])) { + $errs[self::FIELD_VALUE_CONTRIBUTOR] = []; + } + $errs[self::FIELD_VALUE_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_COUNT])) { + $v = $this->getValueCount(); + foreach($validationRules[self::FIELD_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_COUNT])) { + $errs[self::FIELD_VALUE_COUNT] = []; + } + $errs[self::FIELD_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATA_REQUIREMENT])) { + $v = $this->getValueDataRequirement(); + foreach($validationRules[self::FIELD_VALUE_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATA_REQUIREMENT])) { + $errs[self::FIELD_VALUE_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_VALUE_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DISTANCE])) { + $v = $this->getValueDistance(); + foreach($validationRules[self::FIELD_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DISTANCE])) { + $errs[self::FIELD_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DOSAGE])) { + $v = $this->getValueDosage(); + foreach($validationRules[self::FIELD_VALUE_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DOSAGE])) { + $errs[self::FIELD_VALUE_DOSAGE] = []; + } + $errs[self::FIELD_VALUE_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_EXPRESSION])) { + $v = $this->getValueExpression(); + foreach($validationRules[self::FIELD_VALUE_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_EXPRESSION])) { + $errs[self::FIELD_VALUE_EXPRESSION] = []; + } + $errs[self::FIELD_VALUE_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PARAMETER_DEFINITION])) { + $v = $this->getValueParameterDefinition(); + foreach($validationRules[self::FIELD_VALUE_PARAMETER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_PARAMETER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PARAMETER_DEFINITION])) { + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RELATED_ARTIFACT])) { + $v = $this->getValueRelatedArtifact(); + foreach($validationRules[self::FIELD_VALUE_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RELATED_ARTIFACT])) { + $errs[self::FIELD_VALUE_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_VALUE_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TRIGGER_DEFINITION])) { + $v = $this->getValueTriggerDefinition(); + foreach($validationRules[self::FIELD_VALUE_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TRIGGER_DEFINITION])) { + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URL])) { + $v = $this->getValueUrl(); + foreach($validationRules[self::FIELD_VALUE_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URL])) { + $errs[self::FIELD_VALUE_URL] = []; + } + $errs[self::FIELD_VALUE_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_USAGE_CONTEXT])) { + $v = $this->getValueUsageContext(); + foreach($validationRules[self::FIELD_VALUE_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_USAGE_CONTEXT])) { + $errs[self::FIELD_VALUE_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_VALUE_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UUID])) { + $v = $this->getValueUuid(); + foreach($validationRules[self::FIELD_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UUID])) { + $errs[self::FIELD_VALUE_UUID] = []; + } + $errs[self::FIELD_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php index 2ce77e97ac..b61d26faef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRPatientCommunication extends FHIRBackboneElement * Validation map for fields in type Patient.Communication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientCommunication Constructor @@ -263,12 +263,97 @@ public function setPreferred($preferred = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreferred())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFERRED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_COMMUNICATION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFERRED])) { + $v = $this->getPreferred(); + foreach($validationRules[self::FIELD_PREFERRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_COMMUNICATION, self::FIELD_PREFERRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFERRED])) { + $errs[self::FIELD_PREFERRED] = []; + } + $errs[self::FIELD_PREFERRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php index 53c2d2d703..ea1f722a09 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -184,7 +184,7 @@ class FHIRPatientContact extends FHIRBackboneElement * Validation map for fields in type Patient.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientContact Constructor @@ -590,12 +590,186 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelationship())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATIONSHIP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php index 59981eb1da..660f91d62f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRPatientLink extends FHIRBackboneElement * Validation map for fields in type Patient.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientLink Constructor @@ -240,12 +240,97 @@ public function setType(FHIRLinkType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOther())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OTHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OTHER])) { + $v = $this->getOther(); + foreach($validationRules[self::FIELD_OTHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_LINK, self::FIELD_OTHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OTHER])) { + $errs[self::FIELD_OTHER] = []; + } + $errs[self::FIELD_OTHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_LINK, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php index 8c1571a235..d249a83a10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -216,7 +216,7 @@ class FHIRPaymentReconciliationDetail extends FHIRBackboneElement * Validation map for fields in type PaymentReconciliation.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentReconciliationDetail Constructor @@ -661,12 +661,233 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPredecessor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREDECESSOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubmitter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBMITTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE])) { + $v = $this->getPayee(); + foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_PAYEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE])) { + $errs[self::FIELD_PAYEE] = []; + } + $errs[self::FIELD_PAYEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREDECESSOR])) { + $v = $this->getPredecessor(); + foreach($validationRules[self::FIELD_PREDECESSOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_PREDECESSOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREDECESSOR])) { + $errs[self::FIELD_PREDECESSOR] = []; + } + $errs[self::FIELD_PREDECESSOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBMITTER])) { + $v = $this->getSubmitter(); + foreach($validationRules[self::FIELD_SUBMITTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_SUBMITTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBMITTER])) { + $errs[self::FIELD_SUBMITTER] = []; + } + $errs[self::FIELD_SUBMITTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php index 3d3bf4bf21..e81a08894b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRPaymentReconciliationProcessNote extends FHIRBackboneElement * Validation map for fields in type PaymentReconciliation.ProcessNote * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentReconciliationProcessNote Constructor @@ -262,12 +262,97 @@ public function setType(FHIRNoteType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_PROCESS_NOTE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_PROCESS_NOTE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php index d28594afe5..badf724885 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRPersonLink extends FHIRBackboneElement * Validation map for fields in type Person.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPersonLink Constructor @@ -243,12 +243,97 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssurance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSURANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSURANCE])) { + $v = $this->getAssurance(); + foreach($validationRules[self::FIELD_ASSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON_DOT_LINK, self::FIELD_ASSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSURANCE])) { + $errs[self::FIELD_ASSURANCE] = []; + } + $errs[self::FIELD_ASSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON_DOT_LINK, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php index 814c909405..5725067921 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -581,7 +581,7 @@ class FHIRPlanDefinitionAction extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.Action * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionAction Constructor @@ -2766,12 +2766,665 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCardinalityBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARDINALITY_BEHAVIOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinitionCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDocumentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENTATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDynamicValue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DYNAMIC_VALUE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGoalId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGroupingBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUPING_BEHAVIOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInput())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INPUT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutput())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTPUT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrecheckBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRECHECK_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrefix())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFIX] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelatedAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequiredBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getSelectionBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SELECTION_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTextEquivalent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT_EQUIVALENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTransform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRANSFORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTrigger())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TRIGGER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARDINALITY_BEHAVIOR])) { + $v = $this->getCardinalityBehavior(); + foreach($validationRules[self::FIELD_CARDINALITY_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_CARDINALITY_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARDINALITY_BEHAVIOR])) { + $errs[self::FIELD_CARDINALITY_BEHAVIOR] = []; + } + $errs[self::FIELD_CARDINALITY_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_CANONICAL])) { + $v = $this->getDefinitionCanonical(); + foreach($validationRules[self::FIELD_DEFINITION_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_DEFINITION_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_CANONICAL])) { + $errs[self::FIELD_DEFINITION_CANONICAL] = []; + } + $errs[self::FIELD_DEFINITION_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_URI])) { + $v = $this->getDefinitionUri(); + foreach($validationRules[self::FIELD_DEFINITION_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_DEFINITION_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_URI])) { + $errs[self::FIELD_DEFINITION_URI] = []; + } + $errs[self::FIELD_DEFINITION_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DYNAMIC_VALUE])) { + $v = $this->getDynamicValue(); + foreach($validationRules[self::FIELD_DYNAMIC_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_DYNAMIC_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DYNAMIC_VALUE])) { + $errs[self::FIELD_DYNAMIC_VALUE] = []; + } + $errs[self::FIELD_DYNAMIC_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL_ID])) { + $v = $this->getGoalId(); + foreach($validationRules[self::FIELD_GOAL_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_GOAL_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL_ID])) { + $errs[self::FIELD_GOAL_ID] = []; + } + $errs[self::FIELD_GOAL_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUPING_BEHAVIOR])) { + $v = $this->getGroupingBehavior(); + foreach($validationRules[self::FIELD_GROUPING_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_GROUPING_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUPING_BEHAVIOR])) { + $errs[self::FIELD_GROUPING_BEHAVIOR] = []; + } + $errs[self::FIELD_GROUPING_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INPUT])) { + $v = $this->getInput(); + foreach($validationRules[self::FIELD_INPUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_INPUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INPUT])) { + $errs[self::FIELD_INPUT] = []; + } + $errs[self::FIELD_INPUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTPUT])) { + $v = $this->getOutput(); + foreach($validationRules[self::FIELD_OUTPUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_OUTPUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTPUT])) { + $errs[self::FIELD_OUTPUT] = []; + } + $errs[self::FIELD_OUTPUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECHECK_BEHAVIOR])) { + $v = $this->getPrecheckBehavior(); + foreach($validationRules[self::FIELD_PRECHECK_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_PRECHECK_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECHECK_BEHAVIOR])) { + $errs[self::FIELD_PRECHECK_BEHAVIOR] = []; + } + $errs[self::FIELD_PRECHECK_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFIX])) { + $v = $this->getPrefix(); + foreach($validationRules[self::FIELD_PREFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_PREFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFIX])) { + $errs[self::FIELD_PREFIX] = []; + } + $errs[self::FIELD_PREFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ACTION])) { + $v = $this->getRelatedAction(); + foreach($validationRules[self::FIELD_RELATED_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_RELATED_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ACTION])) { + $errs[self::FIELD_RELATED_ACTION] = []; + } + $errs[self::FIELD_RELATED_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED_BEHAVIOR])) { + $v = $this->getRequiredBehavior(); + foreach($validationRules[self::FIELD_REQUIRED_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_REQUIRED_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED_BEHAVIOR])) { + $errs[self::FIELD_REQUIRED_BEHAVIOR] = []; + } + $errs[self::FIELD_REQUIRED_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SELECTION_BEHAVIOR])) { + $v = $this->getSelectionBehavior(); + foreach($validationRules[self::FIELD_SELECTION_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_SELECTION_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SELECTION_BEHAVIOR])) { + $errs[self::FIELD_SELECTION_BEHAVIOR] = []; + } + $errs[self::FIELD_SELECTION_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $v = $this->getSubjectCodeableConcept(); + foreach($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_SUBJECT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_REFERENCE])) { + $v = $this->getSubjectReference(); + foreach($validationRules[self::FIELD_SUBJECT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_SUBJECT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_REFERENCE])) { + $errs[self::FIELD_SUBJECT_REFERENCE] = []; + } + $errs[self::FIELD_SUBJECT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT_EQUIVALENT])) { + $v = $this->getTextEquivalent(); + foreach($validationRules[self::FIELD_TEXT_EQUIVALENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TEXT_EQUIVALENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT_EQUIVALENT])) { + $errs[self::FIELD_TEXT_EQUIVALENT] = []; + } + $errs[self::FIELD_TEXT_EQUIVALENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_AGE])) { + $v = $this->getTimingAge(); + foreach($validationRules[self::FIELD_TIMING_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_AGE])) { + $errs[self::FIELD_TIMING_AGE] = []; + } + $errs[self::FIELD_TIMING_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DURATION])) { + $v = $this->getTimingDuration(); + foreach($validationRules[self::FIELD_TIMING_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DURATION])) { + $errs[self::FIELD_TIMING_DURATION] = []; + } + $errs[self::FIELD_TIMING_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_RANGE])) { + $v = $this->getTimingRange(); + foreach($validationRules[self::FIELD_TIMING_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_RANGE])) { + $errs[self::FIELD_TIMING_RANGE] = []; + } + $errs[self::FIELD_TIMING_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRANSFORM])) { + $v = $this->getTransform(); + foreach($validationRules[self::FIELD_TRANSFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TRANSFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSFORM])) { + $errs[self::FIELD_TRANSFORM] = []; + } + $errs[self::FIELD_TRANSFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRIGGER])) { + $v = $this->getTrigger(); + foreach($validationRules[self::FIELD_TRIGGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TRIGGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRIGGER])) { + $errs[self::FIELD_TRIGGER] = []; + } + $errs[self::FIELD_TRIGGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php index b4cded95fb..3e24f87e67 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRPlanDefinitionCondition extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionCondition Constructor @@ -251,12 +251,97 @@ public function setKind(FHIRActionConditionKind $kind = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_CONDITION, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_CONDITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php index dcedc472bd..4557db360a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRPlanDefinitionDynamicValue extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.DynamicValue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionDynamicValue Constructor @@ -280,12 +280,97 @@ public function setPath($path = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php index aaec46fc7b..b008faba13 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -186,7 +186,7 @@ class FHIRPlanDefinitionGoal extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.Goal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionGoal Constructor @@ -629,12 +629,188 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAddresses())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESSES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDocumentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENTATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESSES])) { + $v = $this->getAddresses(); + foreach($validationRules[self::FIELD_ADDRESSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_ADDRESSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESSES])) { + $errs[self::FIELD_ADDRESSES] = []; + } + $errs[self::FIELD_ADDRESSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php index 9756165d23..34821d06d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRPlanDefinitionParticipant extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionParticipant Constructor @@ -245,12 +245,97 @@ public function setType(FHIRActionParticipantType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php index db32cbff58..520f4a3c58 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRPlanDefinitionRelatedAction extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.RelatedAction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionRelatedAction Constructor @@ -382,12 +382,131 @@ public function setRelationship(FHIRActionRelationshipType $relationship = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActionId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffsetDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION_ID])) { + $v = $this->getActionId(); + foreach($validationRules[self::FIELD_ACTION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_RELATED_ACTION, self::FIELD_ACTION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION_ID])) { + $errs[self::FIELD_ACTION_ID] = []; + } + $errs[self::FIELD_ACTION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET_DURATION])) { + $v = $this->getOffsetDuration(); + foreach($validationRules[self::FIELD_OFFSET_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_RELATED_ACTION, self::FIELD_OFFSET_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET_DURATION])) { + $errs[self::FIELD_OFFSET_DURATION] = []; + } + $errs[self::FIELD_OFFSET_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET_RANGE])) { + $v = $this->getOffsetRange(); + foreach($validationRules[self::FIELD_OFFSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_RELATED_ACTION, self::FIELD_OFFSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET_RANGE])) { + $errs[self::FIELD_OFFSET_RANGE] = []; + } + $errs[self::FIELD_OFFSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_RELATED_ACTION, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php index 484c5ceda9..abcb739a7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -172,7 +172,7 @@ class FHIRPlanDefinitionTarget extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionTarget Constructor @@ -440,12 +440,148 @@ public function setMeasure(FHIRCodeableConcept $measure = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetailCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAIL_CODEABLE_CONCEPT])) { + $v = $this->getDetailCodeableConcept(); + foreach($validationRules[self::FIELD_DETAIL_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_TARGET, self::FIELD_DETAIL_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_QUANTITY])) { + $v = $this->getDetailQuantity(); + foreach($validationRules[self::FIELD_DETAIL_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_TARGET, self::FIELD_DETAIL_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_QUANTITY])) { + $errs[self::FIELD_DETAIL_QUANTITY] = []; + } + $errs[self::FIELD_DETAIL_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_RANGE])) { + $v = $this->getDetailRange(); + foreach($validationRules[self::FIELD_DETAIL_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_TARGET, self::FIELD_DETAIL_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_RANGE])) { + $errs[self::FIELD_DETAIL_RANGE] = []; + } + $errs[self::FIELD_DETAIL_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DUE])) { + $v = $this->getDue(); + foreach($validationRules[self::FIELD_DUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_TARGET, self::FIELD_DUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DUE])) { + $errs[self::FIELD_DUE] = []; + } + $errs[self::FIELD_DUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASURE])) { + $v = $this->getMeasure(); + foreach($validationRules[self::FIELD_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_TARGET, self::FIELD_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASURE])) { + $errs[self::FIELD_MEASURE] = []; + } + $errs[self::FIELD_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPopulation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPopulation.php index 56087b3ce2..7fc2b3286c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPopulation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPopulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -153,7 +153,7 @@ class FHIRPopulation extends FHIRBackboneElement * Validation map for fields in type Population * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPopulation Constructor @@ -389,12 +389,148 @@ public function setRace(FHIRCodeableConcept $race = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgeCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAgeRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPhysiologicalCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHYSIOLOGICAL_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRace())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RACE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGE_CODEABLE_CONCEPT])) { + $v = $this->getAgeCodeableConcept(); + foreach($validationRules[self::FIELD_AGE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POPULATION, self::FIELD_AGE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AGE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AGE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGE_RANGE])) { + $v = $this->getAgeRange(); + foreach($validationRules[self::FIELD_AGE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POPULATION, self::FIELD_AGE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_RANGE])) { + $errs[self::FIELD_AGE_RANGE] = []; + } + $errs[self::FIELD_AGE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POPULATION, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHYSIOLOGICAL_CONDITION])) { + $v = $this->getPhysiologicalCondition(); + foreach($validationRules[self::FIELD_PHYSIOLOGICAL_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POPULATION, self::FIELD_PHYSIOLOGICAL_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHYSIOLOGICAL_CONDITION])) { + $errs[self::FIELD_PHYSIOLOGICAL_CONDITION] = []; + } + $errs[self::FIELD_PHYSIOLOGICAL_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RACE])) { + $v = $this->getRace(); + foreach($validationRules[self::FIELD_RACE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POPULATION, self::FIELD_RACE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RACE])) { + $errs[self::FIELD_RACE] = []; + } + $errs[self::FIELD_RACE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php index 0f97996525..9cf85cf15a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRPractitionerQualification extends FHIRBackboneElement * Validation map for fields in type Practitioner.Qualification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerQualification Constructor @@ -370,12 +370,133 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssuer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUER])) { + $v = $this->getIssuer(); + foreach($validationRules[self::FIELD_ISSUER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_ISSUER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUER])) { + $errs[self::FIELD_ISSUER] = []; + } + $errs[self::FIELD_ISSUER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php index 5db24f948f..acbbcda21c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRPractitionerRoleAvailableTime extends FHIRBackboneElement * Validation map for fields in type PractitionerRole.AvailableTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerRoleAvailableTime Constructor @@ -451,12 +451,133 @@ public function setDaysOfWeek(array $daysOfWeek = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllDay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALL_DAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailableEndTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABLE_END_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailableStartTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABLE_START_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDaysOfWeek())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DAYS_OF_WEEK, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALL_DAY])) { + $v = $this->getAllDay(); + foreach($validationRules[self::FIELD_ALL_DAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_AVAILABLE_TIME, self::FIELD_ALL_DAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALL_DAY])) { + $errs[self::FIELD_ALL_DAY] = []; + } + $errs[self::FIELD_ALL_DAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_END_TIME])) { + $v = $this->getAvailableEndTime(); + foreach($validationRules[self::FIELD_AVAILABLE_END_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_AVAILABLE_TIME, self::FIELD_AVAILABLE_END_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_END_TIME])) { + $errs[self::FIELD_AVAILABLE_END_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_END_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_START_TIME])) { + $v = $this->getAvailableStartTime(); + foreach($validationRules[self::FIELD_AVAILABLE_START_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_AVAILABLE_TIME, self::FIELD_AVAILABLE_START_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_START_TIME])) { + $errs[self::FIELD_AVAILABLE_START_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_START_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAYS_OF_WEEK])) { + $v = $this->getDaysOfWeek(); + foreach($validationRules[self::FIELD_DAYS_OF_WEEK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_AVAILABLE_TIME, self::FIELD_DAYS_OF_WEEK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAYS_OF_WEEK])) { + $errs[self::FIELD_DAYS_OF_WEEK] = []; + } + $errs[self::FIELD_DAYS_OF_WEEK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php index f6141a03f0..550a074fdf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRPractitionerRoleNotAvailable extends FHIRBackboneElement * Validation map for fields in type PractitionerRole.NotAvailable * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerRoleNotAvailable Constructor @@ -254,12 +254,97 @@ public function setDuring(FHIRPeriod $during = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuring())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_NOT_AVAILABLE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURING])) { + $v = $this->getDuring(); + foreach($validationRules[self::FIELD_DURING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_NOT_AVAILABLE, self::FIELD_DURING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURING])) { + $errs[self::FIELD_DURING] = []; + } + $errs[self::FIELD_DURING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php index f59379b1b5..f0e82bebcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRProcedureFocalDevice extends FHIRBackboneElement * Validation map for fields in type Procedure.FocalDevice * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureFocalDevice Constructor @@ -230,12 +230,97 @@ public function setManipulated(FHIRReference $manipulated = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getManipulated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANIPULATED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_FOCAL_DEVICE, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANIPULATED])) { + $v = $this->getManipulated(); + foreach($validationRules[self::FIELD_MANIPULATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_FOCAL_DEVICE, self::FIELD_MANIPULATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANIPULATED])) { + $errs[self::FIELD_MANIPULATED] = []; + } + $errs[self::FIELD_MANIPULATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php index 6820050f14..d16bca4bbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRProcedurePerformer extends FHIRBackboneElement * Validation map for fields in type Procedure.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedurePerformer Constructor @@ -282,12 +282,114 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getFunction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNCTION])) { + $v = $this->getFunction(); + foreach($validationRules[self::FIELD_FUNCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_PERFORMER, self::FIELD_FUNCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNCTION])) { + $errs[self::FIELD_FUNCTION] = []; + } + $errs[self::FIELD_FUNCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_PERFORMER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristic.php index dd3ec88f2a..c2b0574627 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -261,7 +261,7 @@ class FHIRProdCharacteristic extends FHIRBackboneElement * Validation map for fields in type ProdCharacteristic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProdCharacteristic Constructor @@ -972,12 +972,256 @@ public function setWidth(FHIRQuantity $width = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getColor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COLOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDepth())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEPTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getExternalDiameter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXTERNAL_DIAMETER] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeight())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEIGHT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getImage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImprint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPRINT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNominalVolume())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOMINAL_VOLUME] = $fieldErrs; + } + } + if (null !== ($v = $this->getScoring())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCORING] = $fieldErrs; + } + } + if (null !== ($v = $this->getShape())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SHAPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWeight())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WEIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getWidth())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WIDTH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COLOR])) { + $v = $this->getColor(); + foreach($validationRules[self::FIELD_COLOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_COLOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLOR])) { + $errs[self::FIELD_COLOR] = []; + } + $errs[self::FIELD_COLOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPTH])) { + $v = $this->getDepth(); + foreach($validationRules[self::FIELD_DEPTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_DEPTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPTH])) { + $errs[self::FIELD_DEPTH] = []; + } + $errs[self::FIELD_DEPTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTERNAL_DIAMETER])) { + $v = $this->getExternalDiameter(); + foreach($validationRules[self::FIELD_EXTERNAL_DIAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_EXTERNAL_DIAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTERNAL_DIAMETER])) { + $errs[self::FIELD_EXTERNAL_DIAMETER] = []; + } + $errs[self::FIELD_EXTERNAL_DIAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEIGHT])) { + $v = $this->getHeight(); + foreach($validationRules[self::FIELD_HEIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_HEIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEIGHT])) { + $errs[self::FIELD_HEIGHT] = []; + } + $errs[self::FIELD_HEIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGE])) { + $v = $this->getImage(); + foreach($validationRules[self::FIELD_IMAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_IMAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGE])) { + $errs[self::FIELD_IMAGE] = []; + } + $errs[self::FIELD_IMAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPRINT])) { + $v = $this->getImprint(); + foreach($validationRules[self::FIELD_IMPRINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_IMPRINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPRINT])) { + $errs[self::FIELD_IMPRINT] = []; + } + $errs[self::FIELD_IMPRINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOMINAL_VOLUME])) { + $v = $this->getNominalVolume(); + foreach($validationRules[self::FIELD_NOMINAL_VOLUME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_NOMINAL_VOLUME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOMINAL_VOLUME])) { + $errs[self::FIELD_NOMINAL_VOLUME] = []; + } + $errs[self::FIELD_NOMINAL_VOLUME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORING])) { + $v = $this->getScoring(); + foreach($validationRules[self::FIELD_SCORING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_SCORING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORING])) { + $errs[self::FIELD_SCORING] = []; + } + $errs[self::FIELD_SCORING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHAPE])) { + $v = $this->getShape(); + foreach($validationRules[self::FIELD_SHAPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_SHAPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHAPE])) { + $errs[self::FIELD_SHAPE] = []; + } + $errs[self::FIELD_SHAPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WEIGHT])) { + $v = $this->getWeight(); + foreach($validationRules[self::FIELD_WEIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_WEIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WEIGHT])) { + $errs[self::FIELD_WEIGHT] = []; + } + $errs[self::FIELD_WEIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WIDTH])) { + $v = $this->getWidth(); + foreach($validationRules[self::FIELD_WIDTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROD_CHARACTERISTIC, self::FIELD_WIDTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WIDTH])) { + $errs[self::FIELD_WIDTH] = []; + } + $errs[self::FIELD_WIDTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProductShelfLife.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProductShelfLife.php index 305baace8f..a315ed51f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProductShelfLife.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProductShelfLife.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -153,7 +153,7 @@ class FHIRProductShelfLife extends FHIRBackboneElement * Validation map for fields in type ProductShelfLife * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProductShelfLife Constructor @@ -412,12 +412,133 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecialPrecautionsForStorage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_PRECAUTIONS_FOR_STORAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRODUCT_SHELF_LIFE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRODUCT_SHELF_LIFE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_PRECAUTIONS_FOR_STORAGE])) { + $v = $this->getSpecialPrecautionsForStorage(); + foreach($validationRules[self::FIELD_SPECIAL_PRECAUTIONS_FOR_STORAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRODUCT_SHELF_LIFE, self::FIELD_SPECIAL_PRECAUTIONS_FOR_STORAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_PRECAUTIONS_FOR_STORAGE])) { + $errs[self::FIELD_SPECIAL_PRECAUTIONS_FOR_STORAGE] = []; + } + $errs[self::FIELD_SPECIAL_PRECAUTIONS_FOR_STORAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRODUCT_SHELF_LIFE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php index 42f581ec65..37cdf71701 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRProvenanceAgent extends FHIRBackboneElement * Validation map for fields in type Provenance.Agent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceAgent Constructor @@ -379,12 +379,133 @@ public function setWho(FHIRReference $who = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWho())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO])) { + $v = $this->getWho(); + foreach($validationRules[self::FIELD_WHO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_WHO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO])) { + $errs[self::FIELD_WHO] = []; + } + $errs[self::FIELD_WHO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php index af7553e663..07352e50a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRProvenanceEntity extends FHIRBackboneElement * Validation map for fields in type Provenance.Entity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceEntity Constructor @@ -372,12 +372,116 @@ public function setWhat(FHIRReference $what = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHAT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHAT])) { + $v = $this->getWhat(); + foreach($validationRules[self::FIELD_WHAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_WHAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHAT])) { + $errs[self::FIELD_WHAT] = []; + } + $errs[self::FIELD_WHAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOption.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOption.php index 62f14de746..c06f4b26a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOption.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOption.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -188,7 +188,7 @@ class FHIRQuestionnaireAnswerOption extends FHIRBackboneElement * Validation map for fields in type Questionnaire.AnswerOption * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireAnswerOption Constructor @@ -620,12 +620,182 @@ public function setValueTime($valueTime = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getInitialSelected())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_SELECTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INITIAL_SELECTED])) { + $v = $this->getInitialSelected(); + foreach($validationRules[self::FIELD_INITIAL_SELECTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ANSWER_OPTION, self::FIELD_INITIAL_SELECTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_SELECTED])) { + $errs[self::FIELD_INITIAL_SELECTED] = []; + } + $errs[self::FIELD_INITIAL_SELECTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ANSWER_OPTION, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ANSWER_OPTION, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ANSWER_OPTION, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ANSWER_OPTION, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ANSWER_OPTION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ANSWER_OPTION, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php index 8dfb020946..68a670c79b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -265,7 +265,7 @@ class FHIRQuestionnaireEnableWhen extends FHIRBackboneElement * Validation map for fields in type Questionnaire.EnableWhen * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireEnableWhen Constructor @@ -988,12 +988,267 @@ public function setQuestion($question = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAnswerBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuestion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ANSWER_BOOLEAN])) { + $v = $this->getAnswerBoolean(); + foreach($validationRules[self::FIELD_ANSWER_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_BOOLEAN])) { + $errs[self::FIELD_ANSWER_BOOLEAN] = []; + } + $errs[self::FIELD_ANSWER_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_CODING])) { + $v = $this->getAnswerCoding(); + foreach($validationRules[self::FIELD_ANSWER_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_CODING])) { + $errs[self::FIELD_ANSWER_CODING] = []; + } + $errs[self::FIELD_ANSWER_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_DATE])) { + $v = $this->getAnswerDate(); + foreach($validationRules[self::FIELD_ANSWER_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_DATE])) { + $errs[self::FIELD_ANSWER_DATE] = []; + } + $errs[self::FIELD_ANSWER_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_DATE_TIME])) { + $v = $this->getAnswerDateTime(); + foreach($validationRules[self::FIELD_ANSWER_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_DATE_TIME])) { + $errs[self::FIELD_ANSWER_DATE_TIME] = []; + } + $errs[self::FIELD_ANSWER_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_DECIMAL])) { + $v = $this->getAnswerDecimal(); + foreach($validationRules[self::FIELD_ANSWER_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_DECIMAL])) { + $errs[self::FIELD_ANSWER_DECIMAL] = []; + } + $errs[self::FIELD_ANSWER_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_INTEGER])) { + $v = $this->getAnswerInteger(); + foreach($validationRules[self::FIELD_ANSWER_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_INTEGER])) { + $errs[self::FIELD_ANSWER_INTEGER] = []; + } + $errs[self::FIELD_ANSWER_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_QUANTITY])) { + $v = $this->getAnswerQuantity(); + foreach($validationRules[self::FIELD_ANSWER_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_QUANTITY])) { + $errs[self::FIELD_ANSWER_QUANTITY] = []; + } + $errs[self::FIELD_ANSWER_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_REFERENCE])) { + $v = $this->getAnswerReference(); + foreach($validationRules[self::FIELD_ANSWER_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_REFERENCE])) { + $errs[self::FIELD_ANSWER_REFERENCE] = []; + } + $errs[self::FIELD_ANSWER_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_STRING])) { + $v = $this->getAnswerString(); + foreach($validationRules[self::FIELD_ANSWER_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_STRING])) { + $errs[self::FIELD_ANSWER_STRING] = []; + } + $errs[self::FIELD_ANSWER_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_TIME])) { + $v = $this->getAnswerTime(); + foreach($validationRules[self::FIELD_ANSWER_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_TIME])) { + $errs[self::FIELD_ANSWER_TIME] = []; + } + $errs[self::FIELD_ANSWER_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATOR])) { + $v = $this->getOperator(); + foreach($validationRules[self::FIELD_OPERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_OPERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATOR])) { + $errs[self::FIELD_OPERATOR] = []; + } + $errs[self::FIELD_OPERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUESTION])) { + $v = $this->getQuestion(); + foreach($validationRules[self::FIELD_QUESTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_QUESTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUESTION])) { + $errs[self::FIELD_QUESTION] = []; + } + $errs[self::FIELD_QUESTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitial.php index 8ccfc28346..96f56af312 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -267,7 +267,7 @@ class FHIRQuestionnaireInitial extends FHIRBackboneElement * Validation map for fields in type Questionnaire.Initial * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireInitial Constructor @@ -978,12 +978,267 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_INITIAL, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php index cde8f9f361..106f76f1be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -320,7 +320,7 @@ class FHIRQuestionnaireItem extends FHIRBackboneElement * Validation map for fields in type Questionnaire.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireItem Constructor @@ -1435,12 +1435,345 @@ public function setType(FHIRQuestionnaireItemType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAnswerOption())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ANSWER_OPTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAnswerValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_VALUE_SET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnableBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENABLE_BEHAVIOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEnableWhen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENABLE_WHEN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInitial())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INITIAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_LENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrefix())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFIX] = $fieldErrs; + } + } + if (null !== ($v = $this->getReadOnly())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_READ_ONLY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRepeats())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPEATS] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ANSWER_OPTION])) { + $v = $this->getAnswerOption(); + foreach($validationRules[self::FIELD_ANSWER_OPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_ANSWER_OPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_OPTION])) { + $errs[self::FIELD_ANSWER_OPTION] = []; + } + $errs[self::FIELD_ANSWER_OPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_VALUE_SET])) { + $v = $this->getAnswerValueSet(); + foreach($validationRules[self::FIELD_ANSWER_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_ANSWER_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_VALUE_SET])) { + $errs[self::FIELD_ANSWER_VALUE_SET] = []; + } + $errs[self::FIELD_ANSWER_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENABLE_BEHAVIOR])) { + $v = $this->getEnableBehavior(); + foreach($validationRules[self::FIELD_ENABLE_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_ENABLE_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENABLE_BEHAVIOR])) { + $errs[self::FIELD_ENABLE_BEHAVIOR] = []; + } + $errs[self::FIELD_ENABLE_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENABLE_WHEN])) { + $v = $this->getEnableWhen(); + foreach($validationRules[self::FIELD_ENABLE_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_ENABLE_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENABLE_WHEN])) { + $errs[self::FIELD_ENABLE_WHEN] = []; + } + $errs[self::FIELD_ENABLE_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL])) { + $v = $this->getInitial(); + foreach($validationRules[self::FIELD_INITIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL])) { + $errs[self::FIELD_INITIAL] = []; + } + $errs[self::FIELD_INITIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_LENGTH])) { + $v = $this->getMaxLength(); + foreach($validationRules[self::FIELD_MAX_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_MAX_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_LENGTH])) { + $errs[self::FIELD_MAX_LENGTH] = []; + } + $errs[self::FIELD_MAX_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFIX])) { + $v = $this->getPrefix(); + foreach($validationRules[self::FIELD_PREFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_PREFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFIX])) { + $errs[self::FIELD_PREFIX] = []; + } + $errs[self::FIELD_PREFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_READ_ONLY])) { + $v = $this->getReadOnly(); + foreach($validationRules[self::FIELD_READ_ONLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_READ_ONLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_READ_ONLY])) { + $errs[self::FIELD_READ_ONLY] = []; + } + $errs[self::FIELD_READ_ONLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEATS])) { + $v = $this->getRepeats(); + foreach($validationRules[self::FIELD_REPEATS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_REPEATS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEATS])) { + $errs[self::FIELD_REPEATS] = []; + } + $errs[self::FIELD_REPEATS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED])) { + $v = $this->getRequired(); + foreach($validationRules[self::FIELD_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED])) { + $errs[self::FIELD_REQUIRED] = []; + } + $errs[self::FIELD_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php index 25a56a13af..0b8b1f493a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -279,7 +279,7 @@ class FHIRQuestionnaireResponseAnswer extends FHIRBackboneElement * Validation map for fields in type QuestionnaireResponse.Answer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponseAnswer Constructor @@ -1064,12 +1064,286 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php index 122fc5e5a2..8faa5b332d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -154,7 +154,7 @@ class FHIRQuestionnaireResponseItem extends FHIRBackboneElement * Validation map for fields in type QuestionnaireResponse.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponseItem Constructor @@ -532,12 +532,152 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAnswer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ANSWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ANSWER])) { + $v = $this->getAnswer(); + foreach($validationRules[self::FIELD_ANSWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_ANSWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER])) { + $errs[self::FIELD_ANSWER] = []; + } + $errs[self::FIELD_ANSWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunication.php index f2965e85d7..4514fec40d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRRelatedPersonCommunication extends FHIRBackboneElement * Validation map for fields in type RelatedPerson.Communication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRelatedPersonCommunication Constructor @@ -264,12 +264,97 @@ public function setPreferred($preferred = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreferred())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFERRED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON_DOT_COMMUNICATION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFERRED])) { + $v = $this->getPreferred(); + foreach($validationRules[self::FIELD_PREFERRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON_DOT_COMMUNICATION, self::FIELD_PREFERRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFERRED])) { + $errs[self::FIELD_PREFERRED] = []; + } + $errs[self::FIELD_PREFERRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php index 6eb177011e..5fbacaff8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -417,7 +417,7 @@ class FHIRRequestGroupAction extends FHIRBackboneElement * Validation map for fields in type RequestGroup.Action * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestGroupAction Constructor @@ -1822,12 +1822,483 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCardinalityBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARDINALITY_BEHAVIOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDocumentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENTATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGroupingBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUPING_BEHAVIOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrecheckBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRECHECK_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrefix())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFIX] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequiredBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSelectionBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SELECTION_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getTextEquivalent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT_EQUIVALENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARDINALITY_BEHAVIOR])) { + $v = $this->getCardinalityBehavior(); + foreach($validationRules[self::FIELD_CARDINALITY_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_CARDINALITY_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARDINALITY_BEHAVIOR])) { + $errs[self::FIELD_CARDINALITY_BEHAVIOR] = []; + } + $errs[self::FIELD_CARDINALITY_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUPING_BEHAVIOR])) { + $v = $this->getGroupingBehavior(); + foreach($validationRules[self::FIELD_GROUPING_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_GROUPING_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUPING_BEHAVIOR])) { + $errs[self::FIELD_GROUPING_BEHAVIOR] = []; + } + $errs[self::FIELD_GROUPING_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECHECK_BEHAVIOR])) { + $v = $this->getPrecheckBehavior(); + foreach($validationRules[self::FIELD_PRECHECK_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_PRECHECK_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECHECK_BEHAVIOR])) { + $errs[self::FIELD_PRECHECK_BEHAVIOR] = []; + } + $errs[self::FIELD_PRECHECK_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFIX])) { + $v = $this->getPrefix(); + foreach($validationRules[self::FIELD_PREFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_PREFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFIX])) { + $errs[self::FIELD_PREFIX] = []; + } + $errs[self::FIELD_PREFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ACTION])) { + $v = $this->getRelatedAction(); + foreach($validationRules[self::FIELD_RELATED_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_RELATED_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ACTION])) { + $errs[self::FIELD_RELATED_ACTION] = []; + } + $errs[self::FIELD_RELATED_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED_BEHAVIOR])) { + $v = $this->getRequiredBehavior(); + foreach($validationRules[self::FIELD_REQUIRED_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_REQUIRED_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED_BEHAVIOR])) { + $errs[self::FIELD_REQUIRED_BEHAVIOR] = []; + } + $errs[self::FIELD_REQUIRED_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SELECTION_BEHAVIOR])) { + $v = $this->getSelectionBehavior(); + foreach($validationRules[self::FIELD_SELECTION_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_SELECTION_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SELECTION_BEHAVIOR])) { + $errs[self::FIELD_SELECTION_BEHAVIOR] = []; + } + $errs[self::FIELD_SELECTION_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT_EQUIVALENT])) { + $v = $this->getTextEquivalent(); + foreach($validationRules[self::FIELD_TEXT_EQUIVALENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TEXT_EQUIVALENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT_EQUIVALENT])) { + $errs[self::FIELD_TEXT_EQUIVALENT] = []; + } + $errs[self::FIELD_TEXT_EQUIVALENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_AGE])) { + $v = $this->getTimingAge(); + foreach($validationRules[self::FIELD_TIMING_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_AGE])) { + $errs[self::FIELD_TIMING_AGE] = []; + } + $errs[self::FIELD_TIMING_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DURATION])) { + $v = $this->getTimingDuration(); + foreach($validationRules[self::FIELD_TIMING_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DURATION])) { + $errs[self::FIELD_TIMING_DURATION] = []; + } + $errs[self::FIELD_TIMING_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_RANGE])) { + $v = $this->getTimingRange(); + foreach($validationRules[self::FIELD_TIMING_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_RANGE])) { + $errs[self::FIELD_TIMING_RANGE] = []; + } + $errs[self::FIELD_TIMING_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php index 4525b96ee0..c6e2467ea3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRRequestGroupCondition extends FHIRBackboneElement * Validation map for fields in type RequestGroup.Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestGroupCondition Constructor @@ -249,12 +249,97 @@ public function setKind(FHIRActionConditionKind $kind = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_CONDITION, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_CONDITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php index 959dd712dd..7744d3c605 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRRequestGroupRelatedAction extends FHIRBackboneElement * Validation map for fields in type RequestGroup.RelatedAction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestGroupRelatedAction Constructor @@ -380,12 +380,131 @@ public function setRelationship(FHIRActionRelationshipType $relationship = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActionId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffsetDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION_ID])) { + $v = $this->getActionId(); + foreach($validationRules[self::FIELD_ACTION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_RELATED_ACTION, self::FIELD_ACTION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION_ID])) { + $errs[self::FIELD_ACTION_ID] = []; + } + $errs[self::FIELD_ACTION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET_DURATION])) { + $v = $this->getOffsetDuration(); + foreach($validationRules[self::FIELD_OFFSET_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_RELATED_ACTION, self::FIELD_OFFSET_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET_DURATION])) { + $errs[self::FIELD_OFFSET_DURATION] = []; + } + $errs[self::FIELD_OFFSET_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET_RANGE])) { + $v = $this->getOffsetRange(); + foreach($validationRules[self::FIELD_OFFSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_RELATED_ACTION, self::FIELD_OFFSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET_RANGE])) { + $errs[self::FIELD_OFFSET_RANGE] = []; + } + $errs[self::FIELD_OFFSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_RELATED_ACTION, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristic.php index e6cc7cd053..6db0ea0cdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -398,7 +398,7 @@ class FHIRResearchElementDefinitionCharacteristic extends FHIRBackboneElement * Validation map for fields in type ResearchElementDefinition.Characteristic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchElementDefinitionCharacteristic Constructor @@ -1515,12 +1515,422 @@ public function setUsageContext(array $usageContext = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinitionCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExclude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectiveDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectiveDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectiveGroupMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectiveTimeFromStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIME_FROM_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipantEffectiveTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudyEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudyEffectiveDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudyEffectiveDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY_EFFECTIVE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudyEffectiveGroupMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudyEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudyEffectiveTimeFromStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY_EFFECTIVE_TIME_FROM_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudyEffectiveTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY_EFFECTIVE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitOfMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_OF_MEASURE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUsageContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USAGE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_CANONICAL])) { + $v = $this->getDefinitionCanonical(); + foreach($validationRules[self::FIELD_DEFINITION_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_DEFINITION_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_CANONICAL])) { + $errs[self::FIELD_DEFINITION_CANONICAL] = []; + } + $errs[self::FIELD_DEFINITION_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_CODEABLE_CONCEPT])) { + $v = $this->getDefinitionCodeableConcept(); + foreach($validationRules[self::FIELD_DEFINITION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_DEFINITION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DEFINITION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DEFINITION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_DATA_REQUIREMENT])) { + $v = $this->getDefinitionDataRequirement(); + foreach($validationRules[self::FIELD_DEFINITION_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_DEFINITION_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_DATA_REQUIREMENT])) { + $errs[self::FIELD_DEFINITION_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_DEFINITION_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_EXPRESSION])) { + $v = $this->getDefinitionExpression(); + foreach($validationRules[self::FIELD_DEFINITION_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_DEFINITION_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_EXPRESSION])) { + $errs[self::FIELD_DEFINITION_EXPRESSION] = []; + } + $errs[self::FIELD_DEFINITION_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { + $v = $this->getParticipantEffectiveDateTime(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION])) { + $v = $this->getParticipantEffectiveDescription(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION])) { + $v = $this->getParticipantEffectiveDuration(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE])) { + $v = $this->getParticipantEffectiveGroupMeasure(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD])) { + $v = $this->getParticipantEffectivePeriod(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_TIME_FROM_START])) { + $v = $this->getParticipantEffectiveTimeFromStart(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_TIME_FROM_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_TIME_FROM_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIME_FROM_START])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIME_FROM_START] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIME_FROM_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING])) { + $v = $this->getParticipantEffectiveTiming(); + foreach($validationRules[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_PARTICIPANT_EFFECTIVE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING])) { + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING] = []; + } + $errs[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY_EFFECTIVE_DATE_TIME])) { + $v = $this->getStudyEffectiveDateTime(); + foreach($validationRules[self::FIELD_STUDY_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_STUDY_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_STUDY_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_STUDY_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION])) { + $v = $this->getStudyEffectiveDescription(); + foreach($validationRules[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_STUDY_EFFECTIVE_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION])) { + $errs[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION] = []; + } + $errs[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY_EFFECTIVE_DURATION])) { + $v = $this->getStudyEffectiveDuration(); + foreach($validationRules[self::FIELD_STUDY_EFFECTIVE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_STUDY_EFFECTIVE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY_EFFECTIVE_DURATION])) { + $errs[self::FIELD_STUDY_EFFECTIVE_DURATION] = []; + } + $errs[self::FIELD_STUDY_EFFECTIVE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE])) { + $v = $this->getStudyEffectiveGroupMeasure(); + foreach($validationRules[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE])) { + $errs[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE] = []; + } + $errs[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY_EFFECTIVE_PERIOD])) { + $v = $this->getStudyEffectivePeriod(); + foreach($validationRules[self::FIELD_STUDY_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_STUDY_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_STUDY_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_STUDY_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY_EFFECTIVE_TIME_FROM_START])) { + $v = $this->getStudyEffectiveTimeFromStart(); + foreach($validationRules[self::FIELD_STUDY_EFFECTIVE_TIME_FROM_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_STUDY_EFFECTIVE_TIME_FROM_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY_EFFECTIVE_TIME_FROM_START])) { + $errs[self::FIELD_STUDY_EFFECTIVE_TIME_FROM_START] = []; + } + $errs[self::FIELD_STUDY_EFFECTIVE_TIME_FROM_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY_EFFECTIVE_TIMING])) { + $v = $this->getStudyEffectiveTiming(); + foreach($validationRules[self::FIELD_STUDY_EFFECTIVE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_STUDY_EFFECTIVE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY_EFFECTIVE_TIMING])) { + $errs[self::FIELD_STUDY_EFFECTIVE_TIMING] = []; + } + $errs[self::FIELD_STUDY_EFFECTIVE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_OF_MEASURE])) { + $v = $this->getUnitOfMeasure(); + foreach($validationRules[self::FIELD_UNIT_OF_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_UNIT_OF_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_OF_MEASURE])) { + $errs[self::FIELD_UNIT_OF_MEASURE] = []; + } + $errs[self::FIELD_UNIT_OF_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE_CONTEXT])) { + $v = $this->getUsageContext(); + foreach($validationRules[self::FIELD_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION_DOT_CHARACTERISTIC, self::FIELD_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE_CONTEXT])) { + $errs[self::FIELD_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php index 6547d58cf2..26559c909b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRResearchStudyArm extends FHIRBackboneElement * Validation map for fields in type ResearchStudy.Arm * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchStudyArm Constructor @@ -338,12 +338,114 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_DOT_ARM, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_DOT_ARM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_DOT_ARM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjective.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjective.php index 5c6914fcab..6df169343f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjective.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjective.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRResearchStudyObjective extends FHIRBackboneElement * Validation map for fields in type ResearchStudy.Objective * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchStudyObjective Constructor @@ -258,12 +258,97 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_DOT_OBJECTIVE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_DOT_OBJECTIVE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php index 00a9d3cefd..8b23e10239 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -202,7 +202,7 @@ class FHIRRiskAssessmentPrediction extends FHIRBackboneElement * Validation map for fields in type RiskAssessment.Prediction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskAssessmentPrediction Constructor @@ -637,12 +637,199 @@ public function setWhenRange(FHIRRange $whenRange = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getProbabilityDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROBABILITY_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getProbabilityRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROBABILITY_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQualitativeRisk())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUALITATIVE_RISK] = $fieldErrs; + } + } + if (null !== ($v = $this->getRationale())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATIONALE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelativeRisk())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIVE_RISK] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROBABILITY_DECIMAL])) { + $v = $this->getProbabilityDecimal(); + foreach($validationRules[self::FIELD_PROBABILITY_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_PROBABILITY_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROBABILITY_DECIMAL])) { + $errs[self::FIELD_PROBABILITY_DECIMAL] = []; + } + $errs[self::FIELD_PROBABILITY_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROBABILITY_RANGE])) { + $v = $this->getProbabilityRange(); + foreach($validationRules[self::FIELD_PROBABILITY_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_PROBABILITY_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROBABILITY_RANGE])) { + $errs[self::FIELD_PROBABILITY_RANGE] = []; + } + $errs[self::FIELD_PROBABILITY_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALITATIVE_RISK])) { + $v = $this->getQualitativeRisk(); + foreach($validationRules[self::FIELD_QUALITATIVE_RISK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_QUALITATIVE_RISK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALITATIVE_RISK])) { + $errs[self::FIELD_QUALITATIVE_RISK] = []; + } + $errs[self::FIELD_QUALITATIVE_RISK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATIONALE])) { + $v = $this->getRationale(); + foreach($validationRules[self::FIELD_RATIONALE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_RATIONALE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATIONALE])) { + $errs[self::FIELD_RATIONALE] = []; + } + $errs[self::FIELD_RATIONALE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIVE_RISK])) { + $v = $this->getRelativeRisk(); + foreach($validationRules[self::FIELD_RELATIVE_RISK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_RELATIVE_RISK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIVE_RISK])) { + $errs[self::FIELD_RELATIVE_RISK] = []; + } + $errs[self::FIELD_RELATIVE_RISK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_PERIOD])) { + $v = $this->getWhenPeriod(); + foreach($validationRules[self::FIELD_WHEN_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_WHEN_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_PERIOD])) { + $errs[self::FIELD_WHEN_PERIOD] = []; + } + $errs[self::FIELD_WHEN_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_RANGE])) { + $v = $this->getWhenRange(); + foreach($validationRules[self::FIELD_WHEN_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_WHEN_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_RANGE])) { + $errs[self::FIELD_WHEN_RANGE] = []; + } + $errs[self::FIELD_WHEN_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertainty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertainty.php index 761c0c7b1b..bc8cfd7b99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertainty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertainty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRRiskEvidenceSynthesisCertainty extends FHIRBackboneElement * Validation map for fields in type RiskEvidenceSynthesis.Certainty * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskEvidenceSynthesisCertainty Constructor @@ -395,12 +395,120 @@ public function setRating(array $rating = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCertaintySubcomponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CERTAINTY_SUBCOMPONENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRating())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RATING, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CERTAINTY_SUBCOMPONENT])) { + $v = $this->getCertaintySubcomponent(); + foreach($validationRules[self::FIELD_CERTAINTY_SUBCOMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_CERTAINTY, self::FIELD_CERTAINTY_SUBCOMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CERTAINTY_SUBCOMPONENT])) { + $errs[self::FIELD_CERTAINTY_SUBCOMPONENT] = []; + } + $errs[self::FIELD_CERTAINTY_SUBCOMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_CERTAINTY, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATING])) { + $v = $this->getRating(); + foreach($validationRules[self::FIELD_RATING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_CERTAINTY, self::FIELD_RATING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATING])) { + $errs[self::FIELD_RATING] = []; + } + $errs[self::FIELD_RATING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponent.php index 433198354f..e37d011199 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRRiskEvidenceSynthesisCertaintySubcomponent extends FHIRBackboneElement * Validation map for fields in type RiskEvidenceSynthesis.CertaintySubcomponent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskEvidenceSynthesisCertaintySubcomponent Constructor @@ -361,12 +361,118 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRating())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RATING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_CERTAINTY_SUBCOMPONENT, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATING])) { + $v = $this->getRating(); + foreach($validationRules[self::FIELD_RATING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_CERTAINTY_SUBCOMPONENT, self::FIELD_RATING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATING])) { + $errs[self::FIELD_RATING] = []; + } + $errs[self::FIELD_RATING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_CERTAINTY_SUBCOMPONENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimate.php index 834848ebcb..47b41b133b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRRiskEvidenceSynthesisPrecisionEstimate extends FHIRBackboneElement * Validation map for fields in type RiskEvidenceSynthesis.PrecisionEstimate * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskEvidenceSynthesisPrecisionEstimate Constructor @@ -412,12 +412,131 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFrom())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FROM] = $fieldErrs; + } + } + if (null !== ($v = $this->getLevel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LEVEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getTo())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TO] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FROM])) { + $v = $this->getFrom(); + foreach($validationRules[self::FIELD_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_PRECISION_ESTIMATE, self::FIELD_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FROM])) { + $errs[self::FIELD_FROM] = []; + } + $errs[self::FIELD_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEVEL])) { + $v = $this->getLevel(); + foreach($validationRules[self::FIELD_LEVEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_PRECISION_ESTIMATE, self::FIELD_LEVEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEVEL])) { + $errs[self::FIELD_LEVEL] = []; + } + $errs[self::FIELD_LEVEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TO])) { + $v = $this->getTo(); + foreach($validationRules[self::FIELD_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_PRECISION_ESTIMATE, self::FIELD_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TO])) { + $errs[self::FIELD_TO] = []; + } + $errs[self::FIELD_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_PRECISION_ESTIMATE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimate.php index ef5f0e4292..c89903a75c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -181,7 +181,7 @@ class FHIRRiskEvidenceSynthesisRiskEstimate extends FHIRBackboneElement * Validation map for fields in type RiskEvidenceSynthesis.RiskEstimate * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskEvidenceSynthesisRiskEstimate Constructor @@ -620,12 +620,184 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDenominatorCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DENOMINATOR_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumeratorCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMERATOR_COUNT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrecisionEstimate())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRECISION_ESTIMATE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitOfMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_OF_MEASURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DENOMINATOR_COUNT])) { + $v = $this->getDenominatorCount(); + foreach($validationRules[self::FIELD_DENOMINATOR_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_RISK_ESTIMATE, self::FIELD_DENOMINATOR_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DENOMINATOR_COUNT])) { + $errs[self::FIELD_DENOMINATOR_COUNT] = []; + } + $errs[self::FIELD_DENOMINATOR_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_RISK_ESTIMATE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMERATOR_COUNT])) { + $v = $this->getNumeratorCount(); + foreach($validationRules[self::FIELD_NUMERATOR_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_RISK_ESTIMATE, self::FIELD_NUMERATOR_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMERATOR_COUNT])) { + $errs[self::FIELD_NUMERATOR_COUNT] = []; + } + $errs[self::FIELD_NUMERATOR_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECISION_ESTIMATE])) { + $v = $this->getPrecisionEstimate(); + foreach($validationRules[self::FIELD_PRECISION_ESTIMATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_RISK_ESTIMATE, self::FIELD_PRECISION_ESTIMATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECISION_ESTIMATE])) { + $errs[self::FIELD_PRECISION_ESTIMATE] = []; + } + $errs[self::FIELD_PRECISION_ESTIMATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_RISK_ESTIMATE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_OF_MEASURE])) { + $v = $this->getUnitOfMeasure(); + foreach($validationRules[self::FIELD_UNIT_OF_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_RISK_ESTIMATE, self::FIELD_UNIT_OF_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_OF_MEASURE])) { + $errs[self::FIELD_UNIT_OF_MEASURE] = []; + } + $errs[self::FIELD_UNIT_OF_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_RISK_ESTIMATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSize.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSize.php index dffc37086c..e2b7549460 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSize.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSize.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRRiskEvidenceSynthesisSampleSize extends FHIRBackboneElement * Validation map for fields in type RiskEvidenceSynthesis.SampleSize * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskEvidenceSynthesisSampleSize Constructor @@ -351,12 +351,114 @@ public function setNumberOfStudies($numberOfStudies = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfParticipants())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_PARTICIPANTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfStudies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_STUDIES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_SAMPLE_SIZE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_PARTICIPANTS])) { + $v = $this->getNumberOfParticipants(); + foreach($validationRules[self::FIELD_NUMBER_OF_PARTICIPANTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_SAMPLE_SIZE, self::FIELD_NUMBER_OF_PARTICIPANTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_PARTICIPANTS])) { + $errs[self::FIELD_NUMBER_OF_PARTICIPANTS] = []; + } + $errs[self::FIELD_NUMBER_OF_PARTICIPANTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_STUDIES])) { + $v = $this->getNumberOfStudies(); + foreach($validationRules[self::FIELD_NUMBER_OF_STUDIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS_DOT_SAMPLE_SIZE, self::FIELD_NUMBER_OF_STUDIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_STUDIES])) { + $errs[self::FIELD_NUMBER_OF_STUDIES] = []; + } + $errs[self::FIELD_NUMBER_OF_STUDIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php index b66441d83b..2bffdedf05 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRSearchParameterComponent extends FHIRBackboneElement * Validation map for fields in type SearchParameter.Component * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchParameterComponent Constructor @@ -282,12 +282,97 @@ public function setExpression($expression = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER_DOT_COMPONENT, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER_DOT_COMPONENT, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php index 98adbe249b..77407d20e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -216,7 +216,7 @@ class FHIRSpecimenCollection extends FHIRBackboneElement * Validation map for fields in type Specimen.Collection * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenCollection Constructor @@ -648,12 +648,216 @@ public function setQuantity(FHIRQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollectedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollectedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollector())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFastingStatusCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FASTING_STATUS_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFastingStatusDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FASTING_STATUS_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTED_DATE_TIME])) { + $v = $this->getCollectedDateTime(); + foreach($validationRules[self::FIELD_COLLECTED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTED_DATE_TIME])) { + $errs[self::FIELD_COLLECTED_DATE_TIME] = []; + } + $errs[self::FIELD_COLLECTED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTED_PERIOD])) { + $v = $this->getCollectedPeriod(); + foreach($validationRules[self::FIELD_COLLECTED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTED_PERIOD])) { + $errs[self::FIELD_COLLECTED_PERIOD] = []; + } + $errs[self::FIELD_COLLECTED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTOR])) { + $v = $this->getCollector(); + foreach($validationRules[self::FIELD_COLLECTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTOR])) { + $errs[self::FIELD_COLLECTOR] = []; + } + $errs[self::FIELD_COLLECTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FASTING_STATUS_CODEABLE_CONCEPT])) { + $v = $this->getFastingStatusCodeableConcept(); + foreach($validationRules[self::FIELD_FASTING_STATUS_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_FASTING_STATUS_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FASTING_STATUS_CODEABLE_CONCEPT])) { + $errs[self::FIELD_FASTING_STATUS_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_FASTING_STATUS_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FASTING_STATUS_DURATION])) { + $v = $this->getFastingStatusDuration(); + foreach($validationRules[self::FIELD_FASTING_STATUS_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_FASTING_STATUS_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FASTING_STATUS_DURATION])) { + $errs[self::FIELD_FASTING_STATUS_DURATION] = []; + } + $errs[self::FIELD_FASTING_STATUS_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php index d4180cb8cc..0be2d98a30 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -186,7 +186,7 @@ class FHIRSpecimenContainer extends FHIRBackboneElement * Validation map for fields in type Specimen.Container * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenContainer Constructor @@ -574,12 +574,184 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditiveCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdditiveReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCapacity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAPACITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecimenQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_CODEABLE_CONCEPT])) { + $v = $this->getAdditiveCodeableConcept(); + foreach($validationRules[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_ADDITIVE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_REFERENCE])) { + $v = $this->getAdditiveReference(); + foreach($validationRules[self::FIELD_ADDITIVE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_ADDITIVE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_REFERENCE])) { + $errs[self::FIELD_ADDITIVE_REFERENCE] = []; + } + $errs[self::FIELD_ADDITIVE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAPACITY])) { + $v = $this->getCapacity(); + foreach($validationRules[self::FIELD_CAPACITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_CAPACITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPACITY])) { + $errs[self::FIELD_CAPACITY] = []; + } + $errs[self::FIELD_CAPACITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN_QUANTITY])) { + $v = $this->getSpecimenQuantity(); + foreach($validationRules[self::FIELD_SPECIMEN_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_SPECIMEN_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN_QUANTITY])) { + $errs[self::FIELD_SPECIMEN_QUANTITY] = []; + } + $errs[self::FIELD_SPECIMEN_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php index 84b399e927..1496375013 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -159,7 +159,7 @@ class FHIRSpecimenProcessing extends FHIRBackboneElement * Validation map for fields in type Specimen.Processing * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenProcessing Constructor @@ -486,12 +486,150 @@ public function setTimePeriod(FHIRPeriod $timePeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdditive())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIVE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimeDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE])) { + $v = $this->getAdditive(); + foreach($validationRules[self::FIELD_ADDITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_PROCESSING, self::FIELD_ADDITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE])) { + $errs[self::FIELD_ADDITIVE] = []; + } + $errs[self::FIELD_ADDITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_PROCESSING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_PROCESSING, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_DATE_TIME])) { + $v = $this->getTimeDateTime(); + foreach($validationRules[self::FIELD_TIME_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_PROCESSING, self::FIELD_TIME_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_DATE_TIME])) { + $errs[self::FIELD_TIME_DATE_TIME] = []; + } + $errs[self::FIELD_TIME_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_PERIOD])) { + $v = $this->getTimePeriod(); + foreach($validationRules[self::FIELD_TIME_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_PROCESSING, self::FIELD_TIME_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_PERIOD])) { + $errs[self::FIELD_TIME_PERIOD] = []; + } + $errs[self::FIELD_TIME_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditive.php index 8851dff22e..51b6fbde04 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRSpecimenDefinitionAdditive extends FHIRBackboneElement * Validation map for fields in type SpecimenDefinition.Additive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenDefinitionAdditive Constructor @@ -240,12 +240,97 @@ public function setAdditiveReference(FHIRReference $additiveReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditiveCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdditiveReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_CODEABLE_CONCEPT])) { + $v = $this->getAdditiveCodeableConcept(); + foreach($validationRules[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_ADDITIVE, self::FIELD_ADDITIVE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_REFERENCE])) { + $v = $this->getAdditiveReference(); + foreach($validationRules[self::FIELD_ADDITIVE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_ADDITIVE, self::FIELD_ADDITIVE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_REFERENCE])) { + $errs[self::FIELD_ADDITIVE_REFERENCE] = []; + } + $errs[self::FIELD_ADDITIVE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainer.php index 24f1492c50..49f64ac67d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -207,7 +207,7 @@ class FHIRSpecimenDefinitionContainer extends FHIRBackboneElement * Validation map for fields in type SpecimenDefinition.Container * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenDefinitionContainer Constructor @@ -707,12 +707,218 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdditive())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIVE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAP] = $fieldErrs; + } + } + if (null !== ($v = $this->getCapacity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAPACITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaterial())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MATERIAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinimumVolumeQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MINIMUM_VOLUME_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinimumVolumeString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MINIMUM_VOLUME_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreparation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREPARATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE])) { + $v = $this->getAdditive(); + foreach($validationRules[self::FIELD_ADDITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_CONTAINER, self::FIELD_ADDITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE])) { + $errs[self::FIELD_ADDITIVE] = []; + } + $errs[self::FIELD_ADDITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAP])) { + $v = $this->getCap(); + foreach($validationRules[self::FIELD_CAP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_CONTAINER, self::FIELD_CAP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAP])) { + $errs[self::FIELD_CAP] = []; + } + $errs[self::FIELD_CAP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAPACITY])) { + $v = $this->getCapacity(); + foreach($validationRules[self::FIELD_CAPACITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_CONTAINER, self::FIELD_CAPACITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPACITY])) { + $errs[self::FIELD_CAPACITY] = []; + } + $errs[self::FIELD_CAPACITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_CONTAINER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MATERIAL])) { + $v = $this->getMaterial(); + foreach($validationRules[self::FIELD_MATERIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_CONTAINER, self::FIELD_MATERIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MATERIAL])) { + $errs[self::FIELD_MATERIAL] = []; + } + $errs[self::FIELD_MATERIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MINIMUM_VOLUME_QUANTITY])) { + $v = $this->getMinimumVolumeQuantity(); + foreach($validationRules[self::FIELD_MINIMUM_VOLUME_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_CONTAINER, self::FIELD_MINIMUM_VOLUME_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MINIMUM_VOLUME_QUANTITY])) { + $errs[self::FIELD_MINIMUM_VOLUME_QUANTITY] = []; + } + $errs[self::FIELD_MINIMUM_VOLUME_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MINIMUM_VOLUME_STRING])) { + $v = $this->getMinimumVolumeString(); + foreach($validationRules[self::FIELD_MINIMUM_VOLUME_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_CONTAINER, self::FIELD_MINIMUM_VOLUME_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MINIMUM_VOLUME_STRING])) { + $errs[self::FIELD_MINIMUM_VOLUME_STRING] = []; + } + $errs[self::FIELD_MINIMUM_VOLUME_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREPARATION])) { + $v = $this->getPreparation(); + foreach($validationRules[self::FIELD_PREPARATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_CONTAINER, self::FIELD_PREPARATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREPARATION])) { + $errs[self::FIELD_PREPARATION] = []; + } + $errs[self::FIELD_PREPARATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_CONTAINER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandling.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandling.php index 905c5b093b..88661911c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandling.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandling.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRSpecimenDefinitionHandling extends FHIRBackboneElement * Validation map for fields in type SpecimenDefinition.Handling * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenDefinitionHandling Constructor @@ -362,12 +362,131 @@ public function setTemperatureRange(FHIRRange $temperatureRange = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTRUCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getTemperatureQualifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEMPERATURE_QUALIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getTemperatureRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEMPERATURE_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INSTRUCTION])) { + $v = $this->getInstruction(); + foreach($validationRules[self::FIELD_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_HANDLING, self::FIELD_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTRUCTION])) { + $errs[self::FIELD_INSTRUCTION] = []; + } + $errs[self::FIELD_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DURATION])) { + $v = $this->getMaxDuration(); + foreach($validationRules[self::FIELD_MAX_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_HANDLING, self::FIELD_MAX_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DURATION])) { + $errs[self::FIELD_MAX_DURATION] = []; + } + $errs[self::FIELD_MAX_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEMPERATURE_QUALIFIER])) { + $v = $this->getTemperatureQualifier(); + foreach($validationRules[self::FIELD_TEMPERATURE_QUALIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_HANDLING, self::FIELD_TEMPERATURE_QUALIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEMPERATURE_QUALIFIER])) { + $errs[self::FIELD_TEMPERATURE_QUALIFIER] = []; + } + $errs[self::FIELD_TEMPERATURE_QUALIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEMPERATURE_RANGE])) { + $v = $this->getTemperatureRange(); + foreach($validationRules[self::FIELD_TEMPERATURE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_HANDLING, self::FIELD_TEMPERATURE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEMPERATURE_RANGE])) { + $errs[self::FIELD_TEMPERATURE_RANGE] = []; + } + $errs[self::FIELD_TEMPERATURE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTested.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTested.php index 9e3e856735..b4b16a581a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTested.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTested.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -187,7 +187,7 @@ class FHIRSpecimenDefinitionTypeTested extends FHIRBackboneElement * Validation map for fields in type SpecimenDefinition.TypeTested * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenDefinitionTypeTested Constructor @@ -660,12 +660,203 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContainer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTAINER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getHandling())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HANDLING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIsDerived())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_DERIVED] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRejectionCriterion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REJECTION_CRITERION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getRetentionTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RETENTION_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTAINER])) { + $v = $this->getContainer(); + foreach($validationRules[self::FIELD_CONTAINER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_TYPE_TESTED, self::FIELD_CONTAINER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINER])) { + $errs[self::FIELD_CONTAINER] = []; + } + $errs[self::FIELD_CONTAINER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HANDLING])) { + $v = $this->getHandling(); + foreach($validationRules[self::FIELD_HANDLING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_TYPE_TESTED, self::FIELD_HANDLING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HANDLING])) { + $errs[self::FIELD_HANDLING] = []; + } + $errs[self::FIELD_HANDLING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_DERIVED])) { + $v = $this->getIsDerived(); + foreach($validationRules[self::FIELD_IS_DERIVED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_TYPE_TESTED, self::FIELD_IS_DERIVED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_DERIVED])) { + $errs[self::FIELD_IS_DERIVED] = []; + } + $errs[self::FIELD_IS_DERIVED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFERENCE])) { + $v = $this->getPreference(); + foreach($validationRules[self::FIELD_PREFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_TYPE_TESTED, self::FIELD_PREFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFERENCE])) { + $errs[self::FIELD_PREFERENCE] = []; + } + $errs[self::FIELD_PREFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REJECTION_CRITERION])) { + $v = $this->getRejectionCriterion(); + foreach($validationRules[self::FIELD_REJECTION_CRITERION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_TYPE_TESTED, self::FIELD_REJECTION_CRITERION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REJECTION_CRITERION])) { + $errs[self::FIELD_REJECTION_CRITERION] = []; + } + $errs[self::FIELD_REJECTION_CRITERION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENT])) { + $v = $this->getRequirement(); + foreach($validationRules[self::FIELD_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_TYPE_TESTED, self::FIELD_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENT])) { + $errs[self::FIELD_REQUIREMENT] = []; + } + $errs[self::FIELD_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RETENTION_TIME])) { + $v = $this->getRetentionTime(); + foreach($validationRules[self::FIELD_RETENTION_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_TYPE_TESTED, self::FIELD_RETENTION_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RETENTION_TIME])) { + $errs[self::FIELD_RETENTION_TIME] = []; + } + $errs[self::FIELD_RETENTION_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION_DOT_TYPE_TESTED, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContext.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContext.php index ab5a6b6d6b..3bddea275b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContext.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRStructureDefinitionContext extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Context * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinitionContext Constructor @@ -269,12 +269,97 @@ public function setType(FHIRExtensionContextType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_CONTEXT, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_CONTEXT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php index 39abeed01f..3041ce5a24 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRStructureDefinitionDifferential extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Differential * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ELEMENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -218,12 +218,82 @@ public function setElement(array $element = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_DIFFERENTIAL, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php index 77e06aa7f7..b6c6eef1c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRStructureDefinitionMapping extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Mapping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinitionMapping Constructor @@ -444,12 +444,131 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTITY])) { + $v = $this->getIdentity(); + foreach($validationRules[self::FIELD_IDENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_IDENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY])) { + $errs[self::FIELD_IDENTITY] = []; + } + $errs[self::FIELD_IDENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php index 1fc2d0c6d2..c77085f0b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRStructureDefinitionSnapshot extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Snapshot * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ELEMENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -218,12 +218,82 @@ public function setElement(array $element = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_SNAPSHOT, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php index efa0374598..009eec5274 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRStructureMapDependent extends FHIRBackboneElement * Validation map for fields in type StructureMap.Dependent * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VARIABLE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -329,12 +329,99 @@ public function setVariable(array $variable = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVariable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VARIABLE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_DEPENDENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIABLE])) { + $v = $this->getVariable(); + foreach($validationRules[self::FIELD_VARIABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_DEPENDENT, self::FIELD_VARIABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIABLE])) { + $errs[self::FIELD_VARIABLE] = []; + } + $errs[self::FIELD_VARIABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php index b5aaee4742..103c428fd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRStructureMapGroup extends FHIRBackboneElement * Validation map for fields in type StructureMap.Group * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INPUT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -608,12 +608,169 @@ public function setTypeMode(FHIRStructureMapGroupTypeMode $typeMode = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExtends())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXTENDS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInput())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INPUT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTypeMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE_MODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENDS])) { + $v = $this->getExtends(); + foreach($validationRules[self::FIELD_EXTENDS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_EXTENDS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENDS])) { + $errs[self::FIELD_EXTENDS] = []; + } + $errs[self::FIELD_EXTENDS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INPUT])) { + $v = $this->getInput(); + foreach($validationRules[self::FIELD_INPUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_INPUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INPUT])) { + $errs[self::FIELD_INPUT] = []; + } + $errs[self::FIELD_INPUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE_MODE])) { + $v = $this->getTypeMode(); + foreach($validationRules[self::FIELD_TYPE_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_TYPE_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE_MODE])) { + $errs[self::FIELD_TYPE_MODE] = []; + } + $errs[self::FIELD_TYPE_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php index 6a09ab7b64..e1775e5c96 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRStructureMapInput extends FHIRBackboneElement * Validation map for fields in type StructureMap.Input * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapInput Constructor @@ -422,12 +422,131 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_INPUT, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_INPUT, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_INPUT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_INPUT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php index 68e0bebd77..7bb3af7d35 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRStructureMapParameter extends FHIRBackboneElement * Validation map for fields in type StructureMap.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapParameter Constructor @@ -509,12 +509,148 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_PARAMETER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_PARAMETER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_PARAMETER, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_PARAMETER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_PARAMETER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php index 52277c2052..314c965b92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRStructureMapRule extends FHIRBackboneElement * Validation map for fields in type StructureMap.Rule * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_SOURCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -600,12 +600,173 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDependent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEPENDENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDENT])) { + $v = $this->getDependent(); + foreach($validationRules[self::FIELD_DEPENDENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_DEPENDENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDENT])) { + $errs[self::FIELD_DEPENDENT] = []; + } + $errs[self::FIELD_DEPENDENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php index 1610fd38fd..47dd5cf674 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -997,7 +997,7 @@ class FHIRStructureMapSource extends FHIRBackboneElement * Validation map for fields in type StructureMap.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapSource Constructor @@ -4172,12 +4172,1083 @@ public function setVariable($variable = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCheck())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHECK] = $fieldErrs; + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueContactDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueContributor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueParameterDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRelatedArtifact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTriggerDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUsageContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_UUID] = $fieldErrs; + } + } + if (null !== ($v = $this->getElement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getListMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIST_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLogMessage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOG_MESSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIABLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CHECK])) { + $v = $this->getCheck(); + foreach($validationRules[self::FIELD_CHECK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_CHECK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHECK])) { + $errs[self::FIELD_CHECK] = []; + } + $errs[self::FIELD_CHECK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ADDRESS])) { + $v = $this->getDefaultValueAddress(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ADDRESS])) { + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_AGE])) { + $v = $this->getDefaultValueAge(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_AGE])) { + $errs[self::FIELD_DEFAULT_VALUE_AGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ANNOTATION])) { + $v = $this->getDefaultValueAnnotation(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ANNOTATION])) { + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ATTACHMENT])) { + $v = $this->getDefaultValueAttachment(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT])) { + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $v = $this->getDefaultValueBase64Binary(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $v = $this->getDefaultValueBoolean(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CANONICAL])) { + $v = $this->getDefaultValueCanonical(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CANONICAL])) { + $errs[self::FIELD_DEFAULT_VALUE_CANONICAL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODE])) { + $v = $this->getDefaultValueCode(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODE])) { + $errs[self::FIELD_DEFAULT_VALUE_CODE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getDefaultValueCodeableConcept(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODING])) { + $v = $this->getDefaultValueCoding(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODING])) { + $errs[self::FIELD_DEFAULT_VALUE_CODING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL])) { + $v = $this->getDefaultValueContactDetail(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL])) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])) { + $v = $this->getDefaultValueContactPoint(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR])) { + $v = $this->getDefaultValueContributor(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR])) { + $errs[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_COUNT])) { + $v = $this->getDefaultValueCount(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_COUNT])) { + $errs[self::FIELD_DEFAULT_VALUE_COUNT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT])) { + $v = $this->getDefaultValueDataRequirement(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT])) { + $errs[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATE])) { + $v = $this->getDefaultValueDate(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATE])) { + $errs[self::FIELD_DEFAULT_VALUE_DATE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $v = $this->getDefaultValueDateTime(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $v = $this->getDefaultValueDecimal(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DISTANCE])) { + $v = $this->getDefaultValueDistance(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DISTANCE])) { + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DOSAGE])) { + $v = $this->getDefaultValueDosage(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DOSAGE])) { + $errs[self::FIELD_DEFAULT_VALUE_DOSAGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DURATION])) { + $v = $this->getDefaultValueDuration(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DURATION])) { + $errs[self::FIELD_DEFAULT_VALUE_DURATION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_EXPRESSION])) { + $v = $this->getDefaultValueExpression(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_EXPRESSION])) { + $errs[self::FIELD_DEFAULT_VALUE_EXPRESSION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { + $v = $this->getDefaultValueHumanName(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ID])) { + $v = $this->getDefaultValueId(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ID])) { + $errs[self::FIELD_DEFAULT_VALUE_ID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { + $v = $this->getDefaultValueIdentifier(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $v = $this->getDefaultValueInstant(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $errs[self::FIELD_DEFAULT_VALUE_INSTANT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $v = $this->getDefaultValueInteger(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $errs[self::FIELD_DEFAULT_VALUE_INTEGER] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $v = $this->getDefaultValueMarkdown(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_META])) { + $v = $this->getDefaultValueMeta(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_META])) { + $errs[self::FIELD_DEFAULT_VALUE_META] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_MONEY])) { + $v = $this->getDefaultValueMoney(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_MONEY])) { + $errs[self::FIELD_DEFAULT_VALUE_MONEY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_OID])) { + $v = $this->getDefaultValueOid(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_OID])) { + $errs[self::FIELD_DEFAULT_VALUE_OID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION])) { + $v = $this->getDefaultValueParameterDefinition(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION])) { + $errs[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_PERIOD])) { + $v = $this->getDefaultValuePeriod(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_PERIOD])) { + $errs[self::FIELD_DEFAULT_VALUE_PERIOD] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $v = $this->getDefaultValuePositiveInt(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_QUANTITY])) { + $v = $this->getDefaultValueQuantity(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_QUANTITY])) { + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RANGE])) { + $v = $this->getDefaultValueRange(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RANGE])) { + $errs[self::FIELD_DEFAULT_VALUE_RANGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RATIO])) { + $v = $this->getDefaultValueRatio(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RATIO])) { + $errs[self::FIELD_DEFAULT_VALUE_RATIO] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_REFERENCE])) { + $v = $this->getDefaultValueReference(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_REFERENCE])) { + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT])) { + $v = $this->getDefaultValueRelatedArtifact(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT])) { + $errs[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA])) { + $v = $this->getDefaultValueSampledData(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_SIGNATURE])) { + $v = $this->getDefaultValueSignature(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_SIGNATURE])) { + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_STRING])) { + $v = $this->getDefaultValueString(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_STRING])) { + $errs[self::FIELD_DEFAULT_VALUE_STRING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TIME])) { + $v = $this->getDefaultValueTime(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TIME])) { + $errs[self::FIELD_DEFAULT_VALUE_TIME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TIMING])) { + $v = $this->getDefaultValueTiming(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TIMING])) { + $errs[self::FIELD_DEFAULT_VALUE_TIMING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION])) { + $v = $this->getDefaultValueTriggerDefinition(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION])) { + $errs[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $v = $this->getDefaultValueUnsignedInt(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_URI])) { + $v = $this->getDefaultValueUri(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_URI])) { + $errs[self::FIELD_DEFAULT_VALUE_URI] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_URL])) { + $v = $this->getDefaultValueUrl(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_URL])) { + $errs[self::FIELD_DEFAULT_VALUE_URL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT])) { + $v = $this->getDefaultValueUsageContext(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT])) { + $errs[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_UUID])) { + $v = $this->getDefaultValueUuid(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_UUID])) { + $errs[self::FIELD_DEFAULT_VALUE_UUID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIST_MODE])) { + $v = $this->getListMode(); + foreach($validationRules[self::FIELD_LIST_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_LIST_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIST_MODE])) { + $errs[self::FIELD_LIST_MODE] = []; + } + $errs[self::FIELD_LIST_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOG_MESSAGE])) { + $v = $this->getLogMessage(); + foreach($validationRules[self::FIELD_LOG_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_LOG_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOG_MESSAGE])) { + $errs[self::FIELD_LOG_MESSAGE] = []; + } + $errs[self::FIELD_LOG_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIABLE])) { + $v = $this->getVariable(); + foreach($validationRules[self::FIELD_VARIABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_VARIABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIABLE])) { + $errs[self::FIELD_VARIABLE] = []; + } + $errs[self::FIELD_VARIABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php index 77e2d965fa..63bb8edcff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRStructureMapStructure extends FHIRBackboneElement * Validation map for fields in type StructureMap.Structure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapStructure Constructor @@ -416,12 +416,131 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAlias())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALIAS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_STRUCTURE, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_STRUCTURE, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_STRUCTURE, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_STRUCTURE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php index f8510a13cb..701a965470 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -196,7 +196,7 @@ class FHIRStructureMapTarget extends FHIRBackboneElement * Validation map for fields in type StructureMap.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapTarget Constructor @@ -760,12 +760,203 @@ public function setVariable($variable = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContextType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getElement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELEMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getListMode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIST_MODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getListRuleId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIST_RULE_ID] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTransform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRANSFORM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIABLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT_TYPE])) { + $v = $this->getContextType(); + foreach($validationRules[self::FIELD_CONTEXT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_CONTEXT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT_TYPE])) { + $errs[self::FIELD_CONTEXT_TYPE] = []; + } + $errs[self::FIELD_CONTEXT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIST_MODE])) { + $v = $this->getListMode(); + foreach($validationRules[self::FIELD_LIST_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_LIST_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIST_MODE])) { + $errs[self::FIELD_LIST_MODE] = []; + } + $errs[self::FIELD_LIST_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIST_RULE_ID])) { + $v = $this->getListRuleId(); + foreach($validationRules[self::FIELD_LIST_RULE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_LIST_RULE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIST_RULE_ID])) { + $errs[self::FIELD_LIST_RULE_ID] = []; + } + $errs[self::FIELD_LIST_RULE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRANSFORM])) { + $v = $this->getTransform(); + foreach($validationRules[self::FIELD_TRANSFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_TRANSFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSFORM])) { + $errs[self::FIELD_TRANSFORM] = []; + } + $errs[self::FIELD_TRANSFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIABLE])) { + $v = $this->getVariable(); + foreach($validationRules[self::FIELD_VARIABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_VARIABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIABLE])) { + $errs[self::FIELD_VARIABLE] = []; + } + $errs[self::FIELD_VARIABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php index 8f16330476..6ac33fb6bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRSubscriptionChannel extends FHIRBackboneElement * Validation map for fields in type Subscription.Channel * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscriptionChannel Constructor @@ -471,12 +471,133 @@ public function setType(FHIRSubscriptionChannelType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getHeader())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HEADER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPayload())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYLOAD] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER])) { + $v = $this->getHeader(); + foreach($validationRules[self::FIELD_HEADER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_HEADER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER])) { + $errs[self::FIELD_HEADER] = []; + } + $errs[self::FIELD_HEADER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD])) { + $v = $this->getPayload(); + foreach($validationRules[self::FIELD_PAYLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_PAYLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD])) { + $errs[self::FIELD_PAYLOAD] = []; + } + $errs[self::FIELD_PAYLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php index d5133653e7..78e149da85 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRSubstanceIngredient extends FHIRBackboneElement * Validation map for fields in type Substance.Ingredient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceIngredient Constructor @@ -287,12 +287,114 @@ public function setSubstanceReference(FHIRReference $substanceReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstanceCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstanceReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INGREDIENT, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT])) { + $v = $this->getSubstanceCodeableConcept(); + foreach($validationRules[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INGREDIENT, self::FIELD_SUBSTANCE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE_REFERENCE])) { + $v = $this->getSubstanceReference(); + foreach($validationRules[self::FIELD_SUBSTANCE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INGREDIENT, self::FIELD_SUBSTANCE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE_REFERENCE])) { + $errs[self::FIELD_SUBSTANCE_REFERENCE] = []; + } + $errs[self::FIELD_SUBSTANCE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php index 563e47f38b..aee43ae522 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRSubstanceInstance extends FHIRBackboneElement * Validation map for fields in type Substance.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceInstance Constructor @@ -324,12 +324,114 @@ public function setQuantity(FHIRQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpiry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRY] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPIRY])) { + $v = $this->getExpiry(); + foreach($validationRules[self::FIELD_EXPIRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_EXPIRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRY])) { + $errs[self::FIELD_EXPIRY] = []; + } + $errs[self::FIELD_EXPIRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount.php index 271a8c8eeb..0ec840b550 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -193,7 +193,7 @@ class FHIRSubstanceAmount extends FHIRBackboneElement * Validation map for fields in type SubstanceAmount * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceAmount Constructor @@ -550,12 +550,165 @@ public function setReferenceRange(FHIRSubstanceAmountReferenceRange $referenceRa } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmountQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT_QUANTITY])) { + $v = $this->getAmountQuantity(); + foreach($validationRules[self::FIELD_AMOUNT_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_AMOUNT, self::FIELD_AMOUNT_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_QUANTITY])) { + $errs[self::FIELD_AMOUNT_QUANTITY] = []; + } + $errs[self::FIELD_AMOUNT_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_RANGE])) { + $v = $this->getAmountRange(); + foreach($validationRules[self::FIELD_AMOUNT_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_AMOUNT, self::FIELD_AMOUNT_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_RANGE])) { + $errs[self::FIELD_AMOUNT_RANGE] = []; + } + $errs[self::FIELD_AMOUNT_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_STRING])) { + $v = $this->getAmountString(); + foreach($validationRules[self::FIELD_AMOUNT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_AMOUNT, self::FIELD_AMOUNT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_STRING])) { + $errs[self::FIELD_AMOUNT_STRING] = []; + } + $errs[self::FIELD_AMOUNT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_TEXT])) { + $v = $this->getAmountText(); + foreach($validationRules[self::FIELD_AMOUNT_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_AMOUNT, self::FIELD_AMOUNT_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_TEXT])) { + $errs[self::FIELD_AMOUNT_TEXT] = []; + } + $errs[self::FIELD_AMOUNT_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_TYPE])) { + $v = $this->getAmountType(); + foreach($validationRules[self::FIELD_AMOUNT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_AMOUNT, self::FIELD_AMOUNT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_TYPE])) { + $errs[self::FIELD_AMOUNT_TYPE] = []; + } + $errs[self::FIELD_AMOUNT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_RANGE])) { + $v = $this->getReferenceRange(); + foreach($validationRules[self::FIELD_REFERENCE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_AMOUNT, self::FIELD_REFERENCE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_RANGE])) { + $errs[self::FIELD_REFERENCE_RANGE] = []; + } + $errs[self::FIELD_REFERENCE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRange.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRange.php index 935e713205..91dd00180b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRange.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRSubstanceAmountReferenceRange extends FHIRBackboneElement * Validation map for fields in type SubstanceAmount.ReferenceRange * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceAmountReferenceRange Constructor @@ -243,12 +243,97 @@ public function setLowLimit(FHIRQuantity $lowLimit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHighLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIGH_LIMIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLowLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOW_LIMIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HIGH_LIMIT])) { + $v = $this->getHighLimit(); + foreach($validationRules[self::FIELD_HIGH_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_AMOUNT_DOT_REFERENCE_RANGE, self::FIELD_HIGH_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIGH_LIMIT])) { + $errs[self::FIELD_HIGH_LIMIT] = []; + } + $errs[self::FIELD_HIGH_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOW_LIMIT])) { + $v = $this->getLowLimit(); + foreach($validationRules[self::FIELD_LOW_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_AMOUNT_DOT_REFERENCE_RANGE, self::FIELD_LOW_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOW_LIMIT])) { + $errs[self::FIELD_LOW_LIMIT] = []; + } + $errs[self::FIELD_LOW_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkage.php index 46c7cbf741..36fa771668 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRSubstanceNucleicAcidLinkage extends FHIRBackboneElement * Validation map for fields in type SubstanceNucleicAcid.Linkage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceNucleicAcidLinkage Constructor @@ -419,12 +419,131 @@ public function setResidueSite($residueSite = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getConnectivity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONNECTIVITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getResidueSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESIDUE_SITE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONNECTIVITY])) { + $v = $this->getConnectivity(); + foreach($validationRules[self::FIELD_CONNECTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_LINKAGE, self::FIELD_CONNECTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONNECTIVITY])) { + $errs[self::FIELD_CONNECTIVITY] = []; + } + $errs[self::FIELD_CONNECTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_LINKAGE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_LINKAGE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESIDUE_SITE])) { + $v = $this->getResidueSite(); + foreach($validationRules[self::FIELD_RESIDUE_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_LINKAGE, self::FIELD_RESIDUE_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESIDUE_SITE])) { + $errs[self::FIELD_RESIDUE_SITE] = []; + } + $errs[self::FIELD_RESIDUE_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunit.php index 2f1d7b7809..8fdaaa5fd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -204,7 +204,7 @@ class FHIRSubstanceNucleicAcidSubunit extends FHIRBackboneElement * Validation map for fields in type SubstanceNucleicAcid.Subunit * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceNucleicAcidSubunit Constructor @@ -717,12 +717,203 @@ public function setThreePrime(FHIRCodeableConcept $threePrime = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFivePrime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIVE_PRIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LENGTH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLinkage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINKAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequenceAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubunit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBUNIT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSugar())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUGAR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getThreePrime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_THREE_PRIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FIVE_PRIME])) { + $v = $this->getFivePrime(); + foreach($validationRules[self::FIELD_FIVE_PRIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUBUNIT, self::FIELD_FIVE_PRIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIVE_PRIME])) { + $errs[self::FIELD_FIVE_PRIME] = []; + } + $errs[self::FIELD_FIVE_PRIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LENGTH])) { + $v = $this->getLength(); + foreach($validationRules[self::FIELD_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUBUNIT, self::FIELD_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LENGTH])) { + $errs[self::FIELD_LENGTH] = []; + } + $errs[self::FIELD_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINKAGE])) { + $v = $this->getLinkage(); + foreach($validationRules[self::FIELD_LINKAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUBUNIT, self::FIELD_LINKAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINKAGE])) { + $errs[self::FIELD_LINKAGE] = []; + } + $errs[self::FIELD_LINKAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUBUNIT, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_ATTACHMENT])) { + $v = $this->getSequenceAttachment(); + foreach($validationRules[self::FIELD_SEQUENCE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUBUNIT, self::FIELD_SEQUENCE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_ATTACHMENT])) { + $errs[self::FIELD_SEQUENCE_ATTACHMENT] = []; + } + $errs[self::FIELD_SEQUENCE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBUNIT])) { + $v = $this->getSubunit(); + foreach($validationRules[self::FIELD_SUBUNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUBUNIT, self::FIELD_SUBUNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBUNIT])) { + $errs[self::FIELD_SUBUNIT] = []; + } + $errs[self::FIELD_SUBUNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUGAR])) { + $v = $this->getSugar(); + foreach($validationRules[self::FIELD_SUGAR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUBUNIT, self::FIELD_SUGAR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUGAR])) { + $errs[self::FIELD_SUGAR] = []; + } + $errs[self::FIELD_SUGAR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_THREE_PRIME])) { + $v = $this->getThreePrime(); + foreach($validationRules[self::FIELD_THREE_PRIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUBUNIT, self::FIELD_THREE_PRIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_THREE_PRIME])) { + $errs[self::FIELD_THREE_PRIME] = []; + } + $errs[self::FIELD_THREE_PRIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugar.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugar.php index 7c74562877..023df3dbae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugar.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugar.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRSubstanceNucleicAcidSugar extends FHIRBackboneElement * Validation map for fields in type SubstanceNucleicAcid.Sugar * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceNucleicAcidSugar Constructor @@ -339,12 +339,114 @@ public function setResidueSite($residueSite = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getResidueSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESIDUE_SITE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUGAR, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUGAR, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESIDUE_SITE])) { + $v = $this->getResidueSite(); + foreach($validationRules[self::FIELD_RESIDUE_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID_DOT_SUGAR, self::FIELD_RESIDUE_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESIDUE_SITE])) { + $errs[self::FIELD_RESIDUE_SITE] = []; + } + $errs[self::FIELD_RESIDUE_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisation.php index ab2963ffa8..d0e0d58879 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRSubstancePolymerDegreeOfPolymerisation extends FHIRBackboneElement * Validation map for fields in type SubstancePolymer.DegreeOfPolymerisation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstancePolymerDegreeOfPolymerisation Constructor @@ -243,12 +243,97 @@ public function setDegree(FHIRCodeableConcept $degree = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDegree())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEGREE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_DEGREE_OF_POLYMERISATION, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEGREE])) { + $v = $this->getDegree(); + foreach($validationRules[self::FIELD_DEGREE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_DEGREE_OF_POLYMERISATION, self::FIELD_DEGREE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEGREE])) { + $errs[self::FIELD_DEGREE] = []; + } + $errs[self::FIELD_DEGREE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSet.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSet.php index 25a7a47371..f7aae707fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSet.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRSubstancePolymerMonomerSet extends FHIRBackboneElement * Validation map for fields in type SubstancePolymer.MonomerSet * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstancePolymerMonomerSet Constructor @@ -256,12 +256,99 @@ public function setStartingMaterial(array $startingMaterial = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getRatioType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATIO_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStartingMaterial())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STARTING_MATERIAL, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_RATIO_TYPE])) { + $v = $this->getRatioType(); + foreach($validationRules[self::FIELD_RATIO_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_MONOMER_SET, self::FIELD_RATIO_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATIO_TYPE])) { + $errs[self::FIELD_RATIO_TYPE] = []; + } + $errs[self::FIELD_RATIO_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STARTING_MATERIAL])) { + $v = $this->getStartingMaterial(); + foreach($validationRules[self::FIELD_STARTING_MATERIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_MONOMER_SET, self::FIELD_STARTING_MATERIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STARTING_MATERIAL])) { + $errs[self::FIELD_STARTING_MATERIAL] = []; + } + $errs[self::FIELD_STARTING_MATERIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeat.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeat.php index 83354c8b47..a83de9ac70 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeat.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -136,7 +136,7 @@ class FHIRSubstancePolymerRepeat extends FHIRBackboneElement * Validation map for fields in type SubstancePolymer.Repeat * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstancePolymerRepeat Constructor @@ -406,12 +406,133 @@ public function setRepeatUnitAmountType(FHIRCodeableConcept $repeatUnitAmountTyp } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAverageMolecularFormula())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVERAGE_MOLECULAR_FORMULA] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfUnits())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_UNITS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRepeatUnit())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPEAT_UNIT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRepeatUnitAmountType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPEAT_UNIT_AMOUNT_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AVERAGE_MOLECULAR_FORMULA])) { + $v = $this->getAverageMolecularFormula(); + foreach($validationRules[self::FIELD_AVERAGE_MOLECULAR_FORMULA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_REPEAT, self::FIELD_AVERAGE_MOLECULAR_FORMULA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVERAGE_MOLECULAR_FORMULA])) { + $errs[self::FIELD_AVERAGE_MOLECULAR_FORMULA] = []; + } + $errs[self::FIELD_AVERAGE_MOLECULAR_FORMULA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_UNITS])) { + $v = $this->getNumberOfUnits(); + foreach($validationRules[self::FIELD_NUMBER_OF_UNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_REPEAT, self::FIELD_NUMBER_OF_UNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_UNITS])) { + $errs[self::FIELD_NUMBER_OF_UNITS] = []; + } + $errs[self::FIELD_NUMBER_OF_UNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEAT_UNIT])) { + $v = $this->getRepeatUnit(); + foreach($validationRules[self::FIELD_REPEAT_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_REPEAT, self::FIELD_REPEAT_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEAT_UNIT])) { + $errs[self::FIELD_REPEAT_UNIT] = []; + } + $errs[self::FIELD_REPEAT_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEAT_UNIT_AMOUNT_TYPE])) { + $v = $this->getRepeatUnitAmountType(); + foreach($validationRules[self::FIELD_REPEAT_UNIT_AMOUNT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_REPEAT, self::FIELD_REPEAT_UNIT_AMOUNT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEAT_UNIT_AMOUNT_TYPE])) { + $errs[self::FIELD_REPEAT_UNIT_AMOUNT_TYPE] = []; + } + $errs[self::FIELD_REPEAT_UNIT_AMOUNT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnit.php index b44f7c5376..93a7746c2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -150,7 +150,7 @@ class FHIRSubstancePolymerRepeatUnit extends FHIRBackboneElement * Validation map for fields in type SubstancePolymer.RepeatUnit * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstancePolymerRepeatUnit Constructor @@ -474,12 +474,152 @@ public function setStructuralRepresentation(array $structuralRepresentation = [] } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDegreeOfPolymerisation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEGREE_OF_POLYMERISATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrientationOfPolymerisation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIENTATION_OF_POLYMERISATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRepeatUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPEAT_UNIT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStructuralRepresentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRUCTURAL_REPRESENTATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_REPEAT_UNIT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEGREE_OF_POLYMERISATION])) { + $v = $this->getDegreeOfPolymerisation(); + foreach($validationRules[self::FIELD_DEGREE_OF_POLYMERISATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_REPEAT_UNIT, self::FIELD_DEGREE_OF_POLYMERISATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEGREE_OF_POLYMERISATION])) { + $errs[self::FIELD_DEGREE_OF_POLYMERISATION] = []; + } + $errs[self::FIELD_DEGREE_OF_POLYMERISATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIENTATION_OF_POLYMERISATION])) { + $v = $this->getOrientationOfPolymerisation(); + foreach($validationRules[self::FIELD_ORIENTATION_OF_POLYMERISATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_REPEAT_UNIT, self::FIELD_ORIENTATION_OF_POLYMERISATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIENTATION_OF_POLYMERISATION])) { + $errs[self::FIELD_ORIENTATION_OF_POLYMERISATION] = []; + } + $errs[self::FIELD_ORIENTATION_OF_POLYMERISATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEAT_UNIT])) { + $v = $this->getRepeatUnit(); + foreach($validationRules[self::FIELD_REPEAT_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_REPEAT_UNIT, self::FIELD_REPEAT_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEAT_UNIT])) { + $errs[self::FIELD_REPEAT_UNIT] = []; + } + $errs[self::FIELD_REPEAT_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRUCTURAL_REPRESENTATION])) { + $v = $this->getStructuralRepresentation(); + foreach($validationRules[self::FIELD_STRUCTURAL_REPRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_REPEAT_UNIT, self::FIELD_STRUCTURAL_REPRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRUCTURAL_REPRESENTATION])) { + $errs[self::FIELD_STRUCTURAL_REPRESENTATION] = []; + } + $errs[self::FIELD_STRUCTURAL_REPRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterial.php index 90cb9a6933..a974c5bfb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRSubstancePolymerStartingMaterial extends FHIRBackboneElement * Validation map for fields in type SubstancePolymer.StartingMaterial * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstancePolymerStartingMaterial Constructor @@ -367,12 +367,131 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsDefining())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_DEFINING] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaterial())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MATERIAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_STARTING_MATERIAL, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_DEFINING])) { + $v = $this->getIsDefining(); + foreach($validationRules[self::FIELD_IS_DEFINING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_STARTING_MATERIAL, self::FIELD_IS_DEFINING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_DEFINING])) { + $errs[self::FIELD_IS_DEFINING] = []; + } + $errs[self::FIELD_IS_DEFINING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MATERIAL])) { + $v = $this->getMaterial(); + foreach($validationRules[self::FIELD_MATERIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_STARTING_MATERIAL, self::FIELD_MATERIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MATERIAL])) { + $errs[self::FIELD_MATERIAL] = []; + } + $errs[self::FIELD_MATERIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_STARTING_MATERIAL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentation.php index 0d50369b72..afe6a93470 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRSubstancePolymerStructuralRepresentation extends FHIRBackboneElement * Validation map for fields in type SubstancePolymer.StructuralRepresentation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstancePolymerStructuralRepresentation Constructor @@ -303,12 +303,114 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getRepresentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPRESENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ATTACHMENT])) { + $v = $this->getAttachment(); + foreach($validationRules[self::FIELD_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_STRUCTURAL_REPRESENTATION, self::FIELD_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTACHMENT])) { + $errs[self::FIELD_ATTACHMENT] = []; + } + $errs[self::FIELD_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPRESENTATION])) { + $v = $this->getRepresentation(); + foreach($validationRules[self::FIELD_REPRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_STRUCTURAL_REPRESENTATION, self::FIELD_REPRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPRESENTATION])) { + $errs[self::FIELD_REPRESENTATION] = []; + } + $errs[self::FIELD_REPRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER_DOT_STRUCTURAL_REPRESENTATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunit.php index a8c504a837..13ce5e0887 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -216,7 +216,7 @@ class FHIRSubstanceProteinSubunit extends FHIRBackboneElement * Validation map for fields in type SubstanceProtein.Subunit * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceProteinSubunit Constructor @@ -713,12 +713,199 @@ public function setSubunit($subunit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCTerminalModification())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_C_TERMINAL_MODIFICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCTerminalModificationId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_C_TERMINAL_MODIFICATION_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getNTerminalModification())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_N_TERMINAL_MODIFICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNTerminalModificationId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_N_TERMINAL_MODIFICATION_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequenceAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubunit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBUNIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_C_TERMINAL_MODIFICATION])) { + $v = $this->getCTerminalModification(); + foreach($validationRules[self::FIELD_C_TERMINAL_MODIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN_DOT_SUBUNIT, self::FIELD_C_TERMINAL_MODIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_C_TERMINAL_MODIFICATION])) { + $errs[self::FIELD_C_TERMINAL_MODIFICATION] = []; + } + $errs[self::FIELD_C_TERMINAL_MODIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_C_TERMINAL_MODIFICATION_ID])) { + $v = $this->getCTerminalModificationId(); + foreach($validationRules[self::FIELD_C_TERMINAL_MODIFICATION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN_DOT_SUBUNIT, self::FIELD_C_TERMINAL_MODIFICATION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_C_TERMINAL_MODIFICATION_ID])) { + $errs[self::FIELD_C_TERMINAL_MODIFICATION_ID] = []; + } + $errs[self::FIELD_C_TERMINAL_MODIFICATION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LENGTH])) { + $v = $this->getLength(); + foreach($validationRules[self::FIELD_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN_DOT_SUBUNIT, self::FIELD_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LENGTH])) { + $errs[self::FIELD_LENGTH] = []; + } + $errs[self::FIELD_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_N_TERMINAL_MODIFICATION])) { + $v = $this->getNTerminalModification(); + foreach($validationRules[self::FIELD_N_TERMINAL_MODIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN_DOT_SUBUNIT, self::FIELD_N_TERMINAL_MODIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_N_TERMINAL_MODIFICATION])) { + $errs[self::FIELD_N_TERMINAL_MODIFICATION] = []; + } + $errs[self::FIELD_N_TERMINAL_MODIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_N_TERMINAL_MODIFICATION_ID])) { + $v = $this->getNTerminalModificationId(); + foreach($validationRules[self::FIELD_N_TERMINAL_MODIFICATION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN_DOT_SUBUNIT, self::FIELD_N_TERMINAL_MODIFICATION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_N_TERMINAL_MODIFICATION_ID])) { + $errs[self::FIELD_N_TERMINAL_MODIFICATION_ID] = []; + } + $errs[self::FIELD_N_TERMINAL_MODIFICATION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN_DOT_SUBUNIT, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_ATTACHMENT])) { + $v = $this->getSequenceAttachment(); + foreach($validationRules[self::FIELD_SEQUENCE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN_DOT_SUBUNIT, self::FIELD_SEQUENCE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_ATTACHMENT])) { + $errs[self::FIELD_SEQUENCE_ATTACHMENT] = []; + } + $errs[self::FIELD_SEQUENCE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBUNIT])) { + $v = $this->getSubunit(); + foreach($validationRules[self::FIELD_SUBUNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN_DOT_SUBUNIT, self::FIELD_SUBUNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBUNIT])) { + $errs[self::FIELD_SUBUNIT] = []; + } + $errs[self::FIELD_SUBUNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassification.php index c9ae6118d5..45415276a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRSubstanceReferenceInformationClassification extends FHIRBackboneElemen * Validation map for fields in type SubstanceReferenceInformation.Classification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceReferenceInformationClassification Constructor @@ -407,12 +407,135 @@ public function setSubtype(array $subtype = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClassification())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASSIFICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDomain())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOMAIN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubtype())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBTYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CLASSIFICATION])) { + $v = $this->getClassification(); + foreach($validationRules[self::FIELD_CLASSIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_CLASSIFICATION, self::FIELD_CLASSIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASSIFICATION])) { + $errs[self::FIELD_CLASSIFICATION] = []; + } + $errs[self::FIELD_CLASSIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOMAIN])) { + $v = $this->getDomain(); + foreach($validationRules[self::FIELD_DOMAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_CLASSIFICATION, self::FIELD_DOMAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOMAIN])) { + $errs[self::FIELD_DOMAIN] = []; + } + $errs[self::FIELD_DOMAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_CLASSIFICATION, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTYPE])) { + $v = $this->getSubtype(); + foreach($validationRules[self::FIELD_SUBTYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_CLASSIFICATION, self::FIELD_SUBTYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTYPE])) { + $errs[self::FIELD_SUBTYPE] = []; + } + $errs[self::FIELD_SUBTYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGene.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGene.php index 530fd65bc7..c337b1eec1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGene.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGene.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRSubstanceReferenceInformationGene extends FHIRBackboneElement * Validation map for fields in type SubstanceReferenceInformation.Gene * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceReferenceInformationGene Constructor @@ -317,12 +317,116 @@ public function setSource(array $source = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getGene())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGeneSequenceOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENE_SEQUENCE_ORIGIN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_GENE])) { + $v = $this->getGene(); + foreach($validationRules[self::FIELD_GENE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_GENE, self::FIELD_GENE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENE])) { + $errs[self::FIELD_GENE] = []; + } + $errs[self::FIELD_GENE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENE_SEQUENCE_ORIGIN])) { + $v = $this->getGeneSequenceOrigin(); + foreach($validationRules[self::FIELD_GENE_SEQUENCE_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_GENE, self::FIELD_GENE_SEQUENCE_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENE_SEQUENCE_ORIGIN])) { + $errs[self::FIELD_GENE_SEQUENCE_ORIGIN] = []; + } + $errs[self::FIELD_GENE_SEQUENCE_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_GENE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElement.php index 0181be1e86..01335020fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRSubstanceReferenceInformationGeneElement extends FHIRBackboneElement * Validation map for fields in type SubstanceReferenceInformation.GeneElement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceReferenceInformationGeneElement Constructor @@ -318,12 +318,116 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getElement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELEMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_GENE_ELEMENT, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_GENE_ELEMENT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_GENE_ELEMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTarget.php index 7f21dd9378..bec83f8250 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -219,7 +219,7 @@ class FHIRSubstanceReferenceInformationTarget extends FHIRBackboneElement * Validation map for fields in type SubstanceReferenceInformation.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceReferenceInformationTarget Constructor @@ -707,12 +707,235 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmountQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getInteraction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTERACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganism())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANISM] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganismType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANISM_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT_QUANTITY])) { + $v = $this->getAmountQuantity(); + foreach($validationRules[self::FIELD_AMOUNT_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_TARGET, self::FIELD_AMOUNT_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_QUANTITY])) { + $errs[self::FIELD_AMOUNT_QUANTITY] = []; + } + $errs[self::FIELD_AMOUNT_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_RANGE])) { + $v = $this->getAmountRange(); + foreach($validationRules[self::FIELD_AMOUNT_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_TARGET, self::FIELD_AMOUNT_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_RANGE])) { + $errs[self::FIELD_AMOUNT_RANGE] = []; + } + $errs[self::FIELD_AMOUNT_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_STRING])) { + $v = $this->getAmountString(); + foreach($validationRules[self::FIELD_AMOUNT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_TARGET, self::FIELD_AMOUNT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_STRING])) { + $errs[self::FIELD_AMOUNT_STRING] = []; + } + $errs[self::FIELD_AMOUNT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_TYPE])) { + $v = $this->getAmountType(); + foreach($validationRules[self::FIELD_AMOUNT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_TARGET, self::FIELD_AMOUNT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_TYPE])) { + $errs[self::FIELD_AMOUNT_TYPE] = []; + } + $errs[self::FIELD_AMOUNT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERACTION])) { + $v = $this->getInteraction(); + foreach($validationRules[self::FIELD_INTERACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_TARGET, self::FIELD_INTERACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERACTION])) { + $errs[self::FIELD_INTERACTION] = []; + } + $errs[self::FIELD_INTERACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANISM])) { + $v = $this->getOrganism(); + foreach($validationRules[self::FIELD_ORGANISM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_TARGET, self::FIELD_ORGANISM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANISM])) { + $errs[self::FIELD_ORGANISM] = []; + } + $errs[self::FIELD_ORGANISM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANISM_TYPE])) { + $v = $this->getOrganismType(); + foreach($validationRules[self::FIELD_ORGANISM_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_TARGET, self::FIELD_ORGANISM_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANISM_TYPE])) { + $errs[self::FIELD_ORGANISM_TYPE] = []; + } + $errs[self::FIELD_ORGANISM_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_TARGET, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_TARGET, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION_DOT_TARGET, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthor.php index 372d72d6ba..86b3602152 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRSubstanceSourceMaterialAuthor extends FHIRBackboneElement * Validation map for fields in type SubstanceSourceMaterial.Author * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSourceMaterialAuthor Constructor @@ -280,12 +280,97 @@ public function setAuthorType(FHIRCodeableConcept $authorType = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthorDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthorType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR_DESCRIPTION])) { + $v = $this->getAuthorDescription(); + foreach($validationRules[self::FIELD_AUTHOR_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_AUTHOR, self::FIELD_AUTHOR_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR_DESCRIPTION])) { + $errs[self::FIELD_AUTHOR_DESCRIPTION] = []; + } + $errs[self::FIELD_AUTHOR_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR_TYPE])) { + $v = $this->getAuthorType(); + foreach($validationRules[self::FIELD_AUTHOR_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_AUTHOR, self::FIELD_AUTHOR_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR_TYPE])) { + $errs[self::FIELD_AUTHOR_TYPE] = []; + } + $errs[self::FIELD_AUTHOR_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescription.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescription.php index fb46d0f9d7..f23e7909ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescription.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRSubstanceSourceMaterialFractionDescription extends FHIRBackboneElement * Validation map for fields in type SubstanceSourceMaterial.FractionDescription * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSourceMaterialFractionDescription Constructor @@ -274,12 +274,97 @@ public function setMaterialType(FHIRCodeableConcept $materialType = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFraction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FRACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaterialType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MATERIAL_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FRACTION])) { + $v = $this->getFraction(); + foreach($validationRules[self::FIELD_FRACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_FRACTION_DESCRIPTION, self::FIELD_FRACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRACTION])) { + $errs[self::FIELD_FRACTION] = []; + } + $errs[self::FIELD_FRACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MATERIAL_TYPE])) { + $v = $this->getMaterialType(); + foreach($validationRules[self::FIELD_MATERIAL_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_FRACTION_DESCRIPTION, self::FIELD_MATERIAL_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MATERIAL_TYPE])) { + $errs[self::FIELD_MATERIAL_TYPE] = []; + } + $errs[self::FIELD_MATERIAL_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybrid.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybrid.php index 403fbc8b77..de005eb1dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybrid.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybrid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -170,7 +170,7 @@ class FHIRSubstanceSourceMaterialHybrid extends FHIRBackboneElement * Validation map for fields in type SubstanceSourceMaterial.Hybrid * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSourceMaterialHybrid Constructor @@ -508,12 +508,148 @@ public function setPaternalOrganismName($paternalOrganismName = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHybridType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HYBRID_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaternalOrganismId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MATERNAL_ORGANISM_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaternalOrganismName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MATERNAL_ORGANISM_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaternalOrganismId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATERNAL_ORGANISM_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaternalOrganismName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATERNAL_ORGANISM_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HYBRID_TYPE])) { + $v = $this->getHybridType(); + foreach($validationRules[self::FIELD_HYBRID_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_HYBRID, self::FIELD_HYBRID_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HYBRID_TYPE])) { + $errs[self::FIELD_HYBRID_TYPE] = []; + } + $errs[self::FIELD_HYBRID_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MATERNAL_ORGANISM_ID])) { + $v = $this->getMaternalOrganismId(); + foreach($validationRules[self::FIELD_MATERNAL_ORGANISM_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_HYBRID, self::FIELD_MATERNAL_ORGANISM_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MATERNAL_ORGANISM_ID])) { + $errs[self::FIELD_MATERNAL_ORGANISM_ID] = []; + } + $errs[self::FIELD_MATERNAL_ORGANISM_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MATERNAL_ORGANISM_NAME])) { + $v = $this->getMaternalOrganismName(); + foreach($validationRules[self::FIELD_MATERNAL_ORGANISM_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_HYBRID, self::FIELD_MATERNAL_ORGANISM_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MATERNAL_ORGANISM_NAME])) { + $errs[self::FIELD_MATERNAL_ORGANISM_NAME] = []; + } + $errs[self::FIELD_MATERNAL_ORGANISM_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATERNAL_ORGANISM_ID])) { + $v = $this->getPaternalOrganismId(); + foreach($validationRules[self::FIELD_PATERNAL_ORGANISM_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_HYBRID, self::FIELD_PATERNAL_ORGANISM_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATERNAL_ORGANISM_ID])) { + $errs[self::FIELD_PATERNAL_ORGANISM_ID] = []; + } + $errs[self::FIELD_PATERNAL_ORGANISM_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATERNAL_ORGANISM_NAME])) { + $v = $this->getPaternalOrganismName(); + foreach($validationRules[self::FIELD_PATERNAL_ORGANISM_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_HYBRID, self::FIELD_PATERNAL_ORGANISM_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATERNAL_ORGANISM_NAME])) { + $errs[self::FIELD_PATERNAL_ORGANISM_NAME] = []; + } + $errs[self::FIELD_PATERNAL_ORGANISM_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganism.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganism.php index 723b889351..6bef1c3f31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganism.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganism.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -235,7 +235,7 @@ class FHIRSubstanceSourceMaterialOrganism extends FHIRBackboneElement * Validation map for fields in type SubstanceSourceMaterial.Organism * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSourceMaterialOrganism Constructor @@ -723,12 +723,201 @@ public function setSpecies(FHIRCodeableConcept $species = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFamily())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FAMILY] = $fieldErrs; + } + } + if (null !== ($v = $this->getGenus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getHybrid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HYBRID] = $fieldErrs; + } + } + if (null !== ($v = $this->getIntraspecificDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTRASPECIFIC_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIntraspecificType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTRASPECIFIC_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganismGeneral())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANISM_GENERAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FAMILY])) { + $v = $this->getFamily(); + foreach($validationRules[self::FIELD_FAMILY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM, self::FIELD_FAMILY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FAMILY])) { + $errs[self::FIELD_FAMILY] = []; + } + $errs[self::FIELD_FAMILY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENUS])) { + $v = $this->getGenus(); + foreach($validationRules[self::FIELD_GENUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM, self::FIELD_GENUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENUS])) { + $errs[self::FIELD_GENUS] = []; + } + $errs[self::FIELD_GENUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HYBRID])) { + $v = $this->getHybrid(); + foreach($validationRules[self::FIELD_HYBRID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM, self::FIELD_HYBRID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HYBRID])) { + $errs[self::FIELD_HYBRID] = []; + } + $errs[self::FIELD_HYBRID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTRASPECIFIC_DESCRIPTION])) { + $v = $this->getIntraspecificDescription(); + foreach($validationRules[self::FIELD_INTRASPECIFIC_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM, self::FIELD_INTRASPECIFIC_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTRASPECIFIC_DESCRIPTION])) { + $errs[self::FIELD_INTRASPECIFIC_DESCRIPTION] = []; + } + $errs[self::FIELD_INTRASPECIFIC_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTRASPECIFIC_TYPE])) { + $v = $this->getIntraspecificType(); + foreach($validationRules[self::FIELD_INTRASPECIFIC_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM, self::FIELD_INTRASPECIFIC_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTRASPECIFIC_TYPE])) { + $errs[self::FIELD_INTRASPECIFIC_TYPE] = []; + } + $errs[self::FIELD_INTRASPECIFIC_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANISM_GENERAL])) { + $v = $this->getOrganismGeneral(); + foreach($validationRules[self::FIELD_ORGANISM_GENERAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM, self::FIELD_ORGANISM_GENERAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANISM_GENERAL])) { + $errs[self::FIELD_ORGANISM_GENERAL] = []; + } + $errs[self::FIELD_ORGANISM_GENERAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIES])) { + $v = $this->getSpecies(); + foreach($validationRules[self::FIELD_SPECIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM, self::FIELD_SPECIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIES])) { + $errs[self::FIELD_SPECIES] = []; + } + $errs[self::FIELD_SPECIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneral.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneral.php index 8a1c9181a7..3587cb5f51 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneral.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneral.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -149,7 +149,7 @@ class FHIRSubstanceSourceMaterialOrganismGeneral extends FHIRBackboneElement * Validation map for fields in type SubstanceSourceMaterial.OrganismGeneral * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSourceMaterialOrganismGeneral Constructor @@ -346,12 +346,131 @@ public function setPhylum(FHIRCodeableConcept $phylum = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getKingdom())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KINGDOM] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPhylum())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHYLUM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM_GENERAL, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KINGDOM])) { + $v = $this->getKingdom(); + foreach($validationRules[self::FIELD_KINGDOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM_GENERAL, self::FIELD_KINGDOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KINGDOM])) { + $errs[self::FIELD_KINGDOM] = []; + } + $errs[self::FIELD_KINGDOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDER])) { + $v = $this->getOrder(); + foreach($validationRules[self::FIELD_ORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM_GENERAL, self::FIELD_ORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDER])) { + $errs[self::FIELD_ORDER] = []; + } + $errs[self::FIELD_ORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHYLUM])) { + $v = $this->getPhylum(); + foreach($validationRules[self::FIELD_PHYLUM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_ORGANISM_GENERAL, self::FIELD_PHYLUM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHYLUM])) { + $errs[self::FIELD_PHYLUM] = []; + } + $errs[self::FIELD_PHYLUM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescription.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescription.php index 251e6b1cd1..eb8336b8a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescription.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRSubstanceSourceMaterialPartDescription extends FHIRBackboneElement * Validation map for fields in type SubstanceSourceMaterial.PartDescription * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSourceMaterialPartDescription Constructor @@ -245,12 +245,97 @@ public function setPartLocation(FHIRCodeableConcept $partLocation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_LOCATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PART])) { + $v = $this->getPart(); + foreach($validationRules[self::FIELD_PART] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_PART_DESCRIPTION, self::FIELD_PART, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART])) { + $errs[self::FIELD_PART] = []; + } + $errs[self::FIELD_PART][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_LOCATION])) { + $v = $this->getPartLocation(); + foreach($validationRules[self::FIELD_PART_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL_DOT_PART_DESCRIPTION, self::FIELD_PART_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_LOCATION])) { + $errs[self::FIELD_PART_LOCATION] = []; + } + $errs[self::FIELD_PART_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCode.php index 837bbc9078..d5a7aa8d63 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRSubstanceSpecificationCode extends FHIRBackboneElement * Validation map for fields in type SubstanceSpecification.Code * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecificationCode Constructor @@ -480,12 +480,150 @@ public function setStatusDate($statusDate = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_DATE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_CODE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_CODE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_CODE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_CODE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_DATE])) { + $v = $this->getStatusDate(); + foreach($validationRules[self::FIELD_STATUS_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_CODE, self::FIELD_STATUS_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_DATE])) { + $errs[self::FIELD_STATUS_DATE] = []; + } + $errs[self::FIELD_STATUS_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotope.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotope.php index a776d17730..0c737f8aa1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotope.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotope.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRSubstanceSpecificationIsotope extends FHIRBackboneElement * Validation map for fields in type SubstanceSpecification.Isotope * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecificationIsotope Constructor @@ -386,12 +386,148 @@ public function setSubstitution(FHIRCodeableConcept $substitution = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHalfLife())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HALF_LIFE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMolecularWeight())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MOLECULAR_WEIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstitution())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTITUTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HALF_LIFE])) { + $v = $this->getHalfLife(); + foreach($validationRules[self::FIELD_HALF_LIFE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_ISOTOPE, self::FIELD_HALF_LIFE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HALF_LIFE])) { + $errs[self::FIELD_HALF_LIFE] = []; + } + $errs[self::FIELD_HALF_LIFE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_ISOTOPE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MOLECULAR_WEIGHT])) { + $v = $this->getMolecularWeight(); + foreach($validationRules[self::FIELD_MOLECULAR_WEIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_ISOTOPE, self::FIELD_MOLECULAR_WEIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MOLECULAR_WEIGHT])) { + $errs[self::FIELD_MOLECULAR_WEIGHT] = []; + } + $errs[self::FIELD_MOLECULAR_WEIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_ISOTOPE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTITUTION])) { + $v = $this->getSubstitution(); + foreach($validationRules[self::FIELD_SUBSTITUTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_ISOTOPE, self::FIELD_SUBSTITUTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTITUTION])) { + $errs[self::FIELD_SUBSTITUTION] = []; + } + $errs[self::FIELD_SUBSTITUTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoiety.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoiety.php index 14c18bb0bc..10a69fc0f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoiety.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoiety.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -194,7 +194,7 @@ class FHIRSubstanceSpecificationMoiety extends FHIRBackboneElement * Validation map for fields in type SubstanceSpecification.Moiety * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecificationMoiety Constructor @@ -615,12 +615,199 @@ public function setStereochemistry(FHIRCodeableConcept $stereochemistry = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmountQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMolecularFormula())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MOLECULAR_FORMULA] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOpticalActivity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPTICAL_ACTIVITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStereochemistry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STEREOCHEMISTRY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT_QUANTITY])) { + $v = $this->getAmountQuantity(); + foreach($validationRules[self::FIELD_AMOUNT_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOIETY, self::FIELD_AMOUNT_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_QUANTITY])) { + $errs[self::FIELD_AMOUNT_QUANTITY] = []; + } + $errs[self::FIELD_AMOUNT_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_STRING])) { + $v = $this->getAmountString(); + foreach($validationRules[self::FIELD_AMOUNT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOIETY, self::FIELD_AMOUNT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_STRING])) { + $errs[self::FIELD_AMOUNT_STRING] = []; + } + $errs[self::FIELD_AMOUNT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOIETY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MOLECULAR_FORMULA])) { + $v = $this->getMolecularFormula(); + foreach($validationRules[self::FIELD_MOLECULAR_FORMULA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOIETY, self::FIELD_MOLECULAR_FORMULA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MOLECULAR_FORMULA])) { + $errs[self::FIELD_MOLECULAR_FORMULA] = []; + } + $errs[self::FIELD_MOLECULAR_FORMULA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOIETY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPTICAL_ACTIVITY])) { + $v = $this->getOpticalActivity(); + foreach($validationRules[self::FIELD_OPTICAL_ACTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOIETY, self::FIELD_OPTICAL_ACTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPTICAL_ACTIVITY])) { + $errs[self::FIELD_OPTICAL_ACTIVITY] = []; + } + $errs[self::FIELD_OPTICAL_ACTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOIETY, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STEREOCHEMISTRY])) { + $v = $this->getStereochemistry(); + foreach($validationRules[self::FIELD_STEREOCHEMISTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOIETY, self::FIELD_STEREOCHEMISTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STEREOCHEMISTRY])) { + $errs[self::FIELD_STEREOCHEMISTRY] = []; + } + $errs[self::FIELD_STEREOCHEMISTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeight.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeight.php index 559803ec3e..b29f568c7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeight.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeight.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRSubstanceSpecificationMolecularWeight extends FHIRBackboneElement * Validation map for fields in type SubstanceSpecification.MolecularWeight * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecificationMolecularWeight Constructor @@ -296,12 +296,114 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOLECULAR_WEIGHT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOLECULAR_WEIGHT, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_MOLECULAR_WEIGHT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationName.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationName.php index 3675b7db45..162e62b426 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationName.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -225,7 +225,7 @@ class FHIRSubstanceSpecificationName extends FHIRBackboneElement * Validation map for fields in type SubstanceSpecification.Name * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecificationName Constructor @@ -985,12 +985,264 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDomain())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOMAIN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLanguage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LANGUAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOfficial())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OFFICIAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPreferred())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFERRED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSynonym())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SYNONYM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTranslation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TRANSLATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOMAIN])) { + $v = $this->getDomain(); + foreach($validationRules[self::FIELD_DOMAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_DOMAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOMAIN])) { + $errs[self::FIELD_DOMAIN] = []; + } + $errs[self::FIELD_DOMAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFICIAL])) { + $v = $this->getOfficial(); + foreach($validationRules[self::FIELD_OFFICIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_OFFICIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFICIAL])) { + $errs[self::FIELD_OFFICIAL] = []; + } + $errs[self::FIELD_OFFICIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFERRED])) { + $v = $this->getPreferred(); + foreach($validationRules[self::FIELD_PREFERRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_PREFERRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFERRED])) { + $errs[self::FIELD_PREFERRED] = []; + } + $errs[self::FIELD_PREFERRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYNONYM])) { + $v = $this->getSynonym(); + foreach($validationRules[self::FIELD_SYNONYM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_SYNONYM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYNONYM])) { + $errs[self::FIELD_SYNONYM] = []; + } + $errs[self::FIELD_SYNONYM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRANSLATION])) { + $v = $this->getTranslation(); + foreach($validationRules[self::FIELD_TRANSLATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_TRANSLATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSLATION])) { + $errs[self::FIELD_TRANSLATION] = []; + } + $errs[self::FIELD_TRANSLATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_NAME, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficial.php index 1455e37b39..2b3360a4de 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRSubstanceSpecificationOfficial extends FHIRBackboneElement * Validation map for fields in type SubstanceSpecification.Official * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecificationOfficial Constructor @@ -315,12 +315,114 @@ public function setStatus(FHIRCodeableConcept $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_OFFICIAL, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_OFFICIAL, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_OFFICIAL, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationProperty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationProperty.php index 3a8f56feb2..853f420e65 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationProperty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationProperty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -183,7 +183,7 @@ class FHIRSubstanceSpecificationProperty extends FHIRBackboneElement * Validation map for fields in type SubstanceSpecification.Property * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecificationProperty Constructor @@ -547,12 +547,182 @@ public function setParameters($parameters = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmountQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefiningSubstanceCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINING_SUBSTANCE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefiningSubstanceReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINING_SUBSTANCE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getParameters())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARAMETERS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT_QUANTITY])) { + $v = $this->getAmountQuantity(); + foreach($validationRules[self::FIELD_AMOUNT_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_PROPERTY, self::FIELD_AMOUNT_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_QUANTITY])) { + $errs[self::FIELD_AMOUNT_QUANTITY] = []; + } + $errs[self::FIELD_AMOUNT_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_STRING])) { + $v = $this->getAmountString(); + foreach($validationRules[self::FIELD_AMOUNT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_PROPERTY, self::FIELD_AMOUNT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_STRING])) { + $errs[self::FIELD_AMOUNT_STRING] = []; + } + $errs[self::FIELD_AMOUNT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_PROPERTY, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_PROPERTY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINING_SUBSTANCE_CODEABLE_CONCEPT])) { + $v = $this->getDefiningSubstanceCodeableConcept(); + foreach($validationRules[self::FIELD_DEFINING_SUBSTANCE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_PROPERTY, self::FIELD_DEFINING_SUBSTANCE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINING_SUBSTANCE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DEFINING_SUBSTANCE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DEFINING_SUBSTANCE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINING_SUBSTANCE_REFERENCE])) { + $v = $this->getDefiningSubstanceReference(); + foreach($validationRules[self::FIELD_DEFINING_SUBSTANCE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_PROPERTY, self::FIELD_DEFINING_SUBSTANCE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINING_SUBSTANCE_REFERENCE])) { + $errs[self::FIELD_DEFINING_SUBSTANCE_REFERENCE] = []; + } + $errs[self::FIELD_DEFINING_SUBSTANCE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETERS])) { + $v = $this->getParameters(); + foreach($validationRules[self::FIELD_PARAMETERS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_PROPERTY, self::FIELD_PARAMETERS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETERS])) { + $errs[self::FIELD_PARAMETERS] = []; + } + $errs[self::FIELD_PARAMETERS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationship.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationship.php index 5bb1f21655..f718853fb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationship.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationship.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -244,7 +244,7 @@ class FHIRSubstanceSpecificationRelationship extends FHIRBackboneElement * Validation map for fields in type SubstanceSpecification.Relationship * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecificationRelationship Constructor @@ -813,12 +813,252 @@ public function setSubstanceReference(FHIRReference $substanceReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmountQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountRatioLowLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_RATIO_LOW_LIMIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmountType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsDefining())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_DEFINING] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubstanceCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstanceReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT_QUANTITY])) { + $v = $this->getAmountQuantity(); + foreach($validationRules[self::FIELD_AMOUNT_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_AMOUNT_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_QUANTITY])) { + $errs[self::FIELD_AMOUNT_QUANTITY] = []; + } + $errs[self::FIELD_AMOUNT_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_RANGE])) { + $v = $this->getAmountRange(); + foreach($validationRules[self::FIELD_AMOUNT_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_AMOUNT_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_RANGE])) { + $errs[self::FIELD_AMOUNT_RANGE] = []; + } + $errs[self::FIELD_AMOUNT_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_RATIO])) { + $v = $this->getAmountRatio(); + foreach($validationRules[self::FIELD_AMOUNT_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_AMOUNT_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_RATIO])) { + $errs[self::FIELD_AMOUNT_RATIO] = []; + } + $errs[self::FIELD_AMOUNT_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_RATIO_LOW_LIMIT])) { + $v = $this->getAmountRatioLowLimit(); + foreach($validationRules[self::FIELD_AMOUNT_RATIO_LOW_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_AMOUNT_RATIO_LOW_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_RATIO_LOW_LIMIT])) { + $errs[self::FIELD_AMOUNT_RATIO_LOW_LIMIT] = []; + } + $errs[self::FIELD_AMOUNT_RATIO_LOW_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_STRING])) { + $v = $this->getAmountString(); + foreach($validationRules[self::FIELD_AMOUNT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_AMOUNT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_STRING])) { + $errs[self::FIELD_AMOUNT_STRING] = []; + } + $errs[self::FIELD_AMOUNT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT_TYPE])) { + $v = $this->getAmountType(); + foreach($validationRules[self::FIELD_AMOUNT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_AMOUNT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT_TYPE])) { + $errs[self::FIELD_AMOUNT_TYPE] = []; + } + $errs[self::FIELD_AMOUNT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_DEFINING])) { + $v = $this->getIsDefining(); + foreach($validationRules[self::FIELD_IS_DEFINING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_IS_DEFINING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_DEFINING])) { + $errs[self::FIELD_IS_DEFINING] = []; + } + $errs[self::FIELD_IS_DEFINING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT])) { + $v = $this->getSubstanceCodeableConcept(); + foreach($validationRules[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_SUBSTANCE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE_REFERENCE])) { + $v = $this->getSubstanceReference(); + foreach($validationRules[self::FIELD_SUBSTANCE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_RELATIONSHIP, self::FIELD_SUBSTANCE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE_REFERENCE])) { + $errs[self::FIELD_SUBSTANCE_REFERENCE] = []; + } + $errs[self::FIELD_SUBSTANCE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentation.php index 7117e44fe3..52722de206 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRSubstanceSpecificationRepresentation extends FHIRBackboneElement * Validation map for fields in type SubstanceSpecification.Representation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecificationRepresentation Constructor @@ -307,12 +307,114 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getRepresentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPRESENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ATTACHMENT])) { + $v = $this->getAttachment(); + foreach($validationRules[self::FIELD_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_REPRESENTATION, self::FIELD_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTACHMENT])) { + $errs[self::FIELD_ATTACHMENT] = []; + } + $errs[self::FIELD_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPRESENTATION])) { + $v = $this->getRepresentation(); + foreach($validationRules[self::FIELD_REPRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_REPRESENTATION, self::FIELD_REPRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPRESENTATION])) { + $errs[self::FIELD_REPRESENTATION] = []; + } + $errs[self::FIELD_REPRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_REPRESENTATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructure.php index e432212b81..d37adf0036 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -187,7 +187,7 @@ class FHIRSubstanceSpecificationStructure extends FHIRBackboneElement * Validation map for fields in type SubstanceSpecification.Structure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecificationStructure Constructor @@ -684,12 +684,205 @@ public function setStereochemistry(FHIRCodeableConcept $stereochemistry = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getIsotope())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ISOTOPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMolecularFormula())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MOLECULAR_FORMULA] = $fieldErrs; + } + } + if (null !== ($v = $this->getMolecularFormulaByMoiety())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMolecularWeight())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MOLECULAR_WEIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOpticalActivity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPTICAL_ACTIVITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRepresentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPRESENTATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStereochemistry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STEREOCHEMISTRY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ISOTOPE])) { + $v = $this->getIsotope(); + foreach($validationRules[self::FIELD_ISOTOPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_STRUCTURE, self::FIELD_ISOTOPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISOTOPE])) { + $errs[self::FIELD_ISOTOPE] = []; + } + $errs[self::FIELD_ISOTOPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MOLECULAR_FORMULA])) { + $v = $this->getMolecularFormula(); + foreach($validationRules[self::FIELD_MOLECULAR_FORMULA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_STRUCTURE, self::FIELD_MOLECULAR_FORMULA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MOLECULAR_FORMULA])) { + $errs[self::FIELD_MOLECULAR_FORMULA] = []; + } + $errs[self::FIELD_MOLECULAR_FORMULA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY])) { + $v = $this->getMolecularFormulaByMoiety(); + foreach($validationRules[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_STRUCTURE, self::FIELD_MOLECULAR_FORMULA_BY_MOIETY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY])) { + $errs[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY] = []; + } + $errs[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MOLECULAR_WEIGHT])) { + $v = $this->getMolecularWeight(); + foreach($validationRules[self::FIELD_MOLECULAR_WEIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_STRUCTURE, self::FIELD_MOLECULAR_WEIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MOLECULAR_WEIGHT])) { + $errs[self::FIELD_MOLECULAR_WEIGHT] = []; + } + $errs[self::FIELD_MOLECULAR_WEIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPTICAL_ACTIVITY])) { + $v = $this->getOpticalActivity(); + foreach($validationRules[self::FIELD_OPTICAL_ACTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_STRUCTURE, self::FIELD_OPTICAL_ACTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPTICAL_ACTIVITY])) { + $errs[self::FIELD_OPTICAL_ACTIVITY] = []; + } + $errs[self::FIELD_OPTICAL_ACTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPRESENTATION])) { + $v = $this->getRepresentation(); + foreach($validationRules[self::FIELD_REPRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_STRUCTURE, self::FIELD_REPRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPRESENTATION])) { + $errs[self::FIELD_REPRESENTATION] = []; + } + $errs[self::FIELD_REPRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_STRUCTURE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STEREOCHEMISTRY])) { + $v = $this->getStereochemistry(); + foreach($validationRules[self::FIELD_STEREOCHEMISTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION_DOT_STRUCTURE, self::FIELD_STEREOCHEMISTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STEREOCHEMISTRY])) { + $errs[self::FIELD_STEREOCHEMISTRY] = []; + } + $errs[self::FIELD_STEREOCHEMISTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php index 1f97d2adaa..0adebaad54 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRSupplyDeliverySuppliedItem extends FHIRBackboneElement * Validation map for fields in type SupplyDelivery.SuppliedItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyDeliverySuppliedItem Constructor @@ -296,12 +296,114 @@ public function setQuantity(FHIRQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_DOT_SUPPLIED_ITEM, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_DOT_SUPPLIED_ITEM, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_DOT_SUPPLIED_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameter.php index b69b7d0255..ee94e8ee7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -153,7 +153,7 @@ class FHIRSupplyRequestParameter extends FHIRBackboneElement * Validation map for fields in type SupplyRequest.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyRequestParameter Constructor @@ -409,12 +409,148 @@ public function setValueRange(FHIRRange $valueRange = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_PARAMETER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_PARAMETER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_PARAMETER, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_PARAMETER, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_PARAMETER, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php index 96ef88c435..bcb4d594a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -869,7 +869,7 @@ class FHIRTaskInput extends FHIRBackboneElement * Validation map for fields in type Task.Input * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTaskInput Constructor @@ -3461,12 +3461,930 @@ public function setValueUuid($valueUuid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContributor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTRIBUTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueParameterDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRelatedArtifact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RELATED_ARTIFACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTriggerDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUsageContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_USAGE_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UUID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_AGE])) { + $v = $this->getValueAge(); + foreach($validationRules[self::FIELD_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_AGE])) { + $errs[self::FIELD_VALUE_AGE] = []; + } + $errs[self::FIELD_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CANONICAL])) { + $v = $this->getValueCanonical(); + foreach($validationRules[self::FIELD_VALUE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CANONICAL])) { + $errs[self::FIELD_VALUE_CANONICAL] = []; + } + $errs[self::FIELD_VALUE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_DETAIL])) { + $v = $this->getValueContactDetail(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CONTACT_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_DETAIL])) { + $errs[self::FIELD_VALUE_CONTACT_DETAIL] = []; + } + $errs[self::FIELD_VALUE_CONTACT_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTRIBUTOR])) { + $v = $this->getValueContributor(); + foreach($validationRules[self::FIELD_VALUE_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTRIBUTOR])) { + $errs[self::FIELD_VALUE_CONTRIBUTOR] = []; + } + $errs[self::FIELD_VALUE_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_COUNT])) { + $v = $this->getValueCount(); + foreach($validationRules[self::FIELD_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_COUNT])) { + $errs[self::FIELD_VALUE_COUNT] = []; + } + $errs[self::FIELD_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATA_REQUIREMENT])) { + $v = $this->getValueDataRequirement(); + foreach($validationRules[self::FIELD_VALUE_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATA_REQUIREMENT])) { + $errs[self::FIELD_VALUE_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_VALUE_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DISTANCE])) { + $v = $this->getValueDistance(); + foreach($validationRules[self::FIELD_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DISTANCE])) { + $errs[self::FIELD_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DOSAGE])) { + $v = $this->getValueDosage(); + foreach($validationRules[self::FIELD_VALUE_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DOSAGE])) { + $errs[self::FIELD_VALUE_DOSAGE] = []; + } + $errs[self::FIELD_VALUE_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_EXPRESSION])) { + $v = $this->getValueExpression(); + foreach($validationRules[self::FIELD_VALUE_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_EXPRESSION])) { + $errs[self::FIELD_VALUE_EXPRESSION] = []; + } + $errs[self::FIELD_VALUE_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PARAMETER_DEFINITION])) { + $v = $this->getValueParameterDefinition(); + foreach($validationRules[self::FIELD_VALUE_PARAMETER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_PARAMETER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PARAMETER_DEFINITION])) { + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RELATED_ARTIFACT])) { + $v = $this->getValueRelatedArtifact(); + foreach($validationRules[self::FIELD_VALUE_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RELATED_ARTIFACT])) { + $errs[self::FIELD_VALUE_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_VALUE_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TRIGGER_DEFINITION])) { + $v = $this->getValueTriggerDefinition(); + foreach($validationRules[self::FIELD_VALUE_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TRIGGER_DEFINITION])) { + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URL])) { + $v = $this->getValueUrl(); + foreach($validationRules[self::FIELD_VALUE_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URL])) { + $errs[self::FIELD_VALUE_URL] = []; + } + $errs[self::FIELD_VALUE_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_USAGE_CONTEXT])) { + $v = $this->getValueUsageContext(); + foreach($validationRules[self::FIELD_VALUE_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_USAGE_CONTEXT])) { + $errs[self::FIELD_VALUE_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_VALUE_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UUID])) { + $v = $this->getValueUuid(); + foreach($validationRules[self::FIELD_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UUID])) { + $errs[self::FIELD_VALUE_UUID] = []; + } + $errs[self::FIELD_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php index aee072e576..818a5f627b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -868,7 +868,7 @@ class FHIRTaskOutput extends FHIRBackboneElement * Validation map for fields in type Task.Output * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTaskOutput Constructor @@ -3458,12 +3458,930 @@ public function setValueUuid($valueUuid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContributor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTRIBUTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueParameterDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRelatedArtifact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RELATED_ARTIFACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTriggerDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUsageContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_USAGE_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UUID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_AGE])) { + $v = $this->getValueAge(); + foreach($validationRules[self::FIELD_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_AGE])) { + $errs[self::FIELD_VALUE_AGE] = []; + } + $errs[self::FIELD_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CANONICAL])) { + $v = $this->getValueCanonical(); + foreach($validationRules[self::FIELD_VALUE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CANONICAL])) { + $errs[self::FIELD_VALUE_CANONICAL] = []; + } + $errs[self::FIELD_VALUE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_DETAIL])) { + $v = $this->getValueContactDetail(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CONTACT_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_DETAIL])) { + $errs[self::FIELD_VALUE_CONTACT_DETAIL] = []; + } + $errs[self::FIELD_VALUE_CONTACT_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTRIBUTOR])) { + $v = $this->getValueContributor(); + foreach($validationRules[self::FIELD_VALUE_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTRIBUTOR])) { + $errs[self::FIELD_VALUE_CONTRIBUTOR] = []; + } + $errs[self::FIELD_VALUE_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_COUNT])) { + $v = $this->getValueCount(); + foreach($validationRules[self::FIELD_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_COUNT])) { + $errs[self::FIELD_VALUE_COUNT] = []; + } + $errs[self::FIELD_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATA_REQUIREMENT])) { + $v = $this->getValueDataRequirement(); + foreach($validationRules[self::FIELD_VALUE_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATA_REQUIREMENT])) { + $errs[self::FIELD_VALUE_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_VALUE_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DISTANCE])) { + $v = $this->getValueDistance(); + foreach($validationRules[self::FIELD_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DISTANCE])) { + $errs[self::FIELD_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DOSAGE])) { + $v = $this->getValueDosage(); + foreach($validationRules[self::FIELD_VALUE_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DOSAGE])) { + $errs[self::FIELD_VALUE_DOSAGE] = []; + } + $errs[self::FIELD_VALUE_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_EXPRESSION])) { + $v = $this->getValueExpression(); + foreach($validationRules[self::FIELD_VALUE_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_EXPRESSION])) { + $errs[self::FIELD_VALUE_EXPRESSION] = []; + } + $errs[self::FIELD_VALUE_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PARAMETER_DEFINITION])) { + $v = $this->getValueParameterDefinition(); + foreach($validationRules[self::FIELD_VALUE_PARAMETER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_PARAMETER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PARAMETER_DEFINITION])) { + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RELATED_ARTIFACT])) { + $v = $this->getValueRelatedArtifact(); + foreach($validationRules[self::FIELD_VALUE_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RELATED_ARTIFACT])) { + $errs[self::FIELD_VALUE_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_VALUE_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TRIGGER_DEFINITION])) { + $v = $this->getValueTriggerDefinition(); + foreach($validationRules[self::FIELD_VALUE_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TRIGGER_DEFINITION])) { + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URL])) { + $v = $this->getValueUrl(); + foreach($validationRules[self::FIELD_VALUE_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URL])) { + $errs[self::FIELD_VALUE_URL] = []; + } + $errs[self::FIELD_VALUE_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_USAGE_CONTEXT])) { + $v = $this->getValueUsageContext(); + foreach($validationRules[self::FIELD_VALUE_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_USAGE_CONTEXT])) { + $errs[self::FIELD_VALUE_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_VALUE_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UUID])) { + $v = $this->getValueUuid(); + foreach($validationRules[self::FIELD_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UUID])) { + $errs[self::FIELD_VALUE_UUID] = []; + } + $errs[self::FIELD_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php index 22b65da471..15b3cd9273 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRTaskRestriction extends FHIRBackboneElement * Validation map for fields in type Task.Restriction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTaskRestriction Constructor @@ -341,12 +341,116 @@ public function setRepetitions($repetitions = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRepetitions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPETITIONS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_RESTRICTION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_RESTRICTION, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPETITIONS])) { + $v = $this->getRepetitions(); + foreach($validationRules[self::FIELD_REPETITIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_RESTRICTION, self::FIELD_REPETITIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPETITIONS])) { + $errs[self::FIELD_REPETITIONS] = []; + } + $errs[self::FIELD_REPETITIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosure.php index 74a20950d5..efab704693 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRTerminologyCapabilitiesClosure extends FHIRBackboneElement * Validation map for fields in type TerminologyCapabilities.Closure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTerminologyCapabilitiesClosure Constructor @@ -199,12 +199,80 @@ public function setTranslation($translation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getTranslation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRANSLATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TRANSLATION])) { + $v = $this->getTranslation(); + foreach($validationRules[self::FIELD_TRANSLATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_CLOSURE, self::FIELD_TRANSLATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSLATION])) { + $errs[self::FIELD_TRANSLATION] = []; + } + $errs[self::FIELD_TRANSLATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystem.php index f34f1c34be..8def4c5879 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRTerminologyCapabilitiesCodeSystem extends FHIRBackboneElement * Validation map for fields in type TerminologyCapabilities.CodeSystem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTerminologyCapabilitiesCodeSystem Constructor @@ -363,12 +363,116 @@ public function setVersion(array $version = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSubsumption())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSUMPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVersion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VERSION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_SUBSUMPTION])) { + $v = $this->getSubsumption(); + foreach($validationRules[self::FIELD_SUBSUMPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_CODE_SYSTEM, self::FIELD_SUBSUMPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSUMPTION])) { + $errs[self::FIELD_SUBSUMPTION] = []; + } + $errs[self::FIELD_SUBSUMPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_CODE_SYSTEM, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_CODE_SYSTEM, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansion.php index 65cf8483f4..a2d45ded51 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -153,7 +153,7 @@ class FHIRTerminologyCapabilitiesExpansion extends FHIRBackboneElement * Validation map for fields in type TerminologyCapabilities.Expansion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTerminologyCapabilitiesExpansion Constructor @@ -514,12 +514,150 @@ public function setTextFilter($textFilter = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHierarchical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIERARCHICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getIncomplete())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INCOMPLETE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaging())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAGING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTextFilter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT_FILTER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HIERARCHICAL])) { + $v = $this->getHierarchical(); + foreach($validationRules[self::FIELD_HIERARCHICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_EXPANSION, self::FIELD_HIERARCHICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIERARCHICAL])) { + $errs[self::FIELD_HIERARCHICAL] = []; + } + $errs[self::FIELD_HIERARCHICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCOMPLETE])) { + $v = $this->getIncomplete(); + foreach($validationRules[self::FIELD_INCOMPLETE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_EXPANSION, self::FIELD_INCOMPLETE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCOMPLETE])) { + $errs[self::FIELD_INCOMPLETE] = []; + } + $errs[self::FIELD_INCOMPLETE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAGING])) { + $v = $this->getPaging(); + foreach($validationRules[self::FIELD_PAGING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_EXPANSION, self::FIELD_PAGING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAGING])) { + $errs[self::FIELD_PAGING] = []; + } + $errs[self::FIELD_PAGING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_EXPANSION, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT_FILTER])) { + $v = $this->getTextFilter(); + foreach($validationRules[self::FIELD_TEXT_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_EXPANSION, self::FIELD_TEXT_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT_FILTER])) { + $errs[self::FIELD_TEXT_FILTER] = []; + } + $errs[self::FIELD_TEXT_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilter.php index 65c2eef8b5..e4c4edb639 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRTerminologyCapabilitiesFilter extends FHIRBackboneElement * Validation map for fields in type TerminologyCapabilities.Filter * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_OP => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -328,12 +328,99 @@ public function setOp(array $op = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOp())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OP, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_FILTER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OP])) { + $v = $this->getOp(); + foreach($validationRules[self::FIELD_OP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_FILTER, self::FIELD_OP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OP])) { + $errs[self::FIELD_OP] = []; + } + $errs[self::FIELD_OP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementation.php index 5ba5510090..ecc156bd61 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRTerminologyCapabilitiesImplementation extends FHIRBackboneElement * Validation map for fields in type TerminologyCapabilities.Implementation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTerminologyCapabilitiesImplementation Constructor @@ -280,12 +280,97 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_IMPLEMENTATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_IMPLEMENTATION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameter.php index 65c20271a2..ed6d7c0233 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRTerminologyCapabilitiesParameter extends FHIRBackboneElement * Validation map for fields in type TerminologyCapabilities.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTerminologyCapabilitiesParameter Constructor @@ -280,12 +280,97 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_PARAMETER, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftware.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftware.php index 1478726396..933cdc54f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftware.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftware.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTerminologyCapabilitiesSoftware extends FHIRBackboneElement * Validation map for fields in type TerminologyCapabilities.Software * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTerminologyCapabilitiesSoftware Constructor @@ -276,12 +276,97 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_SOFTWARE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_SOFTWARE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslation.php index de85370158..ca95eed39e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRTerminologyCapabilitiesTranslation extends FHIRBackboneElement * Validation map for fields in type TerminologyCapabilities.Translation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTerminologyCapabilitiesTranslation Constructor @@ -199,12 +199,80 @@ public function setNeedsMap($needsMap = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getNeedsMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NEEDS_MAP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NEEDS_MAP])) { + $v = $this->getNeedsMap(); + foreach($validationRules[self::FIELD_NEEDS_MAP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_TRANSLATION, self::FIELD_NEEDS_MAP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NEEDS_MAP])) { + $errs[self::FIELD_NEEDS_MAP] = []; + } + $errs[self::FIELD_NEEDS_MAP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCode.php index 20fd3a369f..9a8c86456a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRTerminologyCapabilitiesValidateCode extends FHIRBackboneElement * Validation map for fields in type TerminologyCapabilities.ValidateCode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTerminologyCapabilitiesValidateCode Constructor @@ -199,12 +199,80 @@ public function setTranslations($translations = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getTranslations())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRANSLATIONS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TRANSLATIONS])) { + $v = $this->getTranslations(); + foreach($validationRules[self::FIELD_TRANSLATIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_VALIDATE_CODE, self::FIELD_TRANSLATIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSLATIONS])) { + $errs[self::FIELD_TRANSLATIONS] = []; + } + $errs[self::FIELD_TRANSLATIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersion.php index d71e7b70e5..a6d88cacb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -167,7 +167,7 @@ class FHIRTerminologyCapabilitiesVersion extends FHIRBackboneElement * Validation map for fields in type TerminologyCapabilities.Version * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTerminologyCapabilitiesVersion Constructor @@ -673,12 +673,171 @@ public function setProperty(array $property = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompositional())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSITIONAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FILTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIsDefault())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_DEFAULT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLanguage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LANGUAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProperty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROPERTY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_VERSION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPOSITIONAL])) { + $v = $this->getCompositional(); + foreach($validationRules[self::FIELD_COMPOSITIONAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_VERSION, self::FIELD_COMPOSITIONAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPOSITIONAL])) { + $errs[self::FIELD_COMPOSITIONAL] = []; + } + $errs[self::FIELD_COMPOSITIONAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FILTER])) { + $v = $this->getFilter(); + foreach($validationRules[self::FIELD_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_VERSION, self::FIELD_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FILTER])) { + $errs[self::FIELD_FILTER] = []; + } + $errs[self::FIELD_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_DEFAULT])) { + $v = $this->getIsDefault(); + foreach($validationRules[self::FIELD_IS_DEFAULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_VERSION, self::FIELD_IS_DEFAULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_DEFAULT])) { + $errs[self::FIELD_IS_DEFAULT] = []; + } + $errs[self::FIELD_IS_DEFAULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_VERSION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES_DOT_VERSION, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php index 55a0c29f55..eced9b207b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRTestReportAction extends FHIRBackboneElement * Validation map for fields in type TestReport.Action * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportAction Constructor @@ -211,12 +211,97 @@ public function setOperation(FHIRTestReportOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERT])) { + $v = $this->getAssert(); + foreach($validationRules[self::FIELD_ASSERT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ACTION, self::FIELD_ASSERT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERT])) { + $errs[self::FIELD_ASSERT] = []; + } + $errs[self::FIELD_ASSERT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ACTION, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php index 105fa72881..0173e4da31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRTestReportAction1 extends FHIRBackboneElement * Validation map for fields in type TestReport.Action1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportAction1 Constructor @@ -211,12 +211,97 @@ public function setOperation(FHIRTestReportOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERT])) { + $v = $this->getAssert(); + foreach($validationRules[self::FIELD_ASSERT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ACTION_1, self::FIELD_ASSERT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERT])) { + $errs[self::FIELD_ASSERT] = []; + } + $errs[self::FIELD_ASSERT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ACTION_1, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php index d93510d284..f6e0f6a86f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRTestReportAction2 extends FHIRBackboneElement * Validation map for fields in type TestReport.Action2 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportAction2 Constructor @@ -168,12 +168,80 @@ public function setOperation(FHIRTestReportOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ACTION_2, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php index d0a36e59bc..992c09e17d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRTestReportAssert extends FHIRBackboneElement * Validation map for fields in type TestReport.Assert * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportAssert Constructor @@ -351,12 +351,114 @@ public function setResult(FHIRTestReportActionResult $result = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMessage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResult())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESULT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ASSERT, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MESSAGE])) { + $v = $this->getMessage(); + foreach($validationRules[self::FIELD_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ASSERT, self::FIELD_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MESSAGE])) { + $errs[self::FIELD_MESSAGE] = []; + } + $errs[self::FIELD_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ASSERT, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php index de3a683180..d8bb129ddb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRTestReportOperation extends FHIRBackboneElement * Validation map for fields in type TestReport.Operation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportOperation Constructor @@ -351,12 +351,114 @@ public function setResult(FHIRTestReportActionResult $result = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMessage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResult())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESULT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_OPERATION, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MESSAGE])) { + $v = $this->getMessage(); + foreach($validationRules[self::FIELD_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_OPERATION, self::FIELD_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MESSAGE])) { + $errs[self::FIELD_MESSAGE] = []; + } + $errs[self::FIELD_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_OPERATION, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php index be1e37b7ef..5795d97f37 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRTestReportParticipant extends FHIRBackboneElement * Validation map for fields in type TestReport.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportParticipant Constructor @@ -339,12 +339,114 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_PARTICIPANT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_PARTICIPANT, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php index cecd94ded0..41c3868edf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRTestReportSetup extends FHIRBackboneElement * Validation map for fields in type TestReport.Setup * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -207,12 +207,82 @@ public function setAction(array $action = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_SETUP, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php index a6232478e1..47d1fb6200 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRTestReportTeardown extends FHIRBackboneElement * Validation map for fields in type TestReport.Teardown * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -207,12 +207,82 @@ public function setAction(array $action = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_TEARDOWN, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php index 77f9863c8f..5d8639165e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRTestReportTest extends FHIRBackboneElement * Validation map for fields in type TestReport.Test * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -359,12 +359,116 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_TEST, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_TEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_TEST, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php index 551217d571..aa5c854c6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRTestScriptAction extends FHIRBackboneElement * Validation map for fields in type TestScript.Action * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAction Constructor @@ -221,12 +221,97 @@ public function setOperation(FHIRTestScriptOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERT])) { + $v = $this->getAssert(); + foreach($validationRules[self::FIELD_ASSERT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION, self::FIELD_ASSERT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERT])) { + $errs[self::FIELD_ASSERT] = []; + } + $errs[self::FIELD_ASSERT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php index f67c149e42..b731f75462 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRTestScriptAction1 extends FHIRBackboneElement * Validation map for fields in type TestScript.Action1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAction1 Constructor @@ -221,12 +221,97 @@ public function setOperation(FHIRTestScriptOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERT])) { + $v = $this->getAssert(); + foreach($validationRules[self::FIELD_ASSERT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION_1, self::FIELD_ASSERT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERT])) { + $errs[self::FIELD_ASSERT] = []; + } + $errs[self::FIELD_ASSERT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION_1, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php index b98bf2548b..6dec3485f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRTestScriptAction2 extends FHIRBackboneElement * Validation map for fields in type TestScript.Action2 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAction2 Constructor @@ -172,12 +172,80 @@ public function setOperation(FHIRTestScriptOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION_2, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php index d38c297a5e..7948dd7a44 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -396,7 +396,7 @@ class FHIRTestScriptAssert extends FHIRBackboneElement * Validation map for fields in type TestScript.Assert * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAssert Constructor @@ -1781,12 +1781,437 @@ public function setWarningOnly($warningOnly = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCompareToSourceExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompareToSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARE_TO_SOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompareToSourcePath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARE_TO_SOURCE_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDirection())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIRECTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeaderField())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEADER_FIELD] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinimumId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MINIMUM_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getNavigationLinks())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAVIGATION_LINKS] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestURL())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponseCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidateProfileId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDATE_PROFILE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWarningOnly())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WARNING_ONLY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { + $v = $this->getCompareToSourceExpression(); + foreach($validationRules[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_COMPARE_TO_SOURCE_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { + $errs[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION] = []; + } + $errs[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARE_TO_SOURCE_ID])) { + $v = $this->getCompareToSourceId(); + foreach($validationRules[self::FIELD_COMPARE_TO_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_COMPARE_TO_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARE_TO_SOURCE_ID])) { + $errs[self::FIELD_COMPARE_TO_SOURCE_ID] = []; + } + $errs[self::FIELD_COMPARE_TO_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARE_TO_SOURCE_PATH])) { + $v = $this->getCompareToSourcePath(); + foreach($validationRules[self::FIELD_COMPARE_TO_SOURCE_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_COMPARE_TO_SOURCE_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARE_TO_SOURCE_PATH])) { + $errs[self::FIELD_COMPARE_TO_SOURCE_PATH] = []; + } + $errs[self::FIELD_COMPARE_TO_SOURCE_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIRECTION])) { + $v = $this->getDirection(); + foreach($validationRules[self::FIELD_DIRECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_DIRECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIRECTION])) { + $errs[self::FIELD_DIRECTION] = []; + } + $errs[self::FIELD_DIRECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER_FIELD])) { + $v = $this->getHeaderField(); + foreach($validationRules[self::FIELD_HEADER_FIELD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_HEADER_FIELD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER_FIELD])) { + $errs[self::FIELD_HEADER_FIELD] = []; + } + $errs[self::FIELD_HEADER_FIELD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MINIMUM_ID])) { + $v = $this->getMinimumId(); + foreach($validationRules[self::FIELD_MINIMUM_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_MINIMUM_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MINIMUM_ID])) { + $errs[self::FIELD_MINIMUM_ID] = []; + } + $errs[self::FIELD_MINIMUM_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAVIGATION_LINKS])) { + $v = $this->getNavigationLinks(); + foreach($validationRules[self::FIELD_NAVIGATION_LINKS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_NAVIGATION_LINKS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAVIGATION_LINKS])) { + $errs[self::FIELD_NAVIGATION_LINKS] = []; + } + $errs[self::FIELD_NAVIGATION_LINKS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATOR])) { + $v = $this->getOperator(); + foreach($validationRules[self::FIELD_OPERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_OPERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATOR])) { + $errs[self::FIELD_OPERATOR] = []; + } + $errs[self::FIELD_OPERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_METHOD])) { + $v = $this->getRequestMethod(); + foreach($validationRules[self::FIELD_REQUEST_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_REQUEST_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_METHOD])) { + $errs[self::FIELD_REQUEST_METHOD] = []; + } + $errs[self::FIELD_REQUEST_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_URL])) { + $v = $this->getRequestURL(); + foreach($validationRules[self::FIELD_REQUEST_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_REQUEST_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_URL])) { + $errs[self::FIELD_REQUEST_URL] = []; + } + $errs[self::FIELD_REQUEST_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE_CODE])) { + $v = $this->getResponseCode(); + foreach($validationRules[self::FIELD_RESPONSE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RESPONSE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE_CODE])) { + $errs[self::FIELD_RESPONSE_CODE] = []; + } + $errs[self::FIELD_RESPONSE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ID])) { + $v = $this->getSourceId(); + foreach($validationRules[self::FIELD_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ID])) { + $errs[self::FIELD_SOURCE_ID] = []; + } + $errs[self::FIELD_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATE_PROFILE_ID])) { + $v = $this->getValidateProfileId(); + foreach($validationRules[self::FIELD_VALIDATE_PROFILE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_VALIDATE_PROFILE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATE_PROFILE_ID])) { + $errs[self::FIELD_VALIDATE_PROFILE_ID] = []; + } + $errs[self::FIELD_VALIDATE_PROFILE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WARNING_ONLY])) { + $v = $this->getWarningOnly(); + foreach($validationRules[self::FIELD_WARNING_ONLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_WARNING_ONLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WARNING_ONLY])) { + $errs[self::FIELD_WARNING_ONLY] = []; + } + $errs[self::FIELD_WARNING_ONLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php index 39712a0738..1e12578c4f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -186,7 +186,7 @@ class FHIRTestScriptCapability extends FHIRBackboneElement * Validation map for fields in type TestScript.Capability * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptCapability Constructor @@ -747,12 +747,186 @@ public function setValidated($validated = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCapabilities())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAPABILITIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOrigin())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ORIGIN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDATED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CAPABILITIES])) { + $v = $this->getCapabilities(); + foreach($validationRules[self::FIELD_CAPABILITIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_CAPABILITIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPABILITIES])) { + $errs[self::FIELD_CAPABILITIES] = []; + } + $errs[self::FIELD_CAPABILITIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED])) { + $v = $this->getRequired(); + foreach($validationRules[self::FIELD_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED])) { + $errs[self::FIELD_REQUIRED] = []; + } + $errs[self::FIELD_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATED])) { + $v = $this->getValidated(); + foreach($validationRules[self::FIELD_VALIDATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_VALIDATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATED])) { + $errs[self::FIELD_VALIDATED] = []; + } + $errs[self::FIELD_VALIDATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php index 31885315b2..57483e726c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptDestination extends FHIRBackboneElement * Validation map for fields in type TestScript.Destination * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptDestination Constructor @@ -254,12 +254,97 @@ public function setProfile(FHIRCoding $profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIndex())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDEX] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INDEX])) { + $v = $this->getIndex(); + foreach($validationRules[self::FIELD_INDEX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_DESTINATION, self::FIELD_INDEX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDEX])) { + $errs[self::FIELD_INDEX] = []; + } + $errs[self::FIELD_INDEX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_DESTINATION, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php index bbe2ff20b0..a1848c0721 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRTestScriptFixture extends FHIRBackboneElement * Validation map for fields in type TestScript.Fixture * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptFixture Constructor @@ -340,12 +340,114 @@ public function setResource(FHIRReference $resource = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAutocreate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTOCREATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAutodelete())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTODELETE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTOCREATE])) { + $v = $this->getAutocreate(); + foreach($validationRules[self::FIELD_AUTOCREATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_FIXTURE, self::FIELD_AUTOCREATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTOCREATE])) { + $errs[self::FIELD_AUTOCREATE] = []; + } + $errs[self::FIELD_AUTOCREATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTODELETE])) { + $v = $this->getAutodelete(); + foreach($validationRules[self::FIELD_AUTODELETE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_FIXTURE, self::FIELD_AUTODELETE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTODELETE])) { + $errs[self::FIELD_AUTODELETE] = []; + } + $errs[self::FIELD_AUTODELETE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_FIXTURE, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php index 7b42ba2f12..450e181be8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptLink extends FHIRBackboneElement * Validation map for fields in type TestScript.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptLink Constructor @@ -276,12 +276,97 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_LINK, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_LINK, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php index 2d7dd78def..cd5298e088 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRTestScriptMetadata extends FHIRBackboneElement * Validation map for fields in type TestScript.Metadata * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CAPABILITY => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -298,12 +298,101 @@ public function setLink(array $link = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCapability())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CAPABILITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CAPABILITY])) { + $v = $this->getCapability(); + foreach($validationRules[self::FIELD_CAPABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_METADATA, self::FIELD_CAPABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPABILITY])) { + $errs[self::FIELD_CAPABILITY] = []; + } + $errs[self::FIELD_CAPABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_METADATA, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php index 75e5f81d51..7e1309464f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -330,7 +330,7 @@ class FHIRTestScriptOperation extends FHIRBackboneElement * Validation map for fields in type TestScript.Operation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptOperation Constructor @@ -1426,12 +1426,354 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncodeRequestUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCODE_REQUEST_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getParams())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARAMS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRequestHeader())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUEST_HEADER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequestId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponseId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCEPT])) { + $v = $this->getAccept(); + foreach($validationRules[self::FIELD_ACCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_ACCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCEPT])) { + $errs[self::FIELD_ACCEPT] = []; + } + $errs[self::FIELD_ACCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCODE_REQUEST_URL])) { + $v = $this->getEncodeRequestUrl(); + foreach($validationRules[self::FIELD_ENCODE_REQUEST_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_ENCODE_REQUEST_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCODE_REQUEST_URL])) { + $errs[self::FIELD_ENCODE_REQUEST_URL] = []; + } + $errs[self::FIELD_ENCODE_REQUEST_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMS])) { + $v = $this->getParams(); + foreach($validationRules[self::FIELD_PARAMS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_PARAMS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMS])) { + $errs[self::FIELD_PARAMS] = []; + } + $errs[self::FIELD_PARAMS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_HEADER])) { + $v = $this->getRequestHeader(); + foreach($validationRules[self::FIELD_REQUEST_HEADER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_REQUEST_HEADER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_HEADER])) { + $errs[self::FIELD_REQUEST_HEADER] = []; + } + $errs[self::FIELD_REQUEST_HEADER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ID])) { + $v = $this->getRequestId(); + foreach($validationRules[self::FIELD_REQUEST_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_REQUEST_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ID])) { + $errs[self::FIELD_REQUEST_ID] = []; + } + $errs[self::FIELD_REQUEST_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE_ID])) { + $v = $this->getResponseId(); + foreach($validationRules[self::FIELD_RESPONSE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_RESPONSE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE_ID])) { + $errs[self::FIELD_RESPONSE_ID] = []; + } + $errs[self::FIELD_RESPONSE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ID])) { + $v = $this->getSourceId(); + foreach($validationRules[self::FIELD_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ID])) { + $errs[self::FIELD_SOURCE_ID] = []; + } + $errs[self::FIELD_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_ID])) { + $v = $this->getTargetId(); + foreach($validationRules[self::FIELD_TARGET_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_TARGET_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_ID])) { + $errs[self::FIELD_TARGET_ID] = []; + } + $errs[self::FIELD_TARGET_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php index 3c208db6c1..a1621614d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptOrigin extends FHIRBackboneElement * Validation map for fields in type TestScript.Origin * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptOrigin Constructor @@ -254,12 +254,97 @@ public function setProfile(FHIRCoding $profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIndex())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDEX] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INDEX])) { + $v = $this->getIndex(); + foreach($validationRules[self::FIELD_INDEX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ORIGIN, self::FIELD_INDEX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDEX])) { + $errs[self::FIELD_INDEX] = []; + } + $errs[self::FIELD_INDEX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ORIGIN, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php index 760bf123b4..f035f40119 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRTestScriptRequestHeader extends FHIRBackboneElement * Validation map for fields in type TestScript.RequestHeader * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptRequestHeader Constructor @@ -275,12 +275,97 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getField())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIELD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FIELD])) { + $v = $this->getField(); + foreach($validationRules[self::FIELD_FIELD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_REQUEST_HEADER, self::FIELD_FIELD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIELD])) { + $errs[self::FIELD_FIELD] = []; + } + $errs[self::FIELD_FIELD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_REQUEST_HEADER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php index 3390ff6c42..9bcb079a14 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRTestScriptSetup extends FHIRBackboneElement * Validation map for fields in type TestScript.Setup * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -212,12 +212,82 @@ public function setAction(array $action = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_SETUP, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php index 51d32372df..8b82362af7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRTestScriptTeardown extends FHIRBackboneElement * Validation map for fields in type TestScript.Teardown * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -212,12 +212,82 @@ public function setAction(array $action = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEARDOWN, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php index f58f10650c..1b2abaca20 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRTestScriptTest extends FHIRBackboneElement * Validation map for fields in type TestScript.Test * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -364,12 +364,116 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEST, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEST, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php index 0c07294e9e..133585b8c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -199,7 +199,7 @@ class FHIRTestScriptVariable extends FHIRBackboneElement * Validation map for fields in type TestScript.Variable * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptVariable Constructor @@ -744,12 +744,199 @@ public function setSourceId($sourceId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefaultValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeaderField())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEADER_FIELD] = $fieldErrs; + } + } + if (null !== ($v = $this->getHint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE])) { + $v = $this->getDefaultValue(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_DEFAULT_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE])) { + $errs[self::FIELD_DEFAULT_VALUE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER_FIELD])) { + $v = $this->getHeaderField(); + foreach($validationRules[self::FIELD_HEADER_FIELD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_HEADER_FIELD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER_FIELD])) { + $errs[self::FIELD_HEADER_FIELD] = []; + } + $errs[self::FIELD_HEADER_FIELD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HINT])) { + $v = $this->getHint(); + foreach($validationRules[self::FIELD_HINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_HINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HINT])) { + $errs[self::FIELD_HINT] = []; + } + $errs[self::FIELD_HINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ID])) { + $v = $this->getSourceId(); + foreach($validationRules[self::FIELD_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ID])) { + $errs[self::FIELD_SOURCE_ID] = []; + } + $errs[self::FIELD_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming.php index 28f2c44b55..05863468f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRTiming extends FHIRBackboneElement * Validation map for fields in type Timing * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTiming Constructor @@ -389,12 +389,116 @@ public function setRepeat(FHIRTimingRepeat $repeat = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRepeat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPEAT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEAT])) { + $v = $this->getRepeat(); + foreach($validationRules[self::FIELD_REPEAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING, self::FIELD_REPEAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEAT])) { + $errs[self::FIELD_REPEAT] = []; + } + $errs[self::FIELD_REPEAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeat.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeat.php index 1c3f3ba140..2fdae3e555 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeat.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -341,7 +341,7 @@ class FHIRTimingRepeat extends FHIRBackboneElement * Validation map for fields in type Timing.Repeat * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTimingRepeat Constructor @@ -1493,12 +1493,358 @@ public function setWhen(array $when = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBoundsDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BOUNDS_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getBoundsPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BOUNDS_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getBoundsRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BOUNDS_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCountMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT_MAX] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDayOfWeek())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DAY_OF_WEEK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDurationMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getDurationUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION_UNIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrequency())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FREQUENCY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrequencyMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FREQUENCY_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriodMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriodUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD_UNIT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTimeOfDay())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TIME_OF_DAY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getWhen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_WHEN, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_BOUNDS_DURATION])) { + $v = $this->getBoundsDuration(); + foreach($validationRules[self::FIELD_BOUNDS_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_BOUNDS_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BOUNDS_DURATION])) { + $errs[self::FIELD_BOUNDS_DURATION] = []; + } + $errs[self::FIELD_BOUNDS_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BOUNDS_PERIOD])) { + $v = $this->getBoundsPeriod(); + foreach($validationRules[self::FIELD_BOUNDS_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_BOUNDS_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BOUNDS_PERIOD])) { + $errs[self::FIELD_BOUNDS_PERIOD] = []; + } + $errs[self::FIELD_BOUNDS_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BOUNDS_RANGE])) { + $v = $this->getBoundsRange(); + foreach($validationRules[self::FIELD_BOUNDS_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_BOUNDS_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BOUNDS_RANGE])) { + $errs[self::FIELD_BOUNDS_RANGE] = []; + } + $errs[self::FIELD_BOUNDS_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT])) { + $v = $this->getCount(); + foreach($validationRules[self::FIELD_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT])) { + $errs[self::FIELD_COUNT] = []; + } + $errs[self::FIELD_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT_MAX])) { + $v = $this->getCountMax(); + foreach($validationRules[self::FIELD_COUNT_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_COUNT_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT_MAX])) { + $errs[self::FIELD_COUNT_MAX] = []; + } + $errs[self::FIELD_COUNT_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAY_OF_WEEK])) { + $v = $this->getDayOfWeek(); + foreach($validationRules[self::FIELD_DAY_OF_WEEK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DAY_OF_WEEK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAY_OF_WEEK])) { + $errs[self::FIELD_DAY_OF_WEEK] = []; + } + $errs[self::FIELD_DAY_OF_WEEK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION_MAX])) { + $v = $this->getDurationMax(); + foreach($validationRules[self::FIELD_DURATION_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DURATION_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION_MAX])) { + $errs[self::FIELD_DURATION_MAX] = []; + } + $errs[self::FIELD_DURATION_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION_UNIT])) { + $v = $this->getDurationUnit(); + foreach($validationRules[self::FIELD_DURATION_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DURATION_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION_UNIT])) { + $errs[self::FIELD_DURATION_UNIT] = []; + } + $errs[self::FIELD_DURATION_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FREQUENCY])) { + $v = $this->getFrequency(); + foreach($validationRules[self::FIELD_FREQUENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_FREQUENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FREQUENCY])) { + $errs[self::FIELD_FREQUENCY] = []; + } + $errs[self::FIELD_FREQUENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FREQUENCY_MAX])) { + $v = $this->getFrequencyMax(); + foreach($validationRules[self::FIELD_FREQUENCY_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_FREQUENCY_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FREQUENCY_MAX])) { + $errs[self::FIELD_FREQUENCY_MAX] = []; + } + $errs[self::FIELD_FREQUENCY_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET])) { + $v = $this->getOffset(); + foreach($validationRules[self::FIELD_OFFSET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_OFFSET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET])) { + $errs[self::FIELD_OFFSET] = []; + } + $errs[self::FIELD_OFFSET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD_MAX])) { + $v = $this->getPeriodMax(); + foreach($validationRules[self::FIELD_PERIOD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_PERIOD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD_MAX])) { + $errs[self::FIELD_PERIOD_MAX] = []; + } + $errs[self::FIELD_PERIOD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD_UNIT])) { + $v = $this->getPeriodUnit(); + foreach($validationRules[self::FIELD_PERIOD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_PERIOD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD_UNIT])) { + $errs[self::FIELD_PERIOD_UNIT] = []; + } + $errs[self::FIELD_PERIOD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_OF_DAY])) { + $v = $this->getTimeOfDay(); + foreach($validationRules[self::FIELD_TIME_OF_DAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_TIME_OF_DAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_OF_DAY])) { + $errs[self::FIELD_TIME_OF_DAY] = []; + } + $errs[self::FIELD_TIME_OF_DAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN])) { + $v = $this->getWhen(); + foreach($validationRules[self::FIELD_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN])) { + $errs[self::FIELD_WHEN] = []; + } + $errs[self::FIELD_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php index 16a5b56ae9..cb4d304df6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -149,7 +149,7 @@ class FHIRValueSetCompose extends FHIRBackboneElement * Validation map for fields in type ValueSet.Compose * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INCLUDE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -487,12 +487,135 @@ public function setLockedDate($lockedDate = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getExclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCLUDE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInactive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INCLUDE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLockedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCKED_DATE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INACTIVE])) { + $v = $this->getInactive(); + foreach($validationRules[self::FIELD_INACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_INACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INACTIVE])) { + $errs[self::FIELD_INACTIVE] = []; + } + $errs[self::FIELD_INACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCLUDE])) { + $v = $this->getInclude(); + foreach($validationRules[self::FIELD_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCLUDE])) { + $errs[self::FIELD_INCLUDE] = []; + } + $errs[self::FIELD_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCKED_DATE])) { + $v = $this->getLockedDate(); + foreach($validationRules[self::FIELD_LOCKED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_LOCKED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCKED_DATE])) { + $errs[self::FIELD_LOCKED_DATE] = []; + } + $errs[self::FIELD_LOCKED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php index adcf147e9a..1a3faca086 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRValueSetConcept extends FHIRBackboneElement * Validation map for fields in type ValueSet.Concept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetConcept Constructor @@ -381,12 +381,116 @@ public function setDisplay($display = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php index 0cc97cc584..c0c38629d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -207,7 +207,7 @@ class FHIRValueSetContains extends FHIRBackboneElement * Validation map for fields in type ValueSet.Contains * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetContains Constructor @@ -794,12 +794,203 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbstract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABSTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContains())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getInactive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABSTRACT])) { + $v = $this->getAbstract(); + foreach($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_ABSTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABSTRACT])) { + $errs[self::FIELD_ABSTRACT] = []; + } + $errs[self::FIELD_ABSTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINS])) { + $v = $this->getContains(); + foreach($validationRules[self::FIELD_CONTAINS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_CONTAINS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINS])) { + $errs[self::FIELD_CONTAINS] = []; + } + $errs[self::FIELD_CONTAINS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INACTIVE])) { + $v = $this->getInactive(); + foreach($validationRules[self::FIELD_INACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_INACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INACTIVE])) { + $errs[self::FIELD_INACTIVE] = []; + } + $errs[self::FIELD_INACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php index 7ac83d82da..15fe5848b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRValueSetDesignation extends FHIRBackboneElement * Validation map for fields in type ValueSet.Designation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetDesignation Constructor @@ -331,12 +331,114 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DESIGNATION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DESIGNATION, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DESIGNATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php index 7fa645b3ce..02e89716f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -181,7 +181,7 @@ class FHIRValueSetExpansion extends FHIRBackboneElement * Validation map for fields in type ValueSet.Expansion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetExpansion Constructor @@ -648,12 +648,169 @@ public function setTotal($total = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContains())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTimestamp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMESTAMP] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTAINS])) { + $v = $this->getContains(); + foreach($validationRules[self::FIELD_CONTAINS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_CONTAINS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINS])) { + $errs[self::FIELD_CONTAINS] = []; + } + $errs[self::FIELD_CONTAINS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET])) { + $v = $this->getOffset(); + foreach($validationRules[self::FIELD_OFFSET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_OFFSET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET])) { + $errs[self::FIELD_OFFSET] = []; + } + $errs[self::FIELD_OFFSET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMESTAMP])) { + $v = $this->getTimestamp(); + foreach($validationRules[self::FIELD_TIMESTAMP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_TIMESTAMP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMESTAMP])) { + $errs[self::FIELD_TIMESTAMP] = []; + } + $errs[self::FIELD_TIMESTAMP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php index eae93bea0a..7320f33663 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRValueSetFilter extends FHIRBackboneElement * Validation map for fields in type ValueSet.Filter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetFilter Constructor @@ -360,12 +360,114 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OP] = $fieldErrs; + } + } + if (null !== ($v = $this->getProperty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROPERTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OP])) { + $v = $this->getOp(); + foreach($validationRules[self::FIELD_OP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_OP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OP])) { + $errs[self::FIELD_OP] = []; + } + $errs[self::FIELD_OP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php index 931ff402c2..9350769253 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -163,7 +163,7 @@ class FHIRValueSetInclude extends FHIRBackboneElement * Validation map for fields in type ValueSet.Include * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetInclude Constructor @@ -604,12 +604,154 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FILTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValueSet())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUE_SET, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FILTER])) { + $v = $this->getFilter(); + foreach($validationRules[self::FIELD_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FILTER])) { + $errs[self::FIELD_FILTER] = []; + } + $errs[self::FIELD_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET])) { + $v = $this->getValueSet(); + foreach($validationRules[self::FIELD_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET])) { + $errs[self::FIELD_VALUE_SET] = []; + } + $errs[self::FIELD_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php index 3a8a78cc99..0112f9d00e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -204,7 +204,7 @@ class FHIRValueSetParameter extends FHIRBackboneElement * Validation map for fields in type ValueSet.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetParameter Constructor @@ -745,12 +745,199 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestation.php index 4286ed152a..6deecd3e58 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -203,7 +203,7 @@ class FHIRVerificationResultAttestation extends FHIRBackboneElement * Validation map for fields in type VerificationResult.Attestation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVerificationResultAttestation Constructor @@ -640,12 +640,199 @@ public function setWho(FHIRReference $who = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCommunicationMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMUNICATION_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (null !== ($v = $this->getProxyIdentityCertificate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROXY_IDENTITY_CERTIFICATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProxySignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROXY_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceIdentityCertificate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_IDENTITY_CERTIFICATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWho())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION_METHOD])) { + $v = $this->getCommunicationMethod(); + foreach($validationRules[self::FIELD_COMMUNICATION_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_ATTESTATION, self::FIELD_COMMUNICATION_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION_METHOD])) { + $errs[self::FIELD_COMMUNICATION_METHOD] = []; + } + $errs[self::FIELD_COMMUNICATION_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_ATTESTATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_ATTESTATION, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROXY_IDENTITY_CERTIFICATE])) { + $v = $this->getProxyIdentityCertificate(); + foreach($validationRules[self::FIELD_PROXY_IDENTITY_CERTIFICATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_ATTESTATION, self::FIELD_PROXY_IDENTITY_CERTIFICATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROXY_IDENTITY_CERTIFICATE])) { + $errs[self::FIELD_PROXY_IDENTITY_CERTIFICATE] = []; + } + $errs[self::FIELD_PROXY_IDENTITY_CERTIFICATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROXY_SIGNATURE])) { + $v = $this->getProxySignature(); + foreach($validationRules[self::FIELD_PROXY_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_ATTESTATION, self::FIELD_PROXY_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROXY_SIGNATURE])) { + $errs[self::FIELD_PROXY_SIGNATURE] = []; + } + $errs[self::FIELD_PROXY_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_IDENTITY_CERTIFICATE])) { + $v = $this->getSourceIdentityCertificate(); + foreach($validationRules[self::FIELD_SOURCE_IDENTITY_CERTIFICATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_ATTESTATION, self::FIELD_SOURCE_IDENTITY_CERTIFICATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_IDENTITY_CERTIFICATE])) { + $errs[self::FIELD_SOURCE_IDENTITY_CERTIFICATE] = []; + } + $errs[self::FIELD_SOURCE_IDENTITY_CERTIFICATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_SIGNATURE])) { + $v = $this->getSourceSignature(); + foreach($validationRules[self::FIELD_SOURCE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_ATTESTATION, self::FIELD_SOURCE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_SIGNATURE])) { + $errs[self::FIELD_SOURCE_SIGNATURE] = []; + } + $errs[self::FIELD_SOURCE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO])) { + $v = $this->getWho(); + foreach($validationRules[self::FIELD_WHO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_ATTESTATION, self::FIELD_WHO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO])) { + $errs[self::FIELD_WHO] = []; + } + $errs[self::FIELD_WHO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySource.php index 57700f336e..5ab79bacaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -185,7 +185,7 @@ class FHIRVerificationResultPrimarySource extends FHIRBackboneElement * Validation map for fields in type VerificationResult.PrimarySource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVerificationResultPrimarySource Constructor @@ -650,12 +650,188 @@ public function setWho(FHIRReference $who = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCanPushUpdates())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAN_PUSH_UPDATES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCommunicationMethod())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION_METHOD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPushTypeAvailable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PUSH_TYPE_AVAILABLE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValidationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidationStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDATION_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getWho())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CAN_PUSH_UPDATES])) { + $v = $this->getCanPushUpdates(); + foreach($validationRules[self::FIELD_CAN_PUSH_UPDATES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_PRIMARY_SOURCE, self::FIELD_CAN_PUSH_UPDATES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAN_PUSH_UPDATES])) { + $errs[self::FIELD_CAN_PUSH_UPDATES] = []; + } + $errs[self::FIELD_CAN_PUSH_UPDATES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION_METHOD])) { + $v = $this->getCommunicationMethod(); + foreach($validationRules[self::FIELD_COMMUNICATION_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_PRIMARY_SOURCE, self::FIELD_COMMUNICATION_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION_METHOD])) { + $errs[self::FIELD_COMMUNICATION_METHOD] = []; + } + $errs[self::FIELD_COMMUNICATION_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUSH_TYPE_AVAILABLE])) { + $v = $this->getPushTypeAvailable(); + foreach($validationRules[self::FIELD_PUSH_TYPE_AVAILABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_PRIMARY_SOURCE, self::FIELD_PUSH_TYPE_AVAILABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUSH_TYPE_AVAILABLE])) { + $errs[self::FIELD_PUSH_TYPE_AVAILABLE] = []; + } + $errs[self::FIELD_PUSH_TYPE_AVAILABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_PRIMARY_SOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATION_DATE])) { + $v = $this->getValidationDate(); + foreach($validationRules[self::FIELD_VALIDATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_PRIMARY_SOURCE, self::FIELD_VALIDATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATION_DATE])) { + $errs[self::FIELD_VALIDATION_DATE] = []; + } + $errs[self::FIELD_VALIDATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATION_STATUS])) { + $v = $this->getValidationStatus(); + foreach($validationRules[self::FIELD_VALIDATION_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_PRIMARY_SOURCE, self::FIELD_VALIDATION_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATION_STATUS])) { + $errs[self::FIELD_VALIDATION_STATUS] = []; + } + $errs[self::FIELD_VALIDATION_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO])) { + $v = $this->getWho(); + foreach($validationRules[self::FIELD_WHO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_PRIMARY_SOURCE, self::FIELD_WHO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO])) { + $errs[self::FIELD_WHO] = []; + } + $errs[self::FIELD_WHO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidator.php index 36e86fa332..6db6456c9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRVerificationResultValidator extends FHIRBackboneElement * Validation map for fields in type VerificationResult.Validator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVerificationResultValidator Constructor @@ -313,12 +313,114 @@ public function setOrganization(FHIRReference $organization = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAttestationSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ATTESTATION_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentityCertificate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY_CERTIFICATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ATTESTATION_SIGNATURE])) { + $v = $this->getAttestationSignature(); + foreach($validationRules[self::FIELD_ATTESTATION_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_VALIDATOR, self::FIELD_ATTESTATION_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTESTATION_SIGNATURE])) { + $errs[self::FIELD_ATTESTATION_SIGNATURE] = []; + } + $errs[self::FIELD_ATTESTATION_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTITY_CERTIFICATE])) { + $v = $this->getIdentityCertificate(); + foreach($validationRules[self::FIELD_IDENTITY_CERTIFICATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_VALIDATOR, self::FIELD_IDENTITY_CERTIFICATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY_CERTIFICATE])) { + $errs[self::FIELD_IDENTITY_CERTIFICATE] = []; + } + $errs[self::FIELD_IDENTITY_CERTIFICATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT_DOT_VALIDATOR, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecification.php index ee4c07f3aa..762d300da4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -279,7 +279,7 @@ class FHIRVisionPrescriptionLensSpecification extends FHIRBackboneElement * Validation map for fields in type VisionPrescription.LensSpecification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionPrescriptionLensSpecification Constructor @@ -1162,12 +1162,305 @@ public function setSphere($sphere = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADD] = $fieldErrs; + } + } + if (null !== ($v = $this->getAxis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AXIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getBackCurve())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BACK_CURVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBrand())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BRAND] = $fieldErrs; + } + } + if (null !== ($v = $this->getColor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCylinder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CYLINDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiameter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAMETER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEye())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EYE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPower())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POWER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrism())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRISM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProduct())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSphere())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPHERE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADD])) { + $v = $this->getAdd(); + foreach($validationRules[self::FIELD_ADD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_ADD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADD])) { + $errs[self::FIELD_ADD] = []; + } + $errs[self::FIELD_ADD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AXIS])) { + $v = $this->getAxis(); + foreach($validationRules[self::FIELD_AXIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_AXIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AXIS])) { + $errs[self::FIELD_AXIS] = []; + } + $errs[self::FIELD_AXIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BACK_CURVE])) { + $v = $this->getBackCurve(); + foreach($validationRules[self::FIELD_BACK_CURVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_BACK_CURVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BACK_CURVE])) { + $errs[self::FIELD_BACK_CURVE] = []; + } + $errs[self::FIELD_BACK_CURVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BRAND])) { + $v = $this->getBrand(); + foreach($validationRules[self::FIELD_BRAND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_BRAND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BRAND])) { + $errs[self::FIELD_BRAND] = []; + } + $errs[self::FIELD_BRAND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLOR])) { + $v = $this->getColor(); + foreach($validationRules[self::FIELD_COLOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_COLOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLOR])) { + $errs[self::FIELD_COLOR] = []; + } + $errs[self::FIELD_COLOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CYLINDER])) { + $v = $this->getCylinder(); + foreach($validationRules[self::FIELD_CYLINDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_CYLINDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CYLINDER])) { + $errs[self::FIELD_CYLINDER] = []; + } + $errs[self::FIELD_CYLINDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAMETER])) { + $v = $this->getDiameter(); + foreach($validationRules[self::FIELD_DIAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_DIAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAMETER])) { + $errs[self::FIELD_DIAMETER] = []; + } + $errs[self::FIELD_DIAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EYE])) { + $v = $this->getEye(); + foreach($validationRules[self::FIELD_EYE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_EYE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EYE])) { + $errs[self::FIELD_EYE] = []; + } + $errs[self::FIELD_EYE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POWER])) { + $v = $this->getPower(); + foreach($validationRules[self::FIELD_POWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_POWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POWER])) { + $errs[self::FIELD_POWER] = []; + } + $errs[self::FIELD_POWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRISM])) { + $v = $this->getPrism(); + foreach($validationRules[self::FIELD_PRISM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_PRISM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRISM])) { + $errs[self::FIELD_PRISM] = []; + } + $errs[self::FIELD_PRISM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT])) { + $v = $this->getProduct(); + foreach($validationRules[self::FIELD_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT])) { + $errs[self::FIELD_PRODUCT] = []; + } + $errs[self::FIELD_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPHERE])) { + $v = $this->getSphere(); + foreach($validationRules[self::FIELD_SPHERE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_LENS_SPECIFICATION, self::FIELD_SPHERE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPHERE])) { + $errs[self::FIELD_SPHERE] = []; + } + $errs[self::FIELD_SPHERE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrism.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrism.php index ef7d49a608..1b9f66952f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrism.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrism.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRVisionPrescriptionPrism extends FHIRBackboneElement * Validation map for fields in type VisionPrescription.Prism * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionPrescriptionPrism Constructor @@ -268,12 +268,97 @@ public function setBase(FHIRVisionBase $base = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_PRISM, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_PRISM, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBase64Binary.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBase64Binary.php index 4d55395741..5857e1c839 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBase64Binary.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBase64Binary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRBase64Binary extends FHIRElement * Validation map for fields in type base64Binary * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBase64Binary Constructor @@ -171,12 +171,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASE_64BINARY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBindingStrength.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBindingStrength.php index 6deb186fe3..1200e9c0b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBindingStrength.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBindingStrength.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBindingStrength extends FHIRElement * Validation map for fields in type BindingStrength * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBindingStrength Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINDING_STRENGTH, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductCategory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductCategory.php index 682af3fd29..8abe0bd867 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBiologicallyDerivedProductCategory extends FHIRElement * Validation map for fields in type BiologicallyDerivedProductCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBiologicallyDerivedProductCategory Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStatus.php index 8a8f601e99..3d46c3c29b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBiologicallyDerivedProductStatus extends FHIRElement * Validation map for fields in type BiologicallyDerivedProductStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBiologicallyDerivedProductStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStorageScale.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStorageScale.php index 1ab582f853..890b1562ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStorageScale.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStorageScale.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBiologicallyDerivedProductStorageScale extends FHIRElement * Validation map for fields in type BiologicallyDerivedProductStorageScale * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBiologicallyDerivedProductStorageScale Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_STORAGE_SCALE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBoolean.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBoolean.php index 483ca4847e..fbe9871c29 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBoolean.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBoolean.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBoolean extends FHIRElement * Validation map for fields in type boolean * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBoolean Constructor @@ -170,12 +170,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BOOLEAN, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBundleType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBundleType.php index 5a5836293b..9b127e7d8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBundleType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBundleType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBundleType extends FHIRElement * Validation map for fields in type BundleType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCanonical.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCanonical.php index 9687283548..b0a56062b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCanonical.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCanonical.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRCanonical extends FHIRElement * Validation map for fields in type canonical * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCanonical Constructor @@ -172,12 +172,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CANONICAL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCapabilityStatementKind.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCapabilityStatementKind.php index 8084adea11..00dea3d6b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCapabilityStatementKind.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCapabilityStatementKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCapabilityStatementKind extends FHIRElement * Validation map for fields in type CapabilityStatementKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementKind Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityKind.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityKind.php index 77e89a8936..377c3eb2b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityKind.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCarePlanActivityKind extends FHIRElement * Validation map for fields in type CarePlanActivityKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanActivityKind Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityStatus.php index 82c94126ae..71ee4cd40d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCarePlanActivityStatus extends FHIRElement * Validation map for fields in type CarePlanActivityStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanActivityStatus Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanIntent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanIntent.php index 986707d4d4..fa7024502d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCarePlanIntent extends FHIRElement * Validation map for fields in type CarePlanIntent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanIntent Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_INTENT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCareTeamStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCareTeamStatus.php index 44da3b2ea1..e1bcc26ae1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCareTeamStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCareTeamStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCareTeamStatus extends FHIRElement * Validation map for fields in type CareTeamStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCareTeamStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCatalogEntryRelationType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCatalogEntryRelationType.php index fa2fb581aa..267f2d893a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCatalogEntryRelationType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCatalogEntryRelationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCatalogEntryRelationType extends FHIRElement * Validation map for fields in type CatalogEntryRelationType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCatalogEntryRelationType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY_RELATION_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRChargeItemStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRChargeItemStatus.php index e42642edc2..c0146dc4ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRChargeItemStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRChargeItemStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRChargeItemStatus extends FHIRElement * Validation map for fields in type ChargeItemStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRChargeItemStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClaimProcessingCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClaimProcessingCodes.php index 39dd6166ee..d407b82194 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClaimProcessingCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClaimProcessingCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRClaimProcessingCodes extends FHIRElement * Validation map for fields in type ClaimProcessingCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimProcessingCodes Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_PROCESSING_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClinicalImpressionStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClinicalImpressionStatus.php index 64102e84cf..bf0a2c2063 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClinicalImpressionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClinicalImpressionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRClinicalImpressionStatus extends FHIRElement * Validation map for fields in type ClinicalImpressionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpressionStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCode.php index 57de51ebbc..57fc4fc4cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRCode extends FHIRElement * Validation map for fields in type code * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCode Constructor @@ -172,12 +172,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSearchSupport.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSearchSupport.php index cf2c54ce79..99d6822280 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSearchSupport.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSearchSupport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCodeSearchSupport extends FHIRElement * Validation map for fields in type CodeSearchSupport * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSearchSupport Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SEARCH_SUPPORT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemContentMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemContentMode.php index 500c4631ef..2eda668079 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemContentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemContentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCodeSystemContentMode extends FHIRElement * Validation map for fields in type CodeSystemContentMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemContentMode Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_CONTENT_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemHierarchyMeaning.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemHierarchyMeaning.php index 44f9c6695f..1ee2ff29ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemHierarchyMeaning.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemHierarchyMeaning.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCodeSystemHierarchyMeaning extends FHIRElement * Validation map for fields in type CodeSystemHierarchyMeaning * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemHierarchyMeaning Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_HIERARCHY_MEANING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeableConcept.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeableConcept.php index 46ca891735..3dcd9721c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeableConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeableConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRCodeableConcept extends FHIRElement * Validation map for fields in type CodeableConcept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeableConcept Constructor @@ -294,12 +294,87 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCoding())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODING])) { + $v = $this->getCoding(); + foreach($validationRules[self::FIELD_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODEABLE_CONCEPT, self::FIELD_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODING])) { + $errs[self::FIELD_CODING] = []; + } + $errs[self::FIELD_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODEABLE_CONCEPT, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCoding.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCoding.php index 3cceda6499..32336e9d82 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCoding.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCoding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -159,7 +159,7 @@ class FHIRCoding extends FHIRElement * Validation map for fields in type Coding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoding Constructor @@ -521,12 +521,136 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUserSelected())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USER_SELECTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USER_SELECTED])) { + $v = $this->getUserSelected(); + foreach($validationRules[self::FIELD_USER_SELECTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_USER_SELECTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USER_SELECTED])) { + $errs[self::FIELD_USER_SELECTED] = []; + } + $errs[self::FIELD_USER_SELECTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompartmentType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompartmentType.php index 2642a07175..3dc4c319fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompartmentType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompartmentType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCompartmentType extends FHIRElement * Validation map for fields in type CompartmentType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompartmentType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionAttestationMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionAttestationMode.php index 5a0e79fa3f..d6e07ff9bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionAttestationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionAttestationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCompositionAttestationMode extends FHIRElement * Validation map for fields in type CompositionAttestationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionAttestationMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionStatus.php index aacad107f7..7e195ba1d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCompositionStatus extends FHIRElement * Validation map for fields in type CompositionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapEquivalence.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapEquivalence.php index fada7ea926..549f5e5c9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapEquivalence.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapEquivalence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRConceptMapEquivalence extends FHIRElement * Validation map for fields in type ConceptMapEquivalence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapEquivalence Constructor @@ -165,12 +165,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapGroupUnmappedMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapGroupUnmappedMode.php index 724000adf1..23de9e620b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapGroupUnmappedMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapGroupUnmappedMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConceptMapGroupUnmappedMode extends FHIRElement * Validation map for fields in type ConceptMapGroupUnmappedMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapGroupUnmappedMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_GROUP_UNMAPPED_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalDeleteStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalDeleteStatus.php index 6e0651873c..d5a65f0d24 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalDeleteStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalDeleteStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConditionalDeleteStatus extends FHIRElement * Validation map for fields in type ConditionalDeleteStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionalDeleteStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITIONAL_DELETE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalReadStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalReadStatus.php index 6bbefa16f6..7a15055228 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalReadStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalReadStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConditionalReadStatus extends FHIRElement * Validation map for fields in type ConditionalReadStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionalReadStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITIONAL_READ_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentDataMeaning.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentDataMeaning.php index 7ef933cad0..4ba09a4c98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentDataMeaning.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentDataMeaning.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConsentDataMeaning extends FHIRElement * Validation map for fields in type ConsentDataMeaning * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentDataMeaning Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DATA_MEANING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentProvisionType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentProvisionType.php index 0aeb07926b..b69ddab22a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentProvisionType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentProvisionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRConsentProvisionType extends FHIRElement * Validation map for fields in type ConsentProvisionType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentProvisionType Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_PROVISION_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentState.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentState.php index f852c03ba2..94a1dfecf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentState.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConsentState extends FHIRElement * Validation map for fields in type ConsentState * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentState Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_STATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConstraintSeverity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConstraintSeverity.php index 7e03c9e271..51ac5c7088 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConstraintSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConstraintSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConstraintSeverity extends FHIRElement * Validation map for fields in type ConstraintSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConstraintSeverity Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactDetail.php index 295b62241a..cfa8550884 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRContactDetail extends FHIRElement * Validation map for fields in type ContactDetail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactDetail Constructor @@ -295,12 +295,87 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_DETAIL, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_DETAIL, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPoint.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPoint.php index 60428c0b77..dcf82f979c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPoint.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRContactPoint extends FHIRElement * Validation map for fields in type ContactPoint * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactPoint Constructor @@ -460,12 +460,136 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRank())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RANK] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RANK])) { + $v = $this->getRank(); + foreach($validationRules[self::FIELD_RANK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_RANK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RANK])) { + $errs[self::FIELD_RANK] = []; + } + $errs[self::FIELD_RANK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointSystem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointSystem.php index c6fbe0e097..ef092a33bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContactPointSystem extends FHIRElement * Validation map for fields in type ContactPointSystem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactPointSystem Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_SYSTEM, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointUse.php index 6ca2a6ea90..f3ba3b3187 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContactPointUse extends FHIRElement * Validation map for fields in type ContactPointUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactPointUse Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourcePublicationStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourcePublicationStatusCodes.php index ca089b4ce2..680970aec0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourcePublicationStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourcePublicationStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContractResourcePublicationStatusCodes extends FHIRElement * Validation map for fields in type ContractResourcePublicationStatusCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractResourcePublicationStatusCodes Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_RESOURCE_PUBLICATION_STATUS_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourceStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourceStatusCodes.php index 17dcd06977..55766d626c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourceStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourceStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContractResourceStatusCodes extends FHIRElement * Validation map for fields in type ContractResourceStatusCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractResourceStatusCodes Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_RESOURCE_STATUS_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributor.php index af32350ab1..2d6536f295 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRContributor extends FHIRElement * Validation map for fields in type Contributor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContributor Constructor @@ -355,12 +355,104 @@ public function setType(FHIRContributorType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributorType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributorType.php index 1b0e0fba92..14f6898bea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributorType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContributorType extends FHIRElement * Validation map for fields in type ContributorType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContributorType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement.php index d04b31e787..10a92d53a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -224,7 +224,7 @@ class FHIRDataRequirement extends FHIRElement * Validation map for fields in type DataRequirement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataRequirement Constructor @@ -947,12 +947,214 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCodeFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE_FILTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDateFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATE_FILTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIMIT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMustSupport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MUST_SUPPORT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSort())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SORT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubjectCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE_FILTER])) { + $v = $this->getCodeFilter(); + foreach($validationRules[self::FIELD_CODE_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_CODE_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_FILTER])) { + $errs[self::FIELD_CODE_FILTER] = []; + } + $errs[self::FIELD_CODE_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_FILTER])) { + $v = $this->getDateFilter(); + foreach($validationRules[self::FIELD_DATE_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_DATE_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_FILTER])) { + $errs[self::FIELD_DATE_FILTER] = []; + } + $errs[self::FIELD_DATE_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIMIT])) { + $v = $this->getLimit(); + foreach($validationRules[self::FIELD_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIMIT])) { + $errs[self::FIELD_LIMIT] = []; + } + $errs[self::FIELD_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MUST_SUPPORT])) { + $v = $this->getMustSupport(); + foreach($validationRules[self::FIELD_MUST_SUPPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_MUST_SUPPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MUST_SUPPORT])) { + $errs[self::FIELD_MUST_SUPPORT] = []; + } + $errs[self::FIELD_MUST_SUPPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SORT])) { + $v = $this->getSort(); + foreach($validationRules[self::FIELD_SORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_SORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SORT])) { + $errs[self::FIELD_SORT] = []; + } + $errs[self::FIELD_SORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $v = $this->getSubjectCodeableConcept(); + foreach($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_SUBJECT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_REFERENCE])) { + $v = $this->getSubjectReference(); + foreach($validationRules[self::FIELD_SUBJECT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_SUBJECT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_REFERENCE])) { + $errs[self::FIELD_SUBJECT_REFERENCE] = []; + } + $errs[self::FIELD_SUBJECT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php index 857cc5351a..72dee9b665 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -158,7 +158,7 @@ class FHIRDataRequirementCodeFilter extends FHIRElement * Validation map for fields in type DataRequirement.CodeFilter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataRequirementCodeFilter Constructor @@ -494,12 +494,121 @@ public function setValueSet($valueSet = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getSearchParam())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH_PARAM] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_CODE_FILTER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_CODE_FILTER, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_PARAM])) { + $v = $this->getSearchParam(); + foreach($validationRules[self::FIELD_SEARCH_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_CODE_FILTER, self::FIELD_SEARCH_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_PARAM])) { + $errs[self::FIELD_SEARCH_PARAM] = []; + } + $errs[self::FIELD_SEARCH_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET])) { + $v = $this->getValueSet(); + foreach($validationRules[self::FIELD_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_CODE_FILTER, self::FIELD_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET])) { + $errs[self::FIELD_VALUE_SET] = []; + } + $errs[self::FIELD_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php index 102654f939..583e3e7600 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -181,7 +181,7 @@ class FHIRDataRequirementDateFilter extends FHIRElement * Validation map for fields in type DataRequirement.DateFilter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataRequirementDateFilter Constructor @@ -533,12 +533,136 @@ public function setValuePeriod(FHIRPeriod $valuePeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getSearchParam())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH_PARAM] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_DATE_FILTER, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_PARAM])) { + $v = $this->getSearchParam(); + foreach($validationRules[self::FIELD_SEARCH_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_DATE_FILTER, self::FIELD_SEARCH_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_PARAM])) { + $errs[self::FIELD_SEARCH_PARAM] = []; + } + $errs[self::FIELD_SEARCH_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_DATE_FILTER, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_DATE_FILTER, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_DATE_FILTER, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSort.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSort.php index ccc74a0b8a..97a6691910 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSort.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSort.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRDataRequirementSort extends FHIRElement * Validation map for fields in type DataRequirement.Sort * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataRequirementSort Constructor @@ -276,12 +276,85 @@ public function setPath($path = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDirection())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIRECTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DIRECTION])) { + $v = $this->getDirection(); + foreach($validationRules[self::FIELD_DIRECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_SORT, self::FIELD_DIRECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIRECTION])) { + $errs[self::FIELD_DIRECTION] = []; + } + $errs[self::FIELD_DIRECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_SORT, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDate.php index e6c5d2ae88..4d01407e27 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRDate extends FHIRElement * Validation map for fields in type date * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDate Constructor @@ -172,12 +172,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDateTime.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDateTime.php index e33ec1d5bd..697360ba58 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDateTime.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDateTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRDateTime extends FHIRElement * Validation map for fields in type dateTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDateTime Constructor @@ -174,12 +174,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDaysOfWeek.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDaysOfWeek.php index d36d0be650..0c8a7615b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDaysOfWeek.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDaysOfWeek.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDaysOfWeek extends FHIRElement * Validation map for fields in type DaysOfWeek * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDaysOfWeek Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DAYS_OF_WEEK, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDecimal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDecimal.php index b2c77222a0..304c42299b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDecimal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDecimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRDecimal extends FHIRElement * Validation map for fields in type decimal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDecimal Constructor @@ -172,12 +172,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DECIMAL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDetectedIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDetectedIssueSeverity.php index 8155e9ea73..6d77935900 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDetectedIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDetectedIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDetectedIssueSeverity extends FHIRElement * Validation map for fields in type DetectedIssueSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDetectedIssueSeverity Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationState.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationState.php index 9d45e7096a..43b5c4cbad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationState.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricCalibrationState extends FHIRElement * Validation map for fields in type DeviceMetricCalibrationState * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCalibrationState Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_STATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationType.php index 84dfabdd1f..4bef6d2e54 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricCalibrationType extends FHIRElement * Validation map for fields in type DeviceMetricCalibrationType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCalibrationType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCategory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCategory.php index 4cb7a78085..e54b445647 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricCategory extends FHIRElement * Validation map for fields in type DeviceMetricCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCategory Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricColor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricColor.php index 6d3c06a47d..06fe9a57ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricColor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricColor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricColor extends FHIRElement * Validation map for fields in type DeviceMetricColor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricColor Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_COLOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricOperationalStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricOperationalStatus.php index 01c23d76dd..62902631ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricOperationalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricOperationalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricOperationalStatus extends FHIRElement * Validation map for fields in type DeviceMetricOperationalStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricOperationalStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_OPERATIONAL_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceNameType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceNameType.php index a46ab2c2dd..1880b4f2c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceNameType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceNameType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceNameType extends FHIRElement * Validation map for fields in type DeviceNameType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceNameType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_NAME_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceUseStatementStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceUseStatementStatus.php index 747ebf7796..856e2f20ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceUseStatementStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceUseStatementStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceUseStatementStatus extends FHIRElement * Validation map for fields in type DeviceUseStatementStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceUseStatementStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiagnosticReportStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiagnosticReportStatus.php index 0792e85809..ff383246fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiagnosticReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiagnosticReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDiagnosticReportStatus extends FHIRElement * Validation map for fields in type DiagnosticReportStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReportStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiscriminatorType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiscriminatorType.php index ba23b51a1b..d3c88971b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiscriminatorType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiscriminatorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDiscriminatorType extends FHIRElement * Validation map for fields in type DiscriminatorType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiscriminatorType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DISCRIMINATOR_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentMode.php index 8e71905366..b607ea058e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDocumentMode extends FHIRElement * Validation map for fields in type DocumentMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentReferenceStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentReferenceStatus.php index 7e919a9ce1..fc34dd0d25 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentReferenceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentReferenceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRDocumentReferenceStatus extends FHIRElement * Validation map for fields in type DocumentReferenceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceStatus Constructor @@ -165,12 +165,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentRelationshipType.php index 6ba23b4b6e..522f1dee80 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDocumentRelationshipType extends FHIRElement * Validation map for fields in type DocumentRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentRelationshipType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityRequestPurpose.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityRequestPurpose.php index a4a7a49488..92d1c41c40 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityRequestPurpose.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityRequestPurpose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREligibilityRequestPurpose extends FHIRElement * Validation map for fields in type EligibilityRequestPurpose * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREligibilityRequestPurpose Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST_PURPOSE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityResponsePurpose.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityResponsePurpose.php index c863dbbefa..d9da8baaa5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityResponsePurpose.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityResponsePurpose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREligibilityResponsePurpose extends FHIRElement * Validation map for fields in type EligibilityResponsePurpose * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREligibilityResponsePurpose Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_PURPOSE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREnableWhenBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREnableWhenBehavior.php index db3b8710cb..5f06e45557 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREnableWhenBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREnableWhenBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIREnableWhenBehavior extends FHIRElement * Validation map for fields in type EnableWhenBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREnableWhenBehavior Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENABLE_WHEN_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterLocationStatus.php index cdfc8df992..314bb66a04 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREncounterLocationStatus extends FHIRElement * Validation map for fields in type EncounterLocationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterLocationStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_LOCATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterStatus.php index b72a92897b..a0e9194c6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREncounterStatus extends FHIRElement * Validation map for fields in type EncounterStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREndpointStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREndpointStatus.php index 09d1cf0bb8..8044e22c8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREndpointStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREndpointStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREndpointStatus extends FHIRElement * Validation map for fields in type EndpointStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREndpointStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREpisodeOfCareStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREpisodeOfCareStatus.php index 4c71eb1f5f..357ba00e9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREpisodeOfCareStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREpisodeOfCareStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREpisodeOfCareStatus extends FHIRElement * Validation map for fields in type EpisodeOfCareStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCareStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventCapabilityMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventCapabilityMode.php index fe818d7400..64ff923412 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventCapabilityMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventCapabilityMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREventCapabilityMode extends FHIRElement * Validation map for fields in type EventCapabilityMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREventCapabilityMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_CAPABILITY_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventStatus.php index 79783c0d60..07dd0a459e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREventStatus extends FHIRElement * Validation map for fields in type EventStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREventStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventTiming.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventTiming.php index 1ed78ae682..ef03ca8ef2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREventTiming extends FHIRElement * Validation map for fields in type EventTiming * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREventTiming Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_TIMING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREvidenceVariableType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREvidenceVariableType.php index dcbc8d8b78..a15d23788e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREvidenceVariableType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREvidenceVariableType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIREvidenceVariableType extends FHIRElement * Validation map for fields in type EvidenceVariableType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREvidenceVariableType Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExampleScenarioActorType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExampleScenarioActorType.php index 1fbbacc01a..eae3bf31fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExampleScenarioActorType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExampleScenarioActorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRExampleScenarioActorType extends FHIRElement * Validation map for fields in type ExampleScenarioActorType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExampleScenarioActorType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_ACTOR_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExplanationOfBenefitStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExplanationOfBenefitStatus.php index c14d81ddb9..99a06e0f7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExplanationOfBenefitStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExplanationOfBenefitStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRExplanationOfBenefitStatus extends FHIRElement * Validation map for fields in type ExplanationOfBenefitStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExposureState.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExposureState.php index 4d17023290..10708db6c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExposureState.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExposureState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRExposureState extends FHIRElement * Validation map for fields in type ExposureState * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExposureState Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPOSURE_STATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpression.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpression.php index 0d6ab026d3..30e4660be1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpression.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpression.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRExpression extends FHIRElement * Validation map for fields in type Expression * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExpression Constructor @@ -503,12 +503,136 @@ public function setReference($reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPRESSION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPRESSION, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPRESSION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPRESSION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPRESSION, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpressionLanguage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpressionLanguage.php index 610dda7bb2..3d3fbf11ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpressionLanguage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpressionLanguage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRExpressionLanguage extends FHIRElement * Validation map for fields in type ExpressionLanguage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExpressionLanguage Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPRESSION_LANGUAGE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtension.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtension.php index 39bc203f4d..eb85592ee0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtension.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtension.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -870,7 +870,7 @@ class FHIRExtension extends FHIRElement * Validation map for fields in type Extension * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExtension Constructor @@ -3550,12 +3550,918 @@ public function setValueUuid($valueUuid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContributor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTRIBUTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDataRequirement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATA_REQUIREMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueParameterDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRelatedArtifact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RELATED_ARTIFACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTriggerDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUsageContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_USAGE_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUuid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UUID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_AGE])) { + $v = $this->getValueAge(); + foreach($validationRules[self::FIELD_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_AGE])) { + $errs[self::FIELD_VALUE_AGE] = []; + } + $errs[self::FIELD_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CANONICAL])) { + $v = $this->getValueCanonical(); + foreach($validationRules[self::FIELD_VALUE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CANONICAL])) { + $errs[self::FIELD_VALUE_CANONICAL] = []; + } + $errs[self::FIELD_VALUE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_DETAIL])) { + $v = $this->getValueContactDetail(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CONTACT_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_DETAIL])) { + $errs[self::FIELD_VALUE_CONTACT_DETAIL] = []; + } + $errs[self::FIELD_VALUE_CONTACT_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTRIBUTOR])) { + $v = $this->getValueContributor(); + foreach($validationRules[self::FIELD_VALUE_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTRIBUTOR])) { + $errs[self::FIELD_VALUE_CONTRIBUTOR] = []; + } + $errs[self::FIELD_VALUE_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_COUNT])) { + $v = $this->getValueCount(); + foreach($validationRules[self::FIELD_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_COUNT])) { + $errs[self::FIELD_VALUE_COUNT] = []; + } + $errs[self::FIELD_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATA_REQUIREMENT])) { + $v = $this->getValueDataRequirement(); + foreach($validationRules[self::FIELD_VALUE_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATA_REQUIREMENT])) { + $errs[self::FIELD_VALUE_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_VALUE_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DISTANCE])) { + $v = $this->getValueDistance(); + foreach($validationRules[self::FIELD_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DISTANCE])) { + $errs[self::FIELD_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DOSAGE])) { + $v = $this->getValueDosage(); + foreach($validationRules[self::FIELD_VALUE_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DOSAGE])) { + $errs[self::FIELD_VALUE_DOSAGE] = []; + } + $errs[self::FIELD_VALUE_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_EXPRESSION])) { + $v = $this->getValueExpression(); + foreach($validationRules[self::FIELD_VALUE_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_EXPRESSION])) { + $errs[self::FIELD_VALUE_EXPRESSION] = []; + } + $errs[self::FIELD_VALUE_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PARAMETER_DEFINITION])) { + $v = $this->getValueParameterDefinition(); + foreach($validationRules[self::FIELD_VALUE_PARAMETER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_PARAMETER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PARAMETER_DEFINITION])) { + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_PARAMETER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RELATED_ARTIFACT])) { + $v = $this->getValueRelatedArtifact(); + foreach($validationRules[self::FIELD_VALUE_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RELATED_ARTIFACT])) { + $errs[self::FIELD_VALUE_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_VALUE_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TRIGGER_DEFINITION])) { + $v = $this->getValueTriggerDefinition(); + foreach($validationRules[self::FIELD_VALUE_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TRIGGER_DEFINITION])) { + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_VALUE_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URL])) { + $v = $this->getValueUrl(); + foreach($validationRules[self::FIELD_VALUE_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URL])) { + $errs[self::FIELD_VALUE_URL] = []; + } + $errs[self::FIELD_VALUE_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_USAGE_CONTEXT])) { + $v = $this->getValueUsageContext(); + foreach($validationRules[self::FIELD_VALUE_USAGE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_USAGE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_USAGE_CONTEXT])) { + $errs[self::FIELD_VALUE_USAGE_CONTEXT] = []; + } + $errs[self::FIELD_VALUE_USAGE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UUID])) { + $v = $this->getValueUuid(); + foreach($validationRules[self::FIELD_VALUE_UUID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_UUID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UUID])) { + $errs[self::FIELD_VALUE_UUID] = []; + } + $errs[self::FIELD_VALUE_UUID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtensionContextType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtensionContextType.php index 9e2c707d93..02f24aa839 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtensionContextType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtensionContextType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRExtensionContextType extends FHIRElement * Validation map for fields in type ExtensionContextType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExtensionContextType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRDeviceStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRDeviceStatus.php index 62feb45a64..f91d25d836 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRDeviceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRDeviceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFHIRDeviceStatus extends FHIRElement * Validation map for fields in type FHIRDeviceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFHIRDeviceStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FHIRDEVICE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRSubstanceStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRSubstanceStatus.php index 94aa3f5f70..07754e7ef8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRSubstanceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRSubstanceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFHIRSubstanceStatus extends FHIRElement * Validation map for fields in type FHIRSubstanceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFHIRSubstanceStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FHIRSUBSTANCE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRVersion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRVersion.php index a6bc90b772..b9fa07c63b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRVersion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRVersion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRFHIRVersion extends FHIRElement * Validation map for fields in type FHIRVersion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFHIRVersion Constructor @@ -165,12 +165,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FHIRVERSION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFamilyHistoryStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFamilyHistoryStatus.php index 96e00a0a91..83628f7153 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFamilyHistoryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFamilyHistoryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFamilyHistoryStatus extends FHIRElement * Validation map for fields in type FamilyHistoryStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyHistoryStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFilterOperator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFilterOperator.php index 9ef71044ef..1c2f0d2c91 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFilterOperator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFilterOperator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFilterOperator extends FHIRElement * Validation map for fields in type FilterOperator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFilterOperator Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFinancialResourceStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFinancialResourceStatusCodes.php index d93c4eb655..1c66bf60f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFinancialResourceStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFinancialResourceStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFinancialResourceStatusCodes extends FHIRElement * Validation map for fields in type FinancialResourceStatusCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFinancialResourceStatusCodes Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FINANCIAL_RESOURCE_STATUS_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFlagStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFlagStatus.php index 00b69427ab..e40f0d49ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFlagStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFlagStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRFlagStatus extends FHIRElement * Validation map for fields in type FlagStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFlagStatus Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGoalLifecycleStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGoalLifecycleStatus.php index 463eee372e..03439120fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGoalLifecycleStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGoalLifecycleStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRGoalLifecycleStatus extends FHIRElement * Validation map for fields in type GoalLifecycleStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGoalLifecycleStatus Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_LIFECYCLE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentRule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentRule.php index 49768a8748..607b29e4e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentRule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGraphCompartmentRule extends FHIRElement * Validation map for fields in type GraphCompartmentRule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGraphCompartmentRule Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_COMPARTMENT_RULE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentUse.php index c71b2348ec..2423c834b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGraphCompartmentUse extends FHIRElement * Validation map for fields in type GraphCompartmentUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGraphCompartmentUse Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_COMPARTMENT_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupMeasure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupMeasure.php index c4d766610a..a950ba7346 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupMeasure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupMeasure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGroupMeasure extends FHIRElement * Validation map for fields in type GroupMeasure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupMeasure Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_MEASURE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupType.php index 2c714a9ed6..c76c1e497d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGroupType extends FHIRElement * Validation map for fields in type GroupType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidanceResponseStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidanceResponseStatus.php index 2c64670e16..6a75ae07fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidanceResponseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidanceResponseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGuidanceResponseStatus extends FHIRElement * Validation map for fields in type GuidanceResponseStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuidanceResponseStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidePageGeneration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidePageGeneration.php index b11078ae2a..45290eaf30 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidePageGeneration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidePageGeneration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGuidePageGeneration extends FHIRElement * Validation map for fields in type GuidePageGeneration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuidePageGeneration Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDE_PAGE_GENERATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuideParameterCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuideParameterCode.php index e7dfba56b0..00da0da3ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuideParameterCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuideParameterCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGuideParameterCode extends FHIRElement * Validation map for fields in type GuideParameterCode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuideParameterCode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDE_PARAMETER_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHTTPVerb.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHTTPVerb.php index bc93255375..b7064004d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHTTPVerb.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHTTPVerb.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRHTTPVerb extends FHIRElement * Validation map for fields in type HTTPVerb * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHTTPVerb Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HTTPVERB, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHumanName.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHumanName.php index f30207521c..ea9cdd4d95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHumanName.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHumanName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -179,7 +179,7 @@ class FHIRHumanName extends FHIRElement * Validation map for fields in type HumanName * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHumanName Constructor @@ -746,12 +746,176 @@ public function setUse(FHIRNameUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFamily())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FAMILY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GIVEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrefix())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PREFIX, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSuffix())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUFFIX, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FAMILY])) { + $v = $this->getFamily(); + foreach($validationRules[self::FIELD_FAMILY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_FAMILY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FAMILY])) { + $errs[self::FIELD_FAMILY] = []; + } + $errs[self::FIELD_FAMILY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GIVEN])) { + $v = $this->getGiven(); + foreach($validationRules[self::FIELD_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GIVEN])) { + $errs[self::FIELD_GIVEN] = []; + } + $errs[self::FIELD_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFIX])) { + $v = $this->getPrefix(); + foreach($validationRules[self::FIELD_PREFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_PREFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFIX])) { + $errs[self::FIELD_PREFIX] = []; + } + $errs[self::FIELD_PREFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUFFIX])) { + $v = $this->getSuffix(); + foreach($validationRules[self::FIELD_SUFFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_SUFFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUFFIX])) { + $errs[self::FIELD_SUFFIX] = []; + } + $errs[self::FIELD_SUFFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRId.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRId.php index c0ac1e8724..aa518af4a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRId.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRId extends FHIRElement * Validation map for fields in type id * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRId Constructor @@ -174,12 +174,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifier.php index bb1f0a5510..9cde889326 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -165,7 +165,7 @@ class FHIRIdentifier extends FHIRElement * Validation map for fields in type Identifier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentifier Constructor @@ -498,12 +498,153 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssigner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSIGNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSIGNER])) { + $v = $this->getAssigner(); + foreach($validationRules[self::FIELD_ASSIGNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_ASSIGNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSIGNER])) { + $errs[self::FIELD_ASSIGNER] = []; + } + $errs[self::FIELD_ASSIGNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifierUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifierUse.php index f02e67854a..6621ed0a60 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifierUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifierUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRIdentifierUse extends FHIRElement * Validation map for fields in type IdentifierUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentifierUse Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentityAssuranceLevel.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentityAssuranceLevel.php index bbacd6686d..ddfeb98e11 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentityAssuranceLevel.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentityAssuranceLevel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRIdentityAssuranceLevel extends FHIRElement * Validation map for fields in type IdentityAssuranceLevel * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentityAssuranceLevel Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTITY_ASSURANCE_LEVEL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImagingStudyStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImagingStudyStatus.php index 3e36e57495..1a9a94c543 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImagingStudyStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImagingStudyStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRImagingStudyStatus extends FHIRElement * Validation map for fields in type ImagingStudyStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudyStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationEvaluationStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationEvaluationStatusCodes.php index aab1acd6c2..18e2968295 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationEvaluationStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationEvaluationStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRImmunizationEvaluationStatusCodes extends FHIRElement * Validation map for fields in type ImmunizationEvaluationStatusCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationEvaluationStatusCodes Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION_STATUS_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationStatusCodes.php index 0f8d974185..96034ed266 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRImmunizationStatusCodes extends FHIRElement * Validation map for fields in type ImmunizationStatusCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationStatusCodes Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_STATUS_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInstant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInstant.php index 271b374d2b..d4bee4f6b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInstant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInstant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRInstant extends FHIRElement * Validation map for fields in type instant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInstant Constructor @@ -174,12 +174,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInteger.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInteger.php index e8af006192..e160c497ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInteger.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInteger.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRInteger extends FHIRElement * Validation map for fields in type integer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInteger Constructor @@ -171,12 +171,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INTEGER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoicePriceComponentType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoicePriceComponentType.php index fe4821e645..681d47f54c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoicePriceComponentType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoicePriceComponentType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRInvoicePriceComponentType extends FHIRElement * Validation map for fields in type InvoicePriceComponentType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInvoicePriceComponentType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_PRICE_COMPONENT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoiceStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoiceStatus.php index a4093076a3..3f9651b372 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoiceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoiceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRInvoiceStatus extends FHIRElement * Validation map for fields in type InvoiceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInvoiceStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueSeverity.php index 116ac8a35b..8c1c73bbd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRIssueSeverity extends FHIRElement * Validation map for fields in type IssueSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIssueSeverity Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueType.php index 90b889778c..b8bc602422 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRIssueType extends FHIRElement * Validation map for fields in type IssueType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIssueType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ISSUE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkType.php index 3c382fa6df..980b194f7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRLinkType extends FHIRElement * Validation map for fields in type LinkType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLinkType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINK_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkageType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkageType.php index 636fbcbca0..bd94d05ec0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkageType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkageType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRLinkageType extends FHIRElement * Validation map for fields in type LinkageType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLinkageType Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListMode.php index 3fbdf78464..fc9f6c4ce0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRListMode extends FHIRElement * Validation map for fields in type ListMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListStatus.php index b37f0d9b53..fe5e8999d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRListStatus extends FHIRElement * Validation map for fields in type ListStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationMode.php index 0ac3acabdb..aa639b8280 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRLocationMode extends FHIRElement * Validation map for fields in type LocationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationMode Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationStatus.php index 679b04ee82..06ec22012c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRLocationStatus extends FHIRElement * Validation map for fields in type LocationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMarkdown.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMarkdown.php index ce9c265062..b550256abd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMarkdown.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMarkdown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRMarkdown extends FHIRElement * Validation map for fields in type markdown * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMarkdown Constructor @@ -175,12 +175,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKDOWN, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportStatus.php index 4874e10bdd..e737c71c26 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMeasureReportStatus extends FHIRElement * Validation map for fields in type MeasureReportStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportType.php index a202217513..04f32a5597 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMeasureReportType extends FHIRElement * Validation map for fields in type MeasureReportType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationRequestIntent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationRequestIntent.php index d89c9efc93..78fdc987dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationRequestIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationRequestIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationRequestIntent extends FHIRElement * Validation map for fields in type medicationRequestIntent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequestIntent Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_INTENT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationStatusCodes.php index d9ab07b3ad..5c1d439f08 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationStatusCodes extends FHIRElement * Validation map for fields in type MedicationStatusCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatusCodes Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATUS_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationrequestStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationrequestStatus.php index 11f78c6a83..5f528d536e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationrequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationrequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMedicationrequestStatus extends FHIRElement * Validation map for fields in type medicationrequestStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationrequestStatus Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATIONREQUEST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageSignificanceCategory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageSignificanceCategory.php index 25f02999ce..57d717827b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageSignificanceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageSignificanceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMessageSignificanceCategory extends FHIRElement * Validation map for fields in type MessageSignificanceCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageSignificanceCategory Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageheaderResponseRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageheaderResponseRequest.php index 90aa820622..9493667421 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageheaderResponseRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageheaderResponseRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMessageheaderResponseRequest extends FHIRElement * Validation map for fields in type messageheaderResponseRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageheaderResponseRequest Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGEHEADER_RESPONSE_REQUEST, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeta.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeta.php index baf5a7a6f6..63b28891d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeta.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeta.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -180,7 +180,7 @@ class FHIRMeta extends FHIRElement * Validation map for fields in type Meta * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeta Constructor @@ -692,12 +692,159 @@ public function setVersionId($versionId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLastUpdated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_UPDATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTag())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TAG, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersionId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LAST_UPDATED])) { + $v = $this->getLastUpdated(); + foreach($validationRules[self::FIELD_LAST_UPDATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_LAST_UPDATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_UPDATED])) { + $errs[self::FIELD_LAST_UPDATED] = []; + } + $errs[self::FIELD_LAST_UPDATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY])) { + $v = $this->getSecurity(); + foreach($validationRules[self::FIELD_SECURITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_SECURITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY])) { + $errs[self::FIELD_SECURITY] = []; + } + $errs[self::FIELD_SECURITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TAG])) { + $v = $this->getTag(); + foreach($validationRules[self::FIELD_TAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_TAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TAG])) { + $errs[self::FIELD_TAG] = []; + } + $errs[self::FIELD_TAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION_ID])) { + $v = $this->getVersionId(); + foreach($validationRules[self::FIELD_VERSION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_VERSION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION_ID])) { + $errs[self::FIELD_VERSION_ID] = []; + } + $errs[self::FIELD_VERSION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMoney.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMoney.php index 0387589cb7..056d1a1d1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMoney.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMoney.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRMoney extends FHIRElement * Validation map for fields in type Money * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMoney Constructor @@ -281,12 +281,85 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCurrency())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CURRENCY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CURRENCY])) { + $v = $this->getCurrency(); + foreach($validationRules[self::FIELD_CURRENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MONEY, self::FIELD_CURRENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CURRENCY])) { + $errs[self::FIELD_CURRENCY] = []; + } + $errs[self::FIELD_CURRENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MONEY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNameUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNameUse.php index fd22f0199b..a726d69295 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNameUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNameUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNameUse extends FHIRElement * Validation map for fields in type NameUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNameUse Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAME_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemIdentifierType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemIdentifierType.php index fb5c1cdd5e..67b3402126 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemIdentifierType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemIdentifierType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNamingSystemIdentifierType extends FHIRElement * Validation map for fields in type NamingSystemIdentifierType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNamingSystemIdentifierType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_IDENTIFIER_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemType.php index 435cf31c1e..f66e28d688 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNamingSystemType extends FHIRElement * Validation map for fields in type NamingSystemType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNamingSystemType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrative.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrative.php index 30675606e3..f57ed05678 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrative.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrative.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRNarrative extends FHIRElement * Validation map for fields in type Narrative * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNarrative Constructor @@ -239,12 +239,85 @@ public function setStatus(FHIRNarrativeStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiv())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIV] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DIV])) { + $v = $this->getDiv(); + foreach($validationRules[self::FIELD_DIV] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE, self::FIELD_DIV, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIV])) { + $errs[self::FIELD_DIV] = []; + } + $errs[self::FIELD_DIV][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrativeStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrativeStatus.php index b7feea342b..32e79a7550 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrativeStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrativeStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNarrativeStatus extends FHIRElement * Validation map for fields in type NarrativeStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNarrativeStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNoteType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNoteType.php index 78a4e94332..a990b871e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNoteType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNoteType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRNoteType extends FHIRElement * Validation map for fields in type NoteType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNoteType Constructor @@ -165,12 +165,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NOTE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationDataType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationDataType.php index 5b22c28cdd..902babe520 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationDataType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationDataType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRObservationDataType extends FHIRElement * Validation map for fields in type ObservationDataType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationDataType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DATA_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationRangeCategory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationRangeCategory.php index ed6c78344e..2d7416be98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationRangeCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationRangeCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRObservationRangeCategory extends FHIRElement * Validation map for fields in type ObservationRangeCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationRangeCategory Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_RANGE_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationStatus.php index ab9ef52ff9..7b4a5b919b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRObservationStatus extends FHIRElement * Validation map for fields in type ObservationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROid.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROid.php index b23eb00e0e..c5157da916 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROid.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIROid extends FHIRElement * Validation map for fields in type oid * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROid Constructor @@ -172,12 +172,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationKind.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationKind.php index e34cbd6a90..ff933e7f7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationKind.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIROperationKind extends FHIRElement * Validation map for fields in type OperationKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationKind Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationParameterUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationParameterUse.php index 4ec11c8c3d..e2e37284fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationParameterUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationParameterUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIROperationParameterUse extends FHIRElement * Validation map for fields in type OperationParameterUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationParameterUse Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_PARAMETER_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROrientationType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROrientationType.php index db0acb18cd..1c4b0e537a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROrientationType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROrientationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIROrientationType extends FHIRElement * Validation map for fields in type orientationType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrientationType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORIENTATION_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParameterDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParameterDefinition.php index 7e7ef3a08e..b1ac1efe71 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParameterDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParameterDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -188,7 +188,7 @@ class FHIRParameterDefinition extends FHIRElement * Validation map for fields in type ParameterDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParameterDefinition Constructor @@ -674,12 +674,170 @@ public function setUse($use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipantRequired.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipantRequired.php index 32b5d1f553..d463e0db57 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipantRequired.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipantRequired.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRParticipantRequired extends FHIRElement * Validation map for fields in type ParticipantRequired * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParticipantRequired Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARTICIPANT_REQUIRED, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipationStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipationStatus.php index fb66b46112..4a620801cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRParticipationStatus extends FHIRElement * Validation map for fields in type ParticipationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParticipationStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARTICIPATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPeriod.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPeriod.php index af397a7124..05144e859e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPeriod.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPeriod.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRPeriod extends FHIRElement * Validation map for fields in type Period * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPeriod Constructor @@ -302,12 +302,85 @@ public function setStart($start = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERIOD, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERIOD, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPositiveInt.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPositiveInt.php index a9b4c636ad..ab67e909a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPositiveInt.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPositiveInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRPositiveInt extends FHIRElement * Validation map for fields in type positiveInt * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPositiveInt Constructor @@ -171,12 +171,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POSITIVE_INT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyRepresentation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyRepresentation.php index ebc3ef5172..27e098762a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRPropertyRepresentation extends FHIRElement * Validation map for fields in type PropertyRepresentation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPropertyRepresentation Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyType.php index 1078f8df2a..72da526312 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRPropertyType extends FHIRElement * Validation map for fields in type PropertyType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPropertyType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROPERTY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRProvenanceEntityRole.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRProvenanceEntityRole.php index 99284e6bba..2fbb7b7e59 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRProvenanceEntityRole.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRProvenanceEntityRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRProvenanceEntityRole extends FHIRElement * Validation map for fields in type ProvenanceEntityRole * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceEntityRole Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPublicationStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPublicationStatus.php index 4ddac0cd76..e3ac7be982 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPublicationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPublicationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRPublicationStatus extends FHIRElement * Validation map for fields in type PublicationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPublicationStatus Constructor @@ -165,12 +165,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PUBLICATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQualityType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQualityType.php index 661def51c3..59d8c212ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQualityType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQualityType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQualityType extends FHIRElement * Validation map for fields in type qualityType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQualityType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUALITY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity.php index f825159909..b5eccd995a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRQuantity extends FHIRElement * Validation map for fields in type Quantity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuantity Constructor @@ -503,12 +503,136 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComparator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRAge.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRAge.php index 3e5b1ebcad..7b52c1caa0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRAge.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRAge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRAge extends FHIRQuantity * Validation map for fields in type Age * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAge Constructor @@ -127,12 +127,111 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRCount.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRCount.php index a7883daa4e..3923751061 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRCount.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRCount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRCount extends FHIRQuantity * Validation map for fields in type Count * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCount Constructor @@ -129,12 +129,111 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDistance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDistance.php index 60105b2b45..c8021ad661 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDistance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDistance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDistance extends FHIRQuantity * Validation map for fields in type Distance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDistance Constructor @@ -127,12 +127,111 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDuration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDuration.php index bbb0f4a20d..7b00139f51 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDuration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDuration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDuration extends FHIRQuantity * Validation map for fields in type Duration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDuration Constructor @@ -127,12 +127,111 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantityComparator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantityComparator.php index cd793283fa..c147d85b89 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantityComparator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantityComparator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuantityComparator extends FHIRElement * Validation map for fields in type QuantityComparator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuantityComparator Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemOperator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemOperator.php index 083b8b6da1..d2b6120685 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemOperator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemOperator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuestionnaireItemOperator extends FHIRElement * Validation map for fields in type QuestionnaireItemOperator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireItemOperator Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_ITEM_OPERATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemType.php index 898ae4035f..8dca89f447 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRQuestionnaireItemType extends FHIRElement * Validation map for fields in type QuestionnaireItemType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireItemType Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_ITEM_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireResponseStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireResponseStatus.php index 6d698bce26..66ffd30538 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireResponseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireResponseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuestionnaireResponseStatus extends FHIRElement * Validation map for fields in type QuestionnaireResponseStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponseStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRange.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRange.php index cacc1fc646..3a7acaa49d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRange.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRRange extends FHIRElement * Validation map for fields in type Range * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRange Constructor @@ -237,12 +237,85 @@ public function setLow(FHIRQuantity $low = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHigh())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIGH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLow())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOW] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HIGH])) { + $v = $this->getHigh(); + foreach($validationRules[self::FIELD_HIGH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RANGE, self::FIELD_HIGH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIGH])) { + $errs[self::FIELD_HIGH] = []; + } + $errs[self::FIELD_HIGH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOW])) { + $v = $this->getLow(); + foreach($validationRules[self::FIELD_LOW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RANGE, self::FIELD_LOW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOW])) { + $errs[self::FIELD_LOW] = []; + } + $errs[self::FIELD_LOW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRatio.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRatio.php index 572582e871..732443ed48 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRatio.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRatio.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRRatio extends FHIRElement * Validation map for fields in type Ratio * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRatio Constructor @@ -238,12 +238,85 @@ public function setNumerator(FHIRQuantity $numerator = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDenominator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DENOMINATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumerator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMERATOR] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DENOMINATOR])) { + $v = $this->getDenominator(); + foreach($validationRules[self::FIELD_DENOMINATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RATIO, self::FIELD_DENOMINATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DENOMINATOR])) { + $errs[self::FIELD_DENOMINATOR] = []; + } + $errs[self::FIELD_DENOMINATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMERATOR])) { + $v = $this->getNumerator(); + foreach($validationRules[self::FIELD_NUMERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RATIO, self::FIELD_NUMERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMERATOR])) { + $errs[self::FIELD_NUMERATOR] = []; + } + $errs[self::FIELD_NUMERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReference.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReference.php index 8690fc38c4..4e9e70aac1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReference.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -158,7 +158,7 @@ class FHIRReference extends FHIRElement * Validation map for fields in type Reference * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReference Constructor @@ -461,12 +461,119 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceHandlingPolicy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceHandlingPolicy.php index 7adf0f95ef..d890078da4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceHandlingPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceHandlingPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRReferenceHandlingPolicy extends FHIRElement * Validation map for fields in type ReferenceHandlingPolicy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReferenceHandlingPolicy Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE_HANDLING_POLICY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceVersionRules.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceVersionRules.php index e70527cc60..eaab1f7d7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceVersionRules.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceVersionRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRReferenceVersionRules extends FHIRElement * Validation map for fields in type ReferenceVersionRules * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReferenceVersionRules Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE_VERSION_RULES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifact.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifact.php index 2206630ab4..e04565f2e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifact.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -186,7 +186,7 @@ class FHIRRelatedArtifact extends FHIRElement * Validation map for fields in type RelatedArtifact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRelatedArtifact Constructor @@ -640,12 +640,170 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCitation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CITATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocument())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CITATION])) { + $v = $this->getCitation(); + foreach($validationRules[self::FIELD_CITATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_CITATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CITATION])) { + $errs[self::FIELD_CITATION] = []; + } + $errs[self::FIELD_CITATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENT])) { + $v = $this->getDocument(); + foreach($validationRules[self::FIELD_DOCUMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_DOCUMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENT])) { + $errs[self::FIELD_DOCUMENT] = []; + } + $errs[self::FIELD_DOCUMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifactType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifactType.php index 850ee5a065..093724ffdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifactType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifactType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRelatedArtifactType extends FHIRElement * Validation map for fields in type RelatedArtifactType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRelatedArtifactType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRemittanceOutcome.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRemittanceOutcome.php index d5c8fa58c0..2609bb4916 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRemittanceOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRemittanceOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRRemittanceOutcome extends FHIRElement * Validation map for fields in type RemittanceOutcome * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRemittanceOutcome Constructor @@ -165,12 +165,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REMITTANCE_OUTCOME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRepositoryType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRepositoryType.php index 9c4854a835..3ebd5a8f3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRepositoryType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRepositoryType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRepositoryType extends FHIRElement * Validation map for fields in type repositoryType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRepositoryType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REPOSITORY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestIntent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestIntent.php index fac2d94c8a..00c656c64e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRRequestIntent extends FHIRElement * Validation map for fields in type RequestIntent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestIntent Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_INTENT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestPriority.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestPriority.php index f62ed12b88..d6bb670856 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRequestPriority extends FHIRElement * Validation map for fields in type RequestPriority * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestPriority Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_PRIORITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestResourceType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestResourceType.php index 8fd6b565df..5c392116b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestResourceType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestResourceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRequestResourceType extends FHIRElement * Validation map for fields in type RequestResourceType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestResourceType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_RESOURCE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestStatus.php index 91b40df31d..9eecbe2172 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRRequestStatus extends FHIRElement * Validation map for fields in type RequestStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestStatus Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchElementType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchElementType.php index 3f7b67f556..c6308cee1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchElementType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchElementType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResearchElementType extends FHIRElement * Validation map for fields in type ResearchElementType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchElementType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchStudyStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchStudyStatus.php index 0218463992..79c10618b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchStudyStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchStudyStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResearchStudyStatus extends FHIRElement * Validation map for fields in type ResearchStudyStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchStudyStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchSubjectStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchSubjectStatus.php index 0202114f0a..facbe7e75a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchSubjectStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchSubjectStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResearchSubjectStatus extends FHIRElement * Validation map for fields in type ResearchSubjectStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchSubjectStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceType.php index a770cadf48..cb58ebe22d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResourceType extends FHIRElement * Validation map for fields in type ResourceType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceVersionPolicy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceVersionPolicy.php index f65c260277..e84de878c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceVersionPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceVersionPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResourceVersionPolicy extends FHIRElement * Validation map for fields in type ResourceVersionPolicy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceVersionPolicy Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE_VERSION_POLICY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResponseType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResponseType.php index 8368273eab..d9d9be88a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResponseType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResponseType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResponseType extends FHIRElement * Validation map for fields in type ResponseType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResponseType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRestfulCapabilityMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRestfulCapabilityMode.php index 949bbd836f..602a6a9802 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRestfulCapabilityMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRestfulCapabilityMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRestfulCapabilityMode extends FHIRElement * Validation map for fields in type RestfulCapabilityMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRestfulCapabilityMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESTFUL_CAPABILITY_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSPDXLicense.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSPDXLicense.php index c6969b0528..f4b4c4f22d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSPDXLicense.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSPDXLicense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRSPDXLicense extends FHIRElement * Validation map for fields in type SPDXLicense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSPDXLicense Constructor @@ -168,12 +168,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPDXLICENSE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledData.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledData.php index 36fad3754c..69d8653a70 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledData.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -187,7 +187,7 @@ class FHIRSampledData extends FHIRElement * Validation map for fields in type SampledData * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSampledData Constructor @@ -651,12 +651,170 @@ public function setUpperLimit($upperLimit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDimensions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIMENSIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getLowerLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOWER_LIMIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getUpperLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UPPER_LIMIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIMENSIONS])) { + $v = $this->getDimensions(); + foreach($validationRules[self::FIELD_DIMENSIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_DIMENSIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIMENSIONS])) { + $errs[self::FIELD_DIMENSIONS] = []; + } + $errs[self::FIELD_DIMENSIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOWER_LIMIT])) { + $v = $this->getLowerLimit(); + foreach($validationRules[self::FIELD_LOWER_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_LOWER_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOWER_LIMIT])) { + $errs[self::FIELD_LOWER_LIMIT] = []; + } + $errs[self::FIELD_LOWER_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UPPER_LIMIT])) { + $v = $this->getUpperLimit(); + foreach($validationRules[self::FIELD_UPPER_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_UPPER_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UPPER_LIMIT])) { + $errs[self::FIELD_UPPER_LIMIT] = []; + } + $errs[self::FIELD_UPPER_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledDataDataType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledDataDataType.php index ecc40059ee..0935349a56 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledDataDataType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledDataDataType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRSampledDataDataType extends FHIRElement * Validation map for fields in type SampledDataDataType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSampledDataDataType Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchComparator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchComparator.php index 5a76e2a3db..6ef2cb55aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchComparator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchComparator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSearchComparator extends FHIRElement * Validation map for fields in type SearchComparator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchComparator Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_COMPARATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchEntryMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchEntryMode.php index 584677defe..92287c0769 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchEntryMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchEntryMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRSearchEntryMode extends FHIRElement * Validation map for fields in type SearchEntryMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchEntryMode Constructor @@ -168,12 +168,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_ENTRY_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchModifierCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchModifierCode.php index 19561727a0..d4f41afc73 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchModifierCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchModifierCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSearchModifierCode extends FHIRElement * Validation map for fields in type SearchModifierCode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchModifierCode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_MODIFIER_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchParamType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchParamType.php index 053273ce7b..51e2206384 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchParamType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchParamType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRSearchParamType extends FHIRElement * Validation map for fields in type SearchParamType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchParamType Constructor @@ -165,12 +165,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSequenceType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSequenceType.php index ff0960ea4a..96aaef238c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSequenceType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSequenceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSequenceType extends FHIRElement * Validation map for fields in type sequenceType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSequenceType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSignature.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSignature.php index 6492f3b40c..c643fb05ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSignature.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSignature.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -191,7 +191,7 @@ class FHIRSignature extends FHIRElement * Validation map for fields in type Signature * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_TYPE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -656,12 +656,172 @@ public function setWho(FHIRReference $who = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (null !== ($v = $this->getSigFormat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIG_FORMAT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetFormat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_FORMAT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getWhen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getWho())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIG_FORMAT])) { + $v = $this->getSigFormat(); + foreach($validationRules[self::FIELD_SIG_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_SIG_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIG_FORMAT])) { + $errs[self::FIELD_SIG_FORMAT] = []; + } + $errs[self::FIELD_SIG_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_FORMAT])) { + $v = $this->getTargetFormat(); + foreach($validationRules[self::FIELD_TARGET_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_TARGET_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_FORMAT])) { + $errs[self::FIELD_TARGET_FORMAT] = []; + } + $errs[self::FIELD_TARGET_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN])) { + $v = $this->getWhen(); + foreach($validationRules[self::FIELD_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN])) { + $errs[self::FIELD_WHEN] = []; + } + $errs[self::FIELD_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO])) { + $v = $this->getWho(); + foreach($validationRules[self::FIELD_WHO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_WHO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO])) { + $errs[self::FIELD_WHO] = []; + } + $errs[self::FIELD_WHO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlicingRules.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlicingRules.php index 0cfe125cb9..8b959b5c99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlicingRules.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlicingRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSlicingRules extends FHIRElement * Validation map for fields in type SlicingRules * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSlicingRules Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLICING_RULES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlotStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlotStatus.php index c4f5d7fcae..f55bc31e31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlotStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlotStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSlotStatus extends FHIRElement * Validation map for fields in type SlotStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSlotStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSortDirection.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSortDirection.php index db168ec0f4..93e4fcea00 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSortDirection.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSortDirection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSortDirection extends FHIRElement * Validation map for fields in type SortDirection * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSortDirection Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SORT_DIRECTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenContainedPreference.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenContainedPreference.php index 5f2bb832f5..2f8e5559d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenContainedPreference.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenContainedPreference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSpecimenContainedPreference extends FHIRElement * Validation map for fields in type SpecimenContainedPreference * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenContainedPreference Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_CONTAINED_PREFERENCE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenStatus.php index 9e7cd785af..6e4ca27744 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSpecimenStatus extends FHIRElement * Validation map for fields in type SpecimenStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStatus.php index 08fd5f5eba..fd28b17f66 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStatus extends FHIRElement * Validation map for fields in type status * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStrandType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStrandType.php index 035378da96..682d106669 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStrandType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStrandType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStrandType extends FHIRElement * Validation map for fields in type strandType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStrandType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRAND_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRString.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRString.php index eda0c84607..97ce3bc124 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRString.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRString.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRString extends FHIRElement * Validation map for fields in type string * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRString Constructor @@ -171,12 +171,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureDefinitionKind.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureDefinitionKind.php index 5e7204de9c..10f089eabf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureDefinitionKind.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureDefinitionKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureDefinitionKind extends FHIRElement * Validation map for fields in type StructureDefinitionKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinitionKind Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapContextType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapContextType.php index bc6c02a5f4..42d2c4d9ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapContextType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapContextType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapContextType extends FHIRElement * Validation map for fields in type StructureMapContextType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapContextType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_CONTEXT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapGroupTypeMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapGroupTypeMode.php index 7592db23bd..ce31473480 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapGroupTypeMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapGroupTypeMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRStructureMapGroupTypeMode extends FHIRElement * Validation map for fields in type StructureMapGroupTypeMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapGroupTypeMode Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_GROUP_TYPE_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapInputMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapInputMode.php index f969b311cd..15f3a09f2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapInputMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapInputMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapInputMode extends FHIRElement * Validation map for fields in type StructureMapInputMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapInputMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_INPUT_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapModelMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapModelMode.php index c7046c83d4..fe206c3e4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapModelMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapModelMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapModelMode extends FHIRElement * Validation map for fields in type StructureMapModelMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapModelMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_MODEL_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapSourceListMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapSourceListMode.php index 7f05562579..7596e4759a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapSourceListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapSourceListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapSourceListMode extends FHIRElement * Validation map for fields in type StructureMapSourceListMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapSourceListMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_SOURCE_LIST_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTargetListMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTargetListMode.php index 064161e835..b8a6a02641 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTargetListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTargetListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapTargetListMode extends FHIRElement * Validation map for fields in type StructureMapTargetListMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapTargetListMode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TARGET_LIST_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTransform.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTransform.php index 9f4a0b65ec..aec75e4076 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTransform.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTransform.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapTransform extends FHIRElement * Validation map for fields in type StructureMapTransform * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapTransform Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TRANSFORM, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionChannelType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionChannelType.php index 87c5575af4..d8833211a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionChannelType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionChannelType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSubscriptionChannelType extends FHIRElement * Validation map for fields in type SubscriptionChannelType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscriptionChannelType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_CHANNEL_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionStatus.php index f05035a17f..41ba5447ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSubscriptionStatus extends FHIRElement * Validation map for fields in type SubscriptionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscriptionStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyDeliveryStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyDeliveryStatus.php index d7b7ca29fa..b7affce2c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyDeliveryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyDeliveryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSupplyDeliveryStatus extends FHIRElement * Validation map for fields in type SupplyDeliveryStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyDeliveryStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyRequestStatus.php index 552ade7fb0..3349ec747a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSupplyRequestStatus extends FHIRElement * Validation map for fields in type SupplyRequestStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyRequestStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSystemRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSystemRestfulInteraction.php index 9087e23064..37e7d67315 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSystemRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSystemRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSystemRestfulInteraction extends FHIRElement * Validation map for fields in type SystemRestfulInteraction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSystemRestfulInteraction Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SYSTEM_RESTFUL_INTERACTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskIntent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskIntent.php index 7aa3cf9fb3..ec022e65b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTaskIntent extends FHIRElement * Validation map for fields in type TaskIntent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTaskIntent Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_INTENT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskStatus.php index 2b3aafbbee..24f8e6e851 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTaskStatus extends FHIRElement * Validation map for fields in type TaskStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTaskStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportActionResult.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportActionResult.php index 706da0d6ce..f00ab9829f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportActionResult.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportActionResult.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTestReportActionResult extends FHIRElement * Validation map for fields in type TestReportActionResult * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportActionResult Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_ACTION_RESULT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportParticipantType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportParticipantType.php index 41abb058bd..0ff226d659 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportParticipantType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportParticipantType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTestReportParticipantType extends FHIRElement * Validation map for fields in type TestReportParticipantType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportParticipantType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_PARTICIPANT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportResult.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportResult.php index db4127794f..be75410dac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportResult.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportResult.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTestReportResult extends FHIRElement * Validation map for fields in type TestReportResult * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportResult Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_RESULT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportStatus.php index 5d347dcf8f..22a6a49b2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTestReportStatus extends FHIRElement * Validation map for fields in type TestReportStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportStatus Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestScriptRequestMethodCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestScriptRequestMethodCode.php index f5294ed33c..994f5bbb75 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestScriptRequestMethodCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestScriptRequestMethodCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTestScriptRequestMethodCode extends FHIRElement * Validation map for fields in type TestScriptRequestMethodCode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptRequestMethodCode Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_REQUEST_METHOD_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTime.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTime.php index 8c425918ef..69743f9904 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTime.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTime extends FHIRElement * Validation map for fields in type time * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTime Constructor @@ -170,12 +170,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerDefinition.php index e1e4f54b4b..d8e803b545 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -206,7 +206,7 @@ class FHIRTriggerDefinition extends FHIRElement * Validation map for fields in type TriggerDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTriggerDefinition Constructor @@ -706,12 +706,189 @@ public function setType(FHIRTriggerType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getData())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE])) { + $v = $this->getTimingDate(); + foreach($validationRules[self::FIELD_TIMING_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_TIMING_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE])) { + $errs[self::FIELD_TIMING_DATE] = []; + } + $errs[self::FIELD_TIMING_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_REFERENCE])) { + $v = $this->getTimingReference(); + foreach($validationRules[self::FIELD_TIMING_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_TIMING_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_REFERENCE])) { + $errs[self::FIELD_TIMING_REFERENCE] = []; + } + $errs[self::FIELD_TIMING_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerType.php index 892e2631b5..93f0d75cd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTriggerType extends FHIRElement * Validation map for fields in type TriggerType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTriggerType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeDerivationRule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeDerivationRule.php index 2ce819ebd7..961ec24a87 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeDerivationRule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeDerivationRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTypeDerivationRule extends FHIRElement * Validation map for fields in type TypeDerivationRule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTypeDerivationRule Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TYPE_DERIVATION_RULE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeRestfulInteraction.php index 195dfd5b23..6676c130a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTypeRestfulInteraction extends FHIRElement * Validation map for fields in type TypeRestfulInteraction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTypeRestfulInteraction Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TYPE_RESTFUL_INTERACTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUDIEntryType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUDIEntryType.php index dd43a81bec..a7dafa6ef8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUDIEntryType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUDIEntryType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRUDIEntryType extends FHIRElement * Validation map for fields in type UDIEntryType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUDIEntryType Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UDIENTRY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnitsOfTime.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnitsOfTime.php index 65fb24d310..d34f7fb0a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnitsOfTime.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnitsOfTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRUnitsOfTime extends FHIRElement * Validation map for fields in type UnitsOfTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUnitsOfTime Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnsignedInt.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnsignedInt.php index e514a4211b..d4cbc48986 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnsignedInt.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnsignedInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRUnsignedInt extends FHIRElement * Validation map for fields in type unsignedInt * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUnsignedInt Constructor @@ -171,12 +171,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUri.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUri.php index fa4de3aad5..ab2908333c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUri.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUri.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRUri extends FHIRElement * Validation map for fields in type uri * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUri Constructor @@ -171,12 +171,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_URI, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUrl.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUrl.php index 87a28721bf..b3d82f3afd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUrl.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUrl.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRUrl extends FHIRElement * Validation map for fields in type url * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUrl Constructor @@ -171,12 +171,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_URL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUsageContext.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUsageContext.php index 649021fa63..031555f3cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUsageContext.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUsageContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -161,7 +161,7 @@ class FHIRUsageContext extends FHIRElement * Validation map for fields in type UsageContext * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUsageContext Constructor @@ -411,12 +411,136 @@ public function setValueReference(FHIRReference $valueReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USAGE_CONTEXT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USAGE_CONTEXT, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USAGE_CONTEXT, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USAGE_CONTEXT, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USAGE_CONTEXT, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUse.php index 133126aa06..eb6c41d23b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRUse extends FHIRElement * Validation map for fields in type Use * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUse Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUuid.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUuid.php index 23edaa6f63..104f7844ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUuid.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUuid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRUuid extends FHIRElement * Validation map for fields in type uuid * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUuid Constructor @@ -172,12 +172,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UUID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVConfidentialityClassification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVConfidentialityClassification.php index 9a656b2d9e..2217f9ca6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVConfidentialityClassification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVConfidentialityClassification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRVConfidentialityClassification extends FHIRElement * Validation map for fields in type vConfidentialityClassification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVConfidentialityClassification Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_V_CONFIDENTIALITY_CLASSIFICATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVariableType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVariableType.php index 99525c5920..9a52217540 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVariableType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVariableType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRVariableType extends FHIRElement * Validation map for fields in type VariableType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVariableType Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VARIABLE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionBase.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionBase.php index da73db74e5..b62f24ebc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRVisionBase extends FHIRElement * Validation map for fields in type VisionBase * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionBase Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_BASE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionEyes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionEyes.php index c5dbaaff19..1ce6bbcf98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionEyes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionEyes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRVisionEyes extends FHIRElement * Validation map for fields in type VisionEyes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionEyes Constructor @@ -166,12 +166,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_EYES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRXPathUsageType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRXPathUsageType.php index c2cd678edf..0931a7a560 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRXPathUsageType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRXPathUsageType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRXPathUsageType extends FHIRElement * Validation map for fields in type XPathUsageType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRXPathUsageType Constructor @@ -167,12 +167,68 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_XPATH_USAGE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRIdPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRIdPrimitive.php index 8605768b69..7a27f18f73 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRIdPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRIdPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRIdPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRIdPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type id-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[A-Za-z0-9\\-\\.]{1,64}$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -170,12 +172,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRInstantPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRInstantPrimitive.php index b1659690ef..b593b18b57 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRInstantPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRInstantPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRInstantPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANT_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRInstantPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type instant-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))$/', ], @@ -177,7 +179,7 @@ public function _getDateTime() if (null === $v) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -188,12 +190,38 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANT_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRIntegerPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRIntegerPrimitive.php index f1797801a8..be813e1b76 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRIntegerPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRIntegerPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INTEGER_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type integer-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^-?([0]|([1-9][0-9]*))$/', ], @@ -181,12 +183,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INTEGER_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRMarkdownPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRMarkdownPrimitive.php index 50cf43fec6..6d6dee3633 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRMarkdownPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRMarkdownPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRMarkdownPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MARKDOWN_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRMarkdownPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type markdown-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[ \\r\\n\\t\\S]+$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,12 +171,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKDOWN_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIROidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIROidPrimitive.php index cb56fa1b56..b36b802916 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIROidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIROidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIROidPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIROidPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type oid-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^urn:oid:[0-2](\\.(0|[1-9][0-9]*))+$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,12 +171,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRPositiveIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRPositiveIntPrimitive.php index 387271e7a4..cb7ce6f125 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRPositiveIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRPositiveIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRPositiveIntPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_POSITIVE_INT_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRPositiveIntPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type positiveInt-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[1-9][0-9]*$/', ], @@ -181,12 +183,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POSITIVE_INT_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource.php index 5593f6d82f..b6cda1f7b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -76,6 +76,7 @@ class FHIRResource implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE; @@ -151,7 +152,7 @@ class FHIRResource implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInter * Validation map for fields in type Resource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResource Constructor @@ -466,12 +467,47 @@ public function setMeta(FHIRMeta $meta = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = []; + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getImplicitRules())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLICIT_RULES] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_META] = $fieldErrs; + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBinary.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBinary.php index e9856d1ff9..d1bca000a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBinary.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBinary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRBinary extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Binary * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBinary Constructor @@ -364,12 +364,126 @@ public function setSecurityContext(FHIRReference $securityContext = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getSecurityContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SECURITY_CONTEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINARY, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINARY, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_CONTEXT])) { + $v = $this->getSecurityContext(); + foreach($validationRules[self::FIELD_SECURITY_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINARY, self::FIELD_SECURITY_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_CONTEXT])) { + $errs[self::FIELD_SECURITY_CONTEXT] = []; + } + $errs[self::FIELD_SECURITY_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBundle.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBundle.php index 36abcf7353..69b39f6604 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBundle.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBundle.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -189,7 +189,7 @@ class FHIRBundle extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Bundle * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundle Constructor @@ -650,12 +650,198 @@ public function setType(FHIRBundleType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTRY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimestamp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMESTAMP] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENTRY])) { + $v = $this->getEntry(); + foreach($validationRules[self::FIELD_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY])) { + $errs[self::FIELD_ENTRY] = []; + } + $errs[self::FIELD_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNATURE])) { + $v = $this->getSignature(); + foreach($validationRules[self::FIELD_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNATURE])) { + $errs[self::FIELD_SIGNATURE] = []; + } + $errs[self::FIELD_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMESTAMP])) { + $v = $this->getTimestamp(); + foreach($validationRules[self::FIELD_TIMESTAMP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_TIMESTAMP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMESTAMP])) { + $errs[self::FIELD_TIMESTAMP] = []; + } + $errs[self::FIELD_TIMESTAMP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource.php index c915c34dbb..4f9cdf3f10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRDomainResource extends FHIRResource * Validation map for fields in type DomainResource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDomainResource Constructor @@ -536,12 +536,149 @@ public function setText(FHIRNarrative $text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContained())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINED, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXTENSION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getModifierExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAccount.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAccount.php index 1dad072d1c..9c5620adf0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAccount.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAccount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -236,7 +236,7 @@ class FHIRAccount extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Account * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAccount Constructor @@ -920,12 +920,318 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCoverage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COVERAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGuarantor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GUARANTOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOwner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GUARANTOR])) { + $v = $this->getGuarantor(); + foreach($validationRules[self::FIELD_GUARANTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_GUARANTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GUARANTOR])) { + $errs[self::FIELD_GUARANTOR] = []; + } + $errs[self::FIELD_GUARANTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNER])) { + $v = $this->getOwner(); + foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_OWNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNER])) { + $errs[self::FIELD_OWNER] = []; + } + $errs[self::FIELD_OWNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_PERIOD])) { + $v = $this->getServicePeriod(); + foreach($validationRules[self::FIELD_SERVICE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_SERVICE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_PERIOD])) { + $errs[self::FIELD_SERVICE_PERIOD] = []; + } + $errs[self::FIELD_SERVICE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php index b164925114..bd822e969c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -883,7 +883,7 @@ class FHIRActivityDefinition extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type ActivityDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActivityDefinition Constructor @@ -4336,12 +4336,1060 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoNotPerform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DO_NOT_PERFORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDosage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDynamicValue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DYNAMIC_VALUE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLibrary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIBRARY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getObservationRequirement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OBSERVATION_REQUIREMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getObservationResultRequirement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OBSERVATION_RESULT_REQUIREMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecimenRequirement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN_REQUIREMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTransform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRANSFORM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DO_NOT_PERFORM])) { + $v = $this->getDoNotPerform(); + foreach($validationRules[self::FIELD_DO_NOT_PERFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_DO_NOT_PERFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DO_NOT_PERFORM])) { + $errs[self::FIELD_DO_NOT_PERFORM] = []; + } + $errs[self::FIELD_DO_NOT_PERFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DYNAMIC_VALUE])) { + $v = $this->getDynamicValue(); + foreach($validationRules[self::FIELD_DYNAMIC_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_DYNAMIC_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DYNAMIC_VALUE])) { + $errs[self::FIELD_DYNAMIC_VALUE] = []; + } + $errs[self::FIELD_DYNAMIC_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIBRARY])) { + $v = $this->getLibrary(); + foreach($validationRules[self::FIELD_LIBRARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_LIBRARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIBRARY])) { + $errs[self::FIELD_LIBRARY] = []; + } + $errs[self::FIELD_LIBRARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OBSERVATION_REQUIREMENT])) { + $v = $this->getObservationRequirement(); + foreach($validationRules[self::FIELD_OBSERVATION_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_OBSERVATION_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBSERVATION_REQUIREMENT])) { + $errs[self::FIELD_OBSERVATION_REQUIREMENT] = []; + } + $errs[self::FIELD_OBSERVATION_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OBSERVATION_RESULT_REQUIREMENT])) { + $v = $this->getObservationResultRequirement(); + foreach($validationRules[self::FIELD_OBSERVATION_RESULT_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_OBSERVATION_RESULT_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBSERVATION_RESULT_REQUIREMENT])) { + $errs[self::FIELD_OBSERVATION_RESULT_REQUIREMENT] = []; + } + $errs[self::FIELD_OBSERVATION_RESULT_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $v = $this->getProductCodeableConcept(); + foreach($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PRODUCT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_REFERENCE])) { + $v = $this->getProductReference(); + foreach($validationRules[self::FIELD_PRODUCT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PRODUCT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_REFERENCE])) { + $errs[self::FIELD_PRODUCT_REFERENCE] = []; + } + $errs[self::FIELD_PRODUCT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN_REQUIREMENT])) { + $v = $this->getSpecimenRequirement(); + foreach($validationRules[self::FIELD_SPECIMEN_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_SPECIMEN_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN_REQUIREMENT])) { + $errs[self::FIELD_SPECIMEN_REQUIREMENT] = []; + } + $errs[self::FIELD_SPECIMEN_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $v = $this->getSubjectCodeableConcept(); + foreach($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_SUBJECT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_REFERENCE])) { + $v = $this->getSubjectReference(); + foreach($validationRules[self::FIELD_SUBJECT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_SUBJECT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_REFERENCE])) { + $errs[self::FIELD_SUBJECT_REFERENCE] = []; + } + $errs[self::FIELD_SUBJECT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTITLE])) { + $v = $this->getSubtitle(); + foreach($validationRules[self::FIELD_SUBTITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_SUBTITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTITLE])) { + $errs[self::FIELD_SUBTITLE] = []; + } + $errs[self::FIELD_SUBTITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_AGE])) { + $v = $this->getTimingAge(); + foreach($validationRules[self::FIELD_TIMING_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TIMING_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_AGE])) { + $errs[self::FIELD_TIMING_AGE] = []; + } + $errs[self::FIELD_TIMING_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DURATION])) { + $v = $this->getTimingDuration(); + foreach($validationRules[self::FIELD_TIMING_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TIMING_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DURATION])) { + $errs[self::FIELD_TIMING_DURATION] = []; + } + $errs[self::FIELD_TIMING_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_RANGE])) { + $v = $this->getTimingRange(); + foreach($validationRules[self::FIELD_TIMING_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TIMING_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_RANGE])) { + $errs[self::FIELD_TIMING_RANGE] = []; + } + $errs[self::FIELD_TIMING_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRANSFORM])) { + $v = $this->getTransform(); + foreach($validationRules[self::FIELD_TRANSFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TRANSFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSFORM])) { + $errs[self::FIELD_TRANSFORM] = []; + } + $errs[self::FIELD_TRANSFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php index b6fc883769..8928805dcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -368,7 +368,7 @@ class FHIRAdverseEvent extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type AdverseEvent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseEvent Constructor @@ -1570,12 +1570,477 @@ public function setSuspectEntity(array $suspectEntity = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActuality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTUALITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContributor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRIBUTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetected())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETECTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecordedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferenceDocument())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_DOCUMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResultingCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESULTING_CONDITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSeriousness())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIOUSNESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStudy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STUDY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubjectMedicalHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT_MEDICAL_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSuspectEntity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUSPECT_ENTITY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTUALITY])) { + $v = $this->getActuality(); + foreach($validationRules[self::FIELD_ACTUALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_ACTUALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTUALITY])) { + $errs[self::FIELD_ACTUALITY] = []; + } + $errs[self::FIELD_ACTUALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRIBUTOR])) { + $v = $this->getContributor(); + foreach($validationRules[self::FIELD_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRIBUTOR])) { + $errs[self::FIELD_CONTRIBUTOR] = []; + } + $errs[self::FIELD_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETECTED])) { + $v = $this->getDetected(); + foreach($validationRules[self::FIELD_DETECTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_DETECTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETECTED])) { + $errs[self::FIELD_DETECTED] = []; + } + $errs[self::FIELD_DETECTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED_DATE])) { + $v = $this->getRecordedDate(); + foreach($validationRules[self::FIELD_RECORDED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_RECORDED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED_DATE])) { + $errs[self::FIELD_RECORDED_DATE] = []; + } + $errs[self::FIELD_RECORDED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_DOCUMENT])) { + $v = $this->getReferenceDocument(); + foreach($validationRules[self::FIELD_REFERENCE_DOCUMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_REFERENCE_DOCUMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_DOCUMENT])) { + $errs[self::FIELD_REFERENCE_DOCUMENT] = []; + } + $errs[self::FIELD_REFERENCE_DOCUMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULTING_CONDITION])) { + $v = $this->getResultingCondition(); + foreach($validationRules[self::FIELD_RESULTING_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_RESULTING_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULTING_CONDITION])) { + $errs[self::FIELD_RESULTING_CONDITION] = []; + } + $errs[self::FIELD_RESULTING_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIOUSNESS])) { + $v = $this->getSeriousness(); + foreach($validationRules[self::FIELD_SERIOUSNESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_SERIOUSNESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIOUSNESS])) { + $errs[self::FIELD_SERIOUSNESS] = []; + } + $errs[self::FIELD_SERIOUSNESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY])) { + $v = $this->getStudy(); + foreach($validationRules[self::FIELD_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY])) { + $errs[self::FIELD_STUDY] = []; + } + $errs[self::FIELD_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_MEDICAL_HISTORY])) { + $v = $this->getSubjectMedicalHistory(); + foreach($validationRules[self::FIELD_SUBJECT_MEDICAL_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_SUBJECT_MEDICAL_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_MEDICAL_HISTORY])) { + $errs[self::FIELD_SUBJECT_MEDICAL_HISTORY] = []; + } + $errs[self::FIELD_SUBJECT_MEDICAL_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUSPECT_ENTITY])) { + $v = $this->getSuspectEntity(); + foreach($validationRules[self::FIELD_SUSPECT_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_SUSPECT_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUSPECT_ENTITY])) { + $errs[self::FIELD_SUSPECT_ENTITY] = []; + } + $errs[self::FIELD_SUSPECT_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php index f457272c8a..a0b7246a87 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -385,7 +385,7 @@ class FHIRAllergyIntolerance extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type AllergyIntolerance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntolerance Constructor @@ -1550,12 +1550,471 @@ public function setVerificationStatus(FHIRCodeableConcept $verificationStatus = } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAsserter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClinicalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCriticality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITICALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastOccurrence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_OCCURRENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOnsetAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReaction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecordedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVerificationStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERIFICATION_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERTER])) { + $v = $this->getAsserter(); + foreach($validationRules[self::FIELD_ASSERTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ASSERTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERTER])) { + $errs[self::FIELD_ASSERTER] = []; + } + $errs[self::FIELD_ASSERTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLINICAL_STATUS])) { + $v = $this->getClinicalStatus(); + foreach($validationRules[self::FIELD_CLINICAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CLINICAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLINICAL_STATUS])) { + $errs[self::FIELD_CLINICAL_STATUS] = []; + } + $errs[self::FIELD_CLINICAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITICALITY])) { + $v = $this->getCriticality(); + foreach($validationRules[self::FIELD_CRITICALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CRITICALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITICALITY])) { + $errs[self::FIELD_CRITICALITY] = []; + } + $errs[self::FIELD_CRITICALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_OCCURRENCE])) { + $v = $this->getLastOccurrence(); + foreach($validationRules[self::FIELD_LAST_OCCURRENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_LAST_OCCURRENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_OCCURRENCE])) { + $errs[self::FIELD_LAST_OCCURRENCE] = []; + } + $errs[self::FIELD_LAST_OCCURRENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_AGE])) { + $v = $this->getOnsetAge(); + foreach($validationRules[self::FIELD_ONSET_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_AGE])) { + $errs[self::FIELD_ONSET_AGE] = []; + } + $errs[self::FIELD_ONSET_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_DATE_TIME])) { + $v = $this->getOnsetDateTime(); + foreach($validationRules[self::FIELD_ONSET_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_DATE_TIME])) { + $errs[self::FIELD_ONSET_DATE_TIME] = []; + } + $errs[self::FIELD_ONSET_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_PERIOD])) { + $v = $this->getOnsetPeriod(); + foreach($validationRules[self::FIELD_ONSET_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_PERIOD])) { + $errs[self::FIELD_ONSET_PERIOD] = []; + } + $errs[self::FIELD_ONSET_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_RANGE])) { + $v = $this->getOnsetRange(); + foreach($validationRules[self::FIELD_ONSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_RANGE])) { + $errs[self::FIELD_ONSET_RANGE] = []; + } + $errs[self::FIELD_ONSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_STRING])) { + $v = $this->getOnsetString(); + foreach($validationRules[self::FIELD_ONSET_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_STRING])) { + $errs[self::FIELD_ONSET_STRING] = []; + } + $errs[self::FIELD_ONSET_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REACTION])) { + $v = $this->getReaction(); + foreach($validationRules[self::FIELD_REACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_REACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REACTION])) { + $errs[self::FIELD_REACTION] = []; + } + $errs[self::FIELD_REACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED_DATE])) { + $v = $this->getRecordedDate(); + foreach($validationRules[self::FIELD_RECORDED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_RECORDED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED_DATE])) { + $errs[self::FIELD_RECORDED_DATE] = []; + } + $errs[self::FIELD_RECORDED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERIFICATION_STATUS])) { + $v = $this->getVerificationStatus(); + foreach($validationRules[self::FIELD_VERIFICATION_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_VERIFICATION_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERIFICATION_STATUS])) { + $errs[self::FIELD_VERIFICATION_STATUS] = []; + } + $errs[self::FIELD_VERIFICATION_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointment.php index d4d9d11e14..676349d8be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -424,7 +424,7 @@ class FHIRAppointment extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type Appointment * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PARTICIPANT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -2032,12 +2032,519 @@ public function setSupportingInformation(array $supportingInformation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAppointmentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCancelationReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CANCELATION_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMinutesDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MINUTES_DURATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatientInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT_INSTRUCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRequestedPeriod())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUESTED_PERIOD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getServiceCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_CATEGORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getServiceType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSlot())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SLOT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT_TYPE])) { + $v = $this->getAppointmentType(); + foreach($validationRules[self::FIELD_APPOINTMENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_APPOINTMENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT_TYPE])) { + $errs[self::FIELD_APPOINTMENT_TYPE] = []; + } + $errs[self::FIELD_APPOINTMENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CANCELATION_REASON])) { + $v = $this->getCancelationReason(); + foreach($validationRules[self::FIELD_CANCELATION_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_CANCELATION_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CANCELATION_REASON])) { + $errs[self::FIELD_CANCELATION_REASON] = []; + } + $errs[self::FIELD_CANCELATION_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MINUTES_DURATION])) { + $v = $this->getMinutesDuration(); + foreach($validationRules[self::FIELD_MINUTES_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_MINUTES_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MINUTES_DURATION])) { + $errs[self::FIELD_MINUTES_DURATION] = []; + } + $errs[self::FIELD_MINUTES_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT_INSTRUCTION])) { + $v = $this->getPatientInstruction(); + foreach($validationRules[self::FIELD_PATIENT_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_PATIENT_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT_INSTRUCTION])) { + $errs[self::FIELD_PATIENT_INSTRUCTION] = []; + } + $errs[self::FIELD_PATIENT_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTED_PERIOD])) { + $v = $this->getRequestedPeriod(); + foreach($validationRules[self::FIELD_REQUESTED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_REQUESTED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTED_PERIOD])) { + $errs[self::FIELD_REQUESTED_PERIOD] = []; + } + $errs[self::FIELD_REQUESTED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_CATEGORY])) { + $v = $this->getServiceCategory(); + foreach($validationRules[self::FIELD_SERVICE_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SERVICE_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_CATEGORY])) { + $errs[self::FIELD_SERVICE_CATEGORY] = []; + } + $errs[self::FIELD_SERVICE_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_TYPE])) { + $v = $this->getServiceType(); + foreach($validationRules[self::FIELD_SERVICE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SERVICE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_TYPE])) { + $errs[self::FIELD_SERVICE_TYPE] = []; + } + $errs[self::FIELD_SERVICE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLOT])) { + $v = $this->getSlot(); + foreach($validationRules[self::FIELD_SLOT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SLOT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLOT])) { + $errs[self::FIELD_SLOT] = []; + } + $errs[self::FIELD_SLOT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php index 6dd7db01c5..c70682d324 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -209,7 +209,7 @@ class FHIRAppointmentResponse extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type AppointmentResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAppointmentResponse Constructor @@ -752,12 +752,263 @@ public function setStart($start = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getParticipantStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipantType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT])) { + $v = $this->getAppointment(); + foreach($validationRules[self::FIELD_APPOINTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_APPOINTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT])) { + $errs[self::FIELD_APPOINTMENT] = []; + } + $errs[self::FIELD_APPOINTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_STATUS])) { + $v = $this->getParticipantStatus(); + foreach($validationRules[self::FIELD_PARTICIPANT_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_PARTICIPANT_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_STATUS])) { + $errs[self::FIELD_PARTICIPANT_STATUS] = []; + } + $errs[self::FIELD_PARTICIPANT_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_TYPE])) { + $v = $this->getParticipantType(); + foreach($validationRules[self::FIELD_PARTICIPANT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_PARTICIPANT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_TYPE])) { + $errs[self::FIELD_PARTICIPANT_TYPE] = []; + } + $errs[self::FIELD_PARTICIPANT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php index e441d2ba98..fbd95719a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -240,7 +240,7 @@ class FHIRAuditEvent extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type AuditEvent * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_AGENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -941,12 +941,318 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEntity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcomeDesc())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME_DESC] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPurposeOfEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE_OF_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubtype())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBTYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_DESC])) { + $v = $this->getOutcomeDesc(); + foreach($validationRules[self::FIELD_OUTCOME_DESC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_OUTCOME_DESC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_DESC])) { + $errs[self::FIELD_OUTCOME_DESC] = []; + } + $errs[self::FIELD_OUTCOME_DESC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE_OF_EVENT])) { + $v = $this->getPurposeOfEvent(); + foreach($validationRules[self::FIELD_PURPOSE_OF_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_PURPOSE_OF_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE_OF_EVENT])) { + $errs[self::FIELD_PURPOSE_OF_EVENT] = []; + } + $errs[self::FIELD_PURPOSE_OF_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED])) { + $v = $this->getRecorded(); + foreach($validationRules[self::FIELD_RECORDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_RECORDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED])) { + $errs[self::FIELD_RECORDED] = []; + } + $errs[self::FIELD_RECORDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTYPE])) { + $v = $this->getSubtype(); + foreach($validationRules[self::FIELD_SUBTYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_SUBTYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTYPE])) { + $errs[self::FIELD_SUBTYPE] = []; + } + $errs[self::FIELD_SUBTYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBasic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBasic.php index 4cebddfa4a..d6140b4517 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBasic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBasic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -159,7 +159,7 @@ class FHIRBasic extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Basic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBasic Constructor @@ -468,12 +468,210 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProduct.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProduct.php index b464ae41c5..85487f1419 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProduct.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProduct.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -236,7 +236,7 @@ class FHIRBiologicallyDerivedProduct extends FHIRDomainResource implements PHPFH * Validation map for fields in type BiologicallyDerivedProduct * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBiologicallyDerivedProduct Constructor @@ -945,12 +945,320 @@ public function setStorage(array $storage = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCollection())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManipulation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANIPULATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProcessing())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESSING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStorage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STORAGE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTION])) { + $v = $this->getCollection(); + foreach($validationRules[self::FIELD_COLLECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_COLLECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTION])) { + $errs[self::FIELD_COLLECTION] = []; + } + $errs[self::FIELD_COLLECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANIPULATION])) { + $v = $this->getManipulation(); + foreach($validationRules[self::FIELD_MANIPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_MANIPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANIPULATION])) { + $errs[self::FIELD_MANIPULATION] = []; + } + $errs[self::FIELD_MANIPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESSING])) { + $v = $this->getProcessing(); + foreach($validationRules[self::FIELD_PROCESSING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_PROCESSING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESSING])) { + $errs[self::FIELD_PROCESSING] = []; + } + $errs[self::FIELD_PROCESSING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_CATEGORY])) { + $v = $this->getProductCategory(); + foreach($validationRules[self::FIELD_PRODUCT_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_PRODUCT_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_CATEGORY])) { + $errs[self::FIELD_PRODUCT_CATEGORY] = []; + } + $errs[self::FIELD_PRODUCT_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_CODE])) { + $v = $this->getProductCode(); + foreach($validationRules[self::FIELD_PRODUCT_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_PRODUCT_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_CODE])) { + $errs[self::FIELD_PRODUCT_CODE] = []; + } + $errs[self::FIELD_PRODUCT_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STORAGE])) { + $v = $this->getStorage(); + foreach($validationRules[self::FIELD_STORAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT, self::FIELD_STORAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STORAGE])) { + $errs[self::FIELD_STORAGE] = []; + } + $errs[self::FIELD_STORAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBodyStructure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBodyStructure.php index c3f7c973b7..e0230cfba4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBodyStructure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBodyStructure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -196,7 +196,7 @@ class FHIRBodyStructure extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type BodyStructure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBodyStructure Constructor @@ -713,12 +713,265 @@ public function setPatient(FHIRReference $patient = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLocationQualifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION_QUALIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMorphology())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MORPHOLOGY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_STRUCTURE, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_STRUCTURE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_STRUCTURE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGE])) { + $v = $this->getImage(); + foreach($validationRules[self::FIELD_IMAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_STRUCTURE, self::FIELD_IMAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGE])) { + $errs[self::FIELD_IMAGE] = []; + } + $errs[self::FIELD_IMAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_STRUCTURE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_QUALIFIER])) { + $v = $this->getLocationQualifier(); + foreach($validationRules[self::FIELD_LOCATION_QUALIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_STRUCTURE, self::FIELD_LOCATION_QUALIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_QUALIFIER])) { + $errs[self::FIELD_LOCATION_QUALIFIER] = []; + } + $errs[self::FIELD_LOCATION_QUALIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MORPHOLOGY])) { + $v = $this->getMorphology(); + foreach($validationRules[self::FIELD_MORPHOLOGY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_STRUCTURE, self::FIELD_MORPHOLOGY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MORPHOLOGY])) { + $errs[self::FIELD_MORPHOLOGY] = []; + } + $errs[self::FIELD_MORPHOLOGY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_STRUCTURE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php index c118232c8c..72bc8da3ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -510,7 +510,7 @@ class FHIRCapabilityStatement extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type CapabilityStatement * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_FORMAT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -2534,12 +2534,587 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDocument())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFhirVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FHIR_VERSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFormat())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FORMAT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getImplementation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLEMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getImplementationGuide())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPLEMENTATION_GUIDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImports())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPORTS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiates())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMessaging())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MESSAGING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPatchFormat())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PATCH_FORMAT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSoftware())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOFTWARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENT])) { + $v = $this->getDocument(); + foreach($validationRules[self::FIELD_DOCUMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_DOCUMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENT])) { + $errs[self::FIELD_DOCUMENT] = []; + } + $errs[self::FIELD_DOCUMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORMAT])) { + $v = $this->getFormat(); + foreach($validationRules[self::FIELD_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAT])) { + $errs[self::FIELD_FORMAT] = []; + } + $errs[self::FIELD_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLEMENTATION])) { + $v = $this->getImplementation(); + foreach($validationRules[self::FIELD_IMPLEMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_IMPLEMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLEMENTATION])) { + $errs[self::FIELD_IMPLEMENTATION] = []; + } + $errs[self::FIELD_IMPLEMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLEMENTATION_GUIDE])) { + $v = $this->getImplementationGuide(); + foreach($validationRules[self::FIELD_IMPLEMENTATION_GUIDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_IMPLEMENTATION_GUIDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLEMENTATION_GUIDE])) { + $errs[self::FIELD_IMPLEMENTATION_GUIDE] = []; + } + $errs[self::FIELD_IMPLEMENTATION_GUIDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPORTS])) { + $v = $this->getImports(); + foreach($validationRules[self::FIELD_IMPORTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_IMPORTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPORTS])) { + $errs[self::FIELD_IMPORTS] = []; + } + $errs[self::FIELD_IMPORTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES])) { + $v = $this->getInstantiates(); + foreach($validationRules[self::FIELD_INSTANTIATES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_INSTANTIATES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES])) { + $errs[self::FIELD_INSTANTIATES] = []; + } + $errs[self::FIELD_INSTANTIATES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MESSAGING])) { + $v = $this->getMessaging(); + foreach($validationRules[self::FIELD_MESSAGING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_MESSAGING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MESSAGING])) { + $errs[self::FIELD_MESSAGING] = []; + } + $errs[self::FIELD_MESSAGING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATCH_FORMAT])) { + $v = $this->getPatchFormat(); + foreach($validationRules[self::FIELD_PATCH_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_PATCH_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATCH_FORMAT])) { + $errs[self::FIELD_PATCH_FORMAT] = []; + } + $errs[self::FIELD_PATCH_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REST])) { + $v = $this->getRest(); + foreach($validationRules[self::FIELD_REST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_REST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REST])) { + $errs[self::FIELD_REST] = []; + } + $errs[self::FIELD_REST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOFTWARE])) { + $v = $this->getSoftware(); + foreach($validationRules[self::FIELD_SOFTWARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_SOFTWARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOFTWARE])) { + $errs[self::FIELD_SOFTWARE] = []; + } + $errs[self::FIELD_SOFTWARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCarePlan.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCarePlan.php index 1eab211ccb..5c7bcab4f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCarePlan.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCarePlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -407,7 +407,7 @@ class FHIRCarePlan extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type CarePlan * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlan Constructor @@ -2049,12 +2049,542 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getActivity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTIVITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAddresses())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESSES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCareTeam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContributor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRIBUTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGoal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_URI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVITY])) { + $v = $this->getActivity(); + foreach($validationRules[self::FIELD_ACTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_ACTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVITY])) { + $errs[self::FIELD_ACTIVITY] = []; + } + $errs[self::FIELD_ACTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESSES])) { + $v = $this->getAddresses(); + foreach($validationRules[self::FIELD_ADDRESSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_ADDRESSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESSES])) { + $errs[self::FIELD_ADDRESSES] = []; + } + $errs[self::FIELD_ADDRESSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM])) { + $v = $this->getCareTeam(); + foreach($validationRules[self::FIELD_CARE_TEAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_CARE_TEAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM])) { + $errs[self::FIELD_CARE_TEAM] = []; + } + $errs[self::FIELD_CARE_TEAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRIBUTOR])) { + $v = $this->getContributor(); + foreach($validationRules[self::FIELD_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRIBUTOR])) { + $errs[self::FIELD_CONTRIBUTOR] = []; + } + $errs[self::FIELD_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL])) { + $v = $this->getGoal(); + foreach($validationRules[self::FIELD_GOAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_GOAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL])) { + $errs[self::FIELD_GOAL] = []; + } + $errs[self::FIELD_GOAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCareTeam.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCareTeam.php index da2b8b5c05..d4fb1e6f29 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -264,7 +264,7 @@ class FHIRCareTeam extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type CareTeam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCareTeam Constructor @@ -1159,12 +1159,360 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getManagingOrganization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANAGING_ORGANIZATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCatalogEntry.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCatalogEntry.php index 18e0d6708d..ebd3d526bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCatalogEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCatalogEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -265,7 +265,7 @@ class FHIRCatalogEntry extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type CatalogEntry * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCatalogEntry Constructor @@ -1132,12 +1132,356 @@ public function setValidityPeriod(FHIRPeriod $validityPeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdditionalCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIONAL_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAdditionalClassification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIONAL_CLASSIFICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAdditionalIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIONAL_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getClassification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CLASSIFICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastUpdated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_UPDATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERABLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferencedItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCED_ITEM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ENTRY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidTo())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALID_TO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidityPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDITY_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_CHARACTERISTIC])) { + $v = $this->getAdditionalCharacteristic(); + foreach($validationRules[self::FIELD_ADDITIONAL_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_ADDITIONAL_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_CHARACTERISTIC])) { + $errs[self::FIELD_ADDITIONAL_CHARACTERISTIC] = []; + } + $errs[self::FIELD_ADDITIONAL_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_CLASSIFICATION])) { + $v = $this->getAdditionalClassification(); + foreach($validationRules[self::FIELD_ADDITIONAL_CLASSIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_ADDITIONAL_CLASSIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_CLASSIFICATION])) { + $errs[self::FIELD_ADDITIONAL_CLASSIFICATION] = []; + } + $errs[self::FIELD_ADDITIONAL_CLASSIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_IDENTIFIER])) { + $v = $this->getAdditionalIdentifier(); + foreach($validationRules[self::FIELD_ADDITIONAL_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_ADDITIONAL_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_IDENTIFIER])) { + $errs[self::FIELD_ADDITIONAL_IDENTIFIER] = []; + } + $errs[self::FIELD_ADDITIONAL_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASSIFICATION])) { + $v = $this->getClassification(); + foreach($validationRules[self::FIELD_CLASSIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_CLASSIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASSIFICATION])) { + $errs[self::FIELD_CLASSIFICATION] = []; + } + $errs[self::FIELD_CLASSIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_UPDATED])) { + $v = $this->getLastUpdated(); + foreach($validationRules[self::FIELD_LAST_UPDATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_LAST_UPDATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_UPDATED])) { + $errs[self::FIELD_LAST_UPDATED] = []; + } + $errs[self::FIELD_LAST_UPDATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERABLE])) { + $v = $this->getOrderable(); + foreach($validationRules[self::FIELD_ORDERABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_ORDERABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERABLE])) { + $errs[self::FIELD_ORDERABLE] = []; + } + $errs[self::FIELD_ORDERABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCED_ITEM])) { + $v = $this->getReferencedItem(); + foreach($validationRules[self::FIELD_REFERENCED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_REFERENCED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCED_ITEM])) { + $errs[self::FIELD_REFERENCED_ITEM] = []; + } + $errs[self::FIELD_REFERENCED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ENTRY])) { + $v = $this->getRelatedEntry(); + foreach($validationRules[self::FIELD_RELATED_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_RELATED_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ENTRY])) { + $errs[self::FIELD_RELATED_ENTRY] = []; + } + $errs[self::FIELD_RELATED_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALID_TO])) { + $v = $this->getValidTo(); + foreach($validationRules[self::FIELD_VALID_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_VALID_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALID_TO])) { + $errs[self::FIELD_VALID_TO] = []; + } + $errs[self::FIELD_VALID_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDITY_PERIOD])) { + $v = $this->getValidityPeriod(); + foreach($validationRules[self::FIELD_VALIDITY_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY, self::FIELD_VALIDITY_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDITY_PERIOD])) { + $errs[self::FIELD_VALIDITY_PERIOD] = []; + } + $errs[self::FIELD_VALIDITY_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItem.php index dc1cbda80e..f4a5ae24ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -490,7 +490,7 @@ class FHIRChargeItem extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type ChargeItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRChargeItem Constructor @@ -2256,12 +2256,638 @@ public function setSupportingInformation(array $supportingInformation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAccount())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACCOUNT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBodysite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODYSITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCostCenter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COST_CENTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinitionCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDefinitionUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION_URI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEnteredDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactorOverride())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR_OVERRIDE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getOverrideReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OVERRIDE_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPerformingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriceOverride())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRICE_OVERRIDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequestingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTING_ORGANIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getService())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACCOUNT])) { + $v = $this->getAccount(); + foreach($validationRules[self::FIELD_ACCOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_ACCOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCOUNT])) { + $errs[self::FIELD_ACCOUNT] = []; + } + $errs[self::FIELD_ACCOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODYSITE])) { + $v = $this->getBodysite(); + foreach($validationRules[self::FIELD_BODYSITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_BODYSITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODYSITE])) { + $errs[self::FIELD_BODYSITE] = []; + } + $errs[self::FIELD_BODYSITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COST_CENTER])) { + $v = $this->getCostCenter(); + foreach($validationRules[self::FIELD_COST_CENTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_COST_CENTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COST_CENTER])) { + $errs[self::FIELD_COST_CENTER] = []; + } + $errs[self::FIELD_COST_CENTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_CANONICAL])) { + $v = $this->getDefinitionCanonical(); + foreach($validationRules[self::FIELD_DEFINITION_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_DEFINITION_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_CANONICAL])) { + $errs[self::FIELD_DEFINITION_CANONICAL] = []; + } + $errs[self::FIELD_DEFINITION_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_URI])) { + $v = $this->getDefinitionUri(); + foreach($validationRules[self::FIELD_DEFINITION_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_DEFINITION_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_URI])) { + $errs[self::FIELD_DEFINITION_URI] = []; + } + $errs[self::FIELD_DEFINITION_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERED_DATE])) { + $v = $this->getEnteredDate(); + foreach($validationRules[self::FIELD_ENTERED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_ENTERED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERED_DATE])) { + $errs[self::FIELD_ENTERED_DATE] = []; + } + $errs[self::FIELD_ENTERED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR_OVERRIDE])) { + $v = $this->getFactorOverride(); + foreach($validationRules[self::FIELD_FACTOR_OVERRIDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_FACTOR_OVERRIDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR_OVERRIDE])) { + $errs[self::FIELD_FACTOR_OVERRIDE] = []; + } + $errs[self::FIELD_FACTOR_OVERRIDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OVERRIDE_REASON])) { + $v = $this->getOverrideReason(); + foreach($validationRules[self::FIELD_OVERRIDE_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_OVERRIDE_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OVERRIDE_REASON])) { + $errs[self::FIELD_OVERRIDE_REASON] = []; + } + $errs[self::FIELD_OVERRIDE_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMING_ORGANIZATION])) { + $v = $this->getPerformingOrganization(); + foreach($validationRules[self::FIELD_PERFORMING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_PERFORMING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMING_ORGANIZATION])) { + $errs[self::FIELD_PERFORMING_ORGANIZATION] = []; + } + $errs[self::FIELD_PERFORMING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRICE_OVERRIDE])) { + $v = $this->getPriceOverride(); + foreach($validationRules[self::FIELD_PRICE_OVERRIDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_PRICE_OVERRIDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRICE_OVERRIDE])) { + $errs[self::FIELD_PRICE_OVERRIDE] = []; + } + $errs[self::FIELD_PRICE_OVERRIDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $v = $this->getProductCodeableConcept(); + foreach($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_PRODUCT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_REFERENCE])) { + $v = $this->getProductReference(); + foreach($validationRules[self::FIELD_PRODUCT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_PRODUCT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_REFERENCE])) { + $errs[self::FIELD_PRODUCT_REFERENCE] = []; + } + $errs[self::FIELD_PRODUCT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTING_ORGANIZATION])) { + $v = $this->getRequestingOrganization(); + foreach($validationRules[self::FIELD_REQUESTING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_REQUESTING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTING_ORGANIZATION])) { + $errs[self::FIELD_REQUESTING_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUESTING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinition.php index 09fa1dc0c9..77e0e83d36 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -455,7 +455,7 @@ class FHIRChargeItemDefinition extends FHIRDomainResource implements PHPFHIRCont * Validation map for fields in type ChargeItemDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRChargeItemDefinition Constructor @@ -2207,12 +2207,534 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getApplicability())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_APPLICABILITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDerivedFromUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DERIVED_FROM_URI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPropertyGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROPERTY_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPLICABILITY])) { + $v = $this->getApplicability(); + foreach($validationRules[self::FIELD_APPLICABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_APPLICABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLICABILITY])) { + $errs[self::FIELD_APPLICABILITY] = []; + } + $errs[self::FIELD_APPLICABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DERIVED_FROM_URI])) { + $v = $this->getDerivedFromUri(); + foreach($validationRules[self::FIELD_DERIVED_FROM_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_DERIVED_FROM_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DERIVED_FROM_URI])) { + $errs[self::FIELD_DERIVED_FROM_URI] = []; + } + $errs[self::FIELD_DERIVED_FROM_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY_GROUP])) { + $v = $this->getPropertyGroup(); + foreach($validationRules[self::FIELD_PROPERTY_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_PROPERTY_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY_GROUP])) { + $errs[self::FIELD_PROPERTY_GROUP] = []; + } + $errs[self::FIELD_PROPERTY_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaim.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaim.php index ffd2c77be7..7d17280998 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaim.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaim.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -455,7 +455,7 @@ class FHIRClaim extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Claim * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INSURANCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1911,12 +1911,598 @@ public function setUse(FHIRUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccident())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCIDENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBillablePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BILLABLE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareTeam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFacility())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFundsReserve())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNDS_RESERVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOriginalPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcedure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferral())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCIDENT])) { + $v = $this->getAccident(); + foreach($validationRules[self::FIELD_ACCIDENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCIDENT])) { + $errs[self::FIELD_ACCIDENT] = []; + } + $errs[self::FIELD_ACCIDENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BILLABLE_PERIOD])) { + $v = $this->getBillablePeriod(); + foreach($validationRules[self::FIELD_BILLABLE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_BILLABLE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BILLABLE_PERIOD])) { + $errs[self::FIELD_BILLABLE_PERIOD] = []; + } + $errs[self::FIELD_BILLABLE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM])) { + $v = $this->getCareTeam(); + foreach($validationRules[self::FIELD_CARE_TEAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CARE_TEAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM])) { + $errs[self::FIELD_CARE_TEAM] = []; + } + $errs[self::FIELD_CARE_TEAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY])) { + $v = $this->getFacility(); + foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FACILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY])) { + $errs[self::FIELD_FACILITY] = []; + } + $errs[self::FIELD_FACILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNDS_RESERVE])) { + $v = $this->getFundsReserve(); + foreach($validationRules[self::FIELD_FUNDS_RESERVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FUNDS_RESERVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNDS_RESERVE])) { + $errs[self::FIELD_FUNDS_RESERVE] = []; + } + $errs[self::FIELD_FUNDS_RESERVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION])) { + $v = $this->getOriginalPrescription(); + foreach($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_PRESCRIPTION])) { + $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = []; + } + $errs[self::FIELD_ORIGINAL_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE])) { + $v = $this->getPayee(); + foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PAYEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE])) { + $errs[self::FIELD_PAYEE] = []; + } + $errs[self::FIELD_PAYEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIPTION])) { + $v = $this->getPrescription(); + foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIPTION])) { + $errs[self::FIELD_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL])) { + $v = $this->getReferral(); + foreach($validationRules[self::FIELD_REFERRAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_REFERRAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL])) { + $errs[self::FIELD_REFERRAL] = []; + } + $errs[self::FIELD_REFERRAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php index 0e86d6a0af..ef0ff72287 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -446,7 +446,7 @@ class FHIRClaimResponse extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type ClaimResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponse Constructor @@ -1966,12 +1966,600 @@ public function setUse(FHIRUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAddItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCommunicationRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getError())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ERROR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if (null !== ($v = $this->getFormCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFundsReserve())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNDS_RESERVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayeeType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreAuthPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRE_AUTH_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreAuthRef())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRE_AUTH_REF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcessNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESS_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTotal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOTAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADD_ITEM])) { + $v = $this->getAddItem(); + foreach($validationRules[self::FIELD_ADD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ADD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADD_ITEM])) { + $errs[self::FIELD_ADD_ITEM] = []; + } + $errs[self::FIELD_ADD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION_REQUEST])) { + $v = $this->getCommunicationRequest(); + foreach($validationRules[self::FIELD_COMMUNICATION_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_COMMUNICATION_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION_REQUEST])) { + $errs[self::FIELD_COMMUNICATION_REQUEST] = []; + } + $errs[self::FIELD_COMMUNICATION_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ERROR])) { + $v = $this->getError(); + foreach($validationRules[self::FIELD_ERROR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ERROR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ERROR])) { + $errs[self::FIELD_ERROR] = []; + } + $errs[self::FIELD_ERROR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM_CODE])) { + $v = $this->getFormCode(); + foreach($validationRules[self::FIELD_FORM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_FORM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM_CODE])) { + $errs[self::FIELD_FORM_CODE] = []; + } + $errs[self::FIELD_FORM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNDS_RESERVE])) { + $v = $this->getFundsReserve(); + foreach($validationRules[self::FIELD_FUNDS_RESERVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_FUNDS_RESERVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNDS_RESERVE])) { + $errs[self::FIELD_FUNDS_RESERVE] = []; + } + $errs[self::FIELD_FUNDS_RESERVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE_TYPE])) { + $v = $this->getPayeeType(); + foreach($validationRules[self::FIELD_PAYEE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PAYEE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE_TYPE])) { + $errs[self::FIELD_PAYEE_TYPE] = []; + } + $errs[self::FIELD_PAYEE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT])) { + $v = $this->getPayment(); + foreach($validationRules[self::FIELD_PAYMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PAYMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT])) { + $errs[self::FIELD_PAYMENT] = []; + } + $errs[self::FIELD_PAYMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_PERIOD])) { + $v = $this->getPreAuthPeriod(); + foreach($validationRules[self::FIELD_PRE_AUTH_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PRE_AUTH_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_PERIOD])) { + $errs[self::FIELD_PRE_AUTH_PERIOD] = []; + } + $errs[self::FIELD_PRE_AUTH_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF])) { + $v = $this->getPreAuthRef(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PRE_AUTH_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF])) { + $errs[self::FIELD_PRE_AUTH_REF] = []; + } + $errs[self::FIELD_PRE_AUTH_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESS_NOTE])) { + $v = $this->getProcessNote(); + foreach($validationRules[self::FIELD_PROCESS_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PROCESS_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESS_NOTE])) { + $errs[self::FIELD_PROCESS_NOTE] = []; + } + $errs[self::FIELD_PROCESS_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTOR])) { + $v = $this->getRequestor(); + foreach($validationRules[self::FIELD_REQUESTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_REQUESTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTOR])) { + $errs[self::FIELD_REQUESTOR] = []; + } + $errs[self::FIELD_REQUESTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php index 92517aa687..7de7cef6d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -395,7 +395,7 @@ class FHIRClinicalImpression extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type ClinicalImpression * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpression Constructor @@ -1782,12 +1782,498 @@ public function setSupportingInfo(array $supportingInfo = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssessor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSESSOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFinding())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FINDING, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInvestigation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INVESTIGATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrevious())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREVIOUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProblem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROBLEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPrognosisCodeableConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGNOSIS_CODEABLE_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPrognosisReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGNOSIS_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProtocol())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROTOCOL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSummary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUMMARY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ASSESSOR])) { + $v = $this->getAssessor(); + foreach($validationRules[self::FIELD_ASSESSOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_ASSESSOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSESSOR])) { + $errs[self::FIELD_ASSESSOR] = []; + } + $errs[self::FIELD_ASSESSOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FINDING])) { + $v = $this->getFinding(); + foreach($validationRules[self::FIELD_FINDING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_FINDING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FINDING])) { + $errs[self::FIELD_FINDING] = []; + } + $errs[self::FIELD_FINDING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INVESTIGATION])) { + $v = $this->getInvestigation(); + foreach($validationRules[self::FIELD_INVESTIGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_INVESTIGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INVESTIGATION])) { + $errs[self::FIELD_INVESTIGATION] = []; + } + $errs[self::FIELD_INVESTIGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREVIOUS])) { + $v = $this->getPrevious(); + foreach($validationRules[self::FIELD_PREVIOUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PREVIOUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREVIOUS])) { + $errs[self::FIELD_PREVIOUS] = []; + } + $errs[self::FIELD_PREVIOUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROBLEM])) { + $v = $this->getProblem(); + foreach($validationRules[self::FIELD_PROBLEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROBLEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROBLEM])) { + $errs[self::FIELD_PROBLEM] = []; + } + $errs[self::FIELD_PROBLEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT])) { + $v = $this->getPrognosisCodeableConcept(); + foreach($validationRules[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROGNOSIS_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGNOSIS_REFERENCE])) { + $v = $this->getPrognosisReference(); + foreach($validationRules[self::FIELD_PROGNOSIS_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROGNOSIS_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGNOSIS_REFERENCE])) { + $errs[self::FIELD_PROGNOSIS_REFERENCE] = []; + } + $errs[self::FIELD_PROGNOSIS_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUMMARY])) { + $v = $this->getSummary(); + foreach($validationRules[self::FIELD_SUMMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_SUMMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUMMARY])) { + $errs[self::FIELD_SUMMARY] = []; + } + $errs[self::FIELD_SUMMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php index 166eebccb4..47fcc6b5d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -493,7 +493,7 @@ class FHIRCodeSystem extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type CodeSystem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystem Constructor @@ -2325,12 +2325,579 @@ public function setVersionNeeded($versionNeeded = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCaseSensitive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CASE_SENSITIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompositional())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSITIONAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FILTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getHierarchyMeaning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIERARCHY_MEANING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProperty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROPERTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLEMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersionNeeded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION_NEEDED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CASE_SENSITIVE])) { + $v = $this->getCaseSensitive(); + foreach($validationRules[self::FIELD_CASE_SENSITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_CASE_SENSITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CASE_SENSITIVE])) { + $errs[self::FIELD_CASE_SENSITIVE] = []; + } + $errs[self::FIELD_CASE_SENSITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPOSITIONAL])) { + $v = $this->getCompositional(); + foreach($validationRules[self::FIELD_COMPOSITIONAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_COMPOSITIONAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPOSITIONAL])) { + $errs[self::FIELD_COMPOSITIONAL] = []; + } + $errs[self::FIELD_COMPOSITIONAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT])) { + $v = $this->getCount(); + foreach($validationRules[self::FIELD_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT])) { + $errs[self::FIELD_COUNT] = []; + } + $errs[self::FIELD_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FILTER])) { + $v = $this->getFilter(); + foreach($validationRules[self::FIELD_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FILTER])) { + $errs[self::FIELD_FILTER] = []; + } + $errs[self::FIELD_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HIERARCHY_MEANING])) { + $v = $this->getHierarchyMeaning(); + foreach($validationRules[self::FIELD_HIERARCHY_MEANING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_HIERARCHY_MEANING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIERARCHY_MEANING])) { + $errs[self::FIELD_HIERARCHY_MEANING] = []; + } + $errs[self::FIELD_HIERARCHY_MEANING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLEMENTS])) { + $v = $this->getSupplements(); + foreach($validationRules[self::FIELD_SUPPLEMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_SUPPLEMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLEMENTS])) { + $errs[self::FIELD_SUPPLEMENTS] = []; + } + $errs[self::FIELD_SUPPLEMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET])) { + $v = $this->getValueSet(); + foreach($validationRules[self::FIELD_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET])) { + $errs[self::FIELD_VALUE_SET] = []; + } + $errs[self::FIELD_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION_NEEDED])) { + $v = $this->getVersionNeeded(); + foreach($validationRules[self::FIELD_VERSION_NEEDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_VERSION_NEEDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION_NEEDED])) { + $errs[self::FIELD_VERSION_NEEDED] = []; + } + $errs[self::FIELD_VERSION_NEEDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunication.php index c12302a858..d53c588ddb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -407,7 +407,7 @@ class FHIRCommunication extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type Communication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunication Constructor @@ -2033,12 +2033,542 @@ public function setTopic(FHIRCodeableConcept $topic = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAbout())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ABOUT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInResponseTo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IN_RESPONSE_TO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_URI, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMedium())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEDIUM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPayload())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYLOAD, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReceived())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTopic())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOPIC] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABOUT])) { + $v = $this->getAbout(); + foreach($validationRules[self::FIELD_ABOUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_ABOUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABOUT])) { + $errs[self::FIELD_ABOUT] = []; + } + $errs[self::FIELD_ABOUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IN_RESPONSE_TO])) { + $v = $this->getInResponseTo(); + foreach($validationRules[self::FIELD_IN_RESPONSE_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_IN_RESPONSE_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IN_RESPONSE_TO])) { + $errs[self::FIELD_IN_RESPONSE_TO] = []; + } + $errs[self::FIELD_IN_RESPONSE_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIUM])) { + $v = $this->getMedium(); + foreach($validationRules[self::FIELD_MEDIUM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_MEDIUM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIUM])) { + $errs[self::FIELD_MEDIUM] = []; + } + $errs[self::FIELD_MEDIUM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD])) { + $v = $this->getPayload(); + foreach($validationRules[self::FIELD_PAYLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_PAYLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD])) { + $errs[self::FIELD_PAYLOAD] = []; + } + $errs[self::FIELD_PAYLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVED])) { + $v = $this->getReceived(); + foreach($validationRules[self::FIELD_RECEIVED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_RECEIVED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVED])) { + $errs[self::FIELD_RECEIVED] = []; + } + $errs[self::FIELD_RECEIVED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENDER])) { + $v = $this->getSender(); + foreach($validationRules[self::FIELD_SENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_SENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENDER])) { + $errs[self::FIELD_SENDER] = []; + } + $errs[self::FIELD_SENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENT])) { + $v = $this->getSent(); + foreach($validationRules[self::FIELD_SENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_SENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENT])) { + $errs[self::FIELD_SENT] = []; + } + $errs[self::FIELD_SENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php index 5023eedca2..22c0a11d9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -406,7 +406,7 @@ class FHIRCommunicationRequest extends FHIRDomainResource implements PHPFHIRCont * Validation map for fields in type CommunicationRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationRequest Constructor @@ -1882,12 +1882,536 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAbout())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ABOUT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDoNotPerform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DO_NOT_PERFORM] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMedium())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEDIUM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPayload())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYLOAD, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABOUT])) { + $v = $this->getAbout(); + foreach($validationRules[self::FIELD_ABOUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_ABOUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABOUT])) { + $errs[self::FIELD_ABOUT] = []; + } + $errs[self::FIELD_ABOUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DO_NOT_PERFORM])) { + $v = $this->getDoNotPerform(); + foreach($validationRules[self::FIELD_DO_NOT_PERFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_DO_NOT_PERFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DO_NOT_PERFORM])) { + $errs[self::FIELD_DO_NOT_PERFORM] = []; + } + $errs[self::FIELD_DO_NOT_PERFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIUM])) { + $v = $this->getMedium(); + foreach($validationRules[self::FIELD_MEDIUM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_MEDIUM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIUM])) { + $errs[self::FIELD_MEDIUM] = []; + } + $errs[self::FIELD_MEDIUM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD])) { + $v = $this->getPayload(); + foreach($validationRules[self::FIELD_PAYLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_PAYLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD])) { + $errs[self::FIELD_PAYLOAD] = []; + } + $errs[self::FIELD_PAYLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENDER])) { + $v = $this->getSender(); + foreach($validationRules[self::FIELD_SENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_SENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENDER])) { + $errs[self::FIELD_SENDER] = []; + } + $errs[self::FIELD_SENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php index afb8bf45b2..b3f77feb61 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -309,7 +309,7 @@ class FHIRCompartmentDefinition extends FHIRDomainResource implements PHPFHIRCon * Validation map for fields in type CompartmentDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompartmentDefinition Constructor @@ -1309,12 +1309,367 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSearch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH])) { + $v = $this->getSearch(); + foreach($validationRules[self::FIELD_SEARCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_SEARCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH])) { + $errs[self::FIELD_SEARCH] = []; + } + $errs[self::FIELD_SEARCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRComposition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRComposition.php index ed1974d9f5..b78b7d984d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRComposition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRComposition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -332,7 +332,7 @@ class FHIRComposition extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type Composition * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_AUTHOR => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1358,12 +1358,390 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAttester())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ATTESTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getConfidentiality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFIDENTIALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCustodian())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CUSTODIAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatesTo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATES_TO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSection())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ATTESTER])) { + $v = $this->getAttester(); + foreach($validationRules[self::FIELD_ATTESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_ATTESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTESTER])) { + $errs[self::FIELD_ATTESTER] = []; + } + $errs[self::FIELD_ATTESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONFIDENTIALITY])) { + $v = $this->getConfidentiality(); + foreach($validationRules[self::FIELD_CONFIDENTIALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CONFIDENTIALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONFIDENTIALITY])) { + $errs[self::FIELD_CONFIDENTIALITY] = []; + } + $errs[self::FIELD_CONFIDENTIALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CUSTODIAN])) { + $v = $this->getCustodian(); + foreach($validationRules[self::FIELD_CUSTODIAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CUSTODIAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CUSTODIAN])) { + $errs[self::FIELD_CUSTODIAN] = []; + } + $errs[self::FIELD_CUSTODIAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATES_TO])) { + $v = $this->getRelatesTo(); + foreach($validationRules[self::FIELD_RELATES_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_RELATES_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATES_TO])) { + $errs[self::FIELD_RELATES_TO] = []; + } + $errs[self::FIELD_RELATES_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECTION])) { + $v = $this->getSection(); + foreach($validationRules[self::FIELD_SECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_SECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECTION])) { + $errs[self::FIELD_SECTION] = []; + } + $errs[self::FIELD_SECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConceptMap.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConceptMap.php index d7486aac38..64dd401d88 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConceptMap.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConceptMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -412,7 +412,7 @@ class FHIRConceptMap extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type ConceptMap * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMap Constructor @@ -1824,12 +1824,471 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_CANONICAL])) { + $v = $this->getSourceCanonical(); + foreach($validationRules[self::FIELD_SOURCE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_SOURCE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_CANONICAL])) { + $errs[self::FIELD_SOURCE_CANONICAL] = []; + } + $errs[self::FIELD_SOURCE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_URI])) { + $v = $this->getSourceUri(); + foreach($validationRules[self::FIELD_SOURCE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_SOURCE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_URI])) { + $errs[self::FIELD_SOURCE_URI] = []; + } + $errs[self::FIELD_SOURCE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_CANONICAL])) { + $v = $this->getTargetCanonical(); + foreach($validationRules[self::FIELD_TARGET_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_TARGET_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_CANONICAL])) { + $errs[self::FIELD_TARGET_CANONICAL] = []; + } + $errs[self::FIELD_TARGET_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_URI])) { + $v = $this->getTargetUri(); + foreach($validationRules[self::FIELD_TARGET_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_TARGET_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_URI])) { + $errs[self::FIELD_TARGET_URI] = []; + } + $errs[self::FIELD_TARGET_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCondition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCondition.php index 694a30edf2..357b037a12 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -445,7 +445,7 @@ class FHIRCondition extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCondition Constructor @@ -1851,12 +1851,560 @@ public function setVerificationStatus(FHIRCodeableConcept $verificationStatus = } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbatementAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsserter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClinicalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvidence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVIDENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOnsetAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecordedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getVerificationStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERIFICATION_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_AGE])) { + $v = $this->getAbatementAge(); + foreach($validationRules[self::FIELD_ABATEMENT_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_AGE])) { + $errs[self::FIELD_ABATEMENT_AGE] = []; + } + $errs[self::FIELD_ABATEMENT_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_DATE_TIME])) { + $v = $this->getAbatementDateTime(); + foreach($validationRules[self::FIELD_ABATEMENT_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_DATE_TIME])) { + $errs[self::FIELD_ABATEMENT_DATE_TIME] = []; + } + $errs[self::FIELD_ABATEMENT_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_PERIOD])) { + $v = $this->getAbatementPeriod(); + foreach($validationRules[self::FIELD_ABATEMENT_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_PERIOD])) { + $errs[self::FIELD_ABATEMENT_PERIOD] = []; + } + $errs[self::FIELD_ABATEMENT_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_RANGE])) { + $v = $this->getAbatementRange(); + foreach($validationRules[self::FIELD_ABATEMENT_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_RANGE])) { + $errs[self::FIELD_ABATEMENT_RANGE] = []; + } + $errs[self::FIELD_ABATEMENT_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_STRING])) { + $v = $this->getAbatementString(); + foreach($validationRules[self::FIELD_ABATEMENT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_STRING])) { + $errs[self::FIELD_ABATEMENT_STRING] = []; + } + $errs[self::FIELD_ABATEMENT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSERTER])) { + $v = $this->getAsserter(); + foreach($validationRules[self::FIELD_ASSERTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ASSERTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERTER])) { + $errs[self::FIELD_ASSERTER] = []; + } + $errs[self::FIELD_ASSERTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLINICAL_STATUS])) { + $v = $this->getClinicalStatus(); + foreach($validationRules[self::FIELD_CLINICAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CLINICAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLINICAL_STATUS])) { + $errs[self::FIELD_CLINICAL_STATUS] = []; + } + $errs[self::FIELD_CLINICAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVIDENCE])) { + $v = $this->getEvidence(); + foreach($validationRules[self::FIELD_EVIDENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_EVIDENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVIDENCE])) { + $errs[self::FIELD_EVIDENCE] = []; + } + $errs[self::FIELD_EVIDENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_AGE])) { + $v = $this->getOnsetAge(); + foreach($validationRules[self::FIELD_ONSET_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_AGE])) { + $errs[self::FIELD_ONSET_AGE] = []; + } + $errs[self::FIELD_ONSET_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_DATE_TIME])) { + $v = $this->getOnsetDateTime(); + foreach($validationRules[self::FIELD_ONSET_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_DATE_TIME])) { + $errs[self::FIELD_ONSET_DATE_TIME] = []; + } + $errs[self::FIELD_ONSET_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_PERIOD])) { + $v = $this->getOnsetPeriod(); + foreach($validationRules[self::FIELD_ONSET_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_PERIOD])) { + $errs[self::FIELD_ONSET_PERIOD] = []; + } + $errs[self::FIELD_ONSET_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_RANGE])) { + $v = $this->getOnsetRange(); + foreach($validationRules[self::FIELD_ONSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_RANGE])) { + $errs[self::FIELD_ONSET_RANGE] = []; + } + $errs[self::FIELD_ONSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_STRING])) { + $v = $this->getOnsetString(); + foreach($validationRules[self::FIELD_ONSET_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_STRING])) { + $errs[self::FIELD_ONSET_STRING] = []; + } + $errs[self::FIELD_ONSET_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED_DATE])) { + $v = $this->getRecordedDate(); + foreach($validationRules[self::FIELD_RECORDED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_RECORDED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED_DATE])) { + $errs[self::FIELD_RECORDED_DATE] = []; + } + $errs[self::FIELD_RECORDED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STAGE])) { + $v = $this->getStage(); + foreach($validationRules[self::FIELD_STAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_STAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STAGE])) { + $errs[self::FIELD_STAGE] = []; + } + $errs[self::FIELD_STAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERIFICATION_STATUS])) { + $v = $this->getVerificationStatus(); + foreach($validationRules[self::FIELD_VERIFICATION_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_VERIFICATION_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERIFICATION_STATUS])) { + $errs[self::FIELD_VERIFICATION_STATUS] = []; + } + $errs[self::FIELD_VERIFICATION_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConsent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConsent.php index bd4554c4e8..a7b6f20b92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConsent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConsent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -288,7 +288,7 @@ class FHIRConsent extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Consent * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CATEGORY => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1172,12 +1172,373 @@ public function setVerification(array $verification = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOrganization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ORGANIZATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POLICY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPolicyRule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POLICY_RULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvision())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVISION] = $fieldErrs; + } + } + if (null !== ($v = $this->getScope())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCOPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVerification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VERIFICATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY])) { + $v = $this->getPolicy(); + foreach($validationRules[self::FIELD_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY])) { + $errs[self::FIELD_POLICY] = []; + } + $errs[self::FIELD_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY_RULE])) { + $v = $this->getPolicyRule(); + foreach($validationRules[self::FIELD_POLICY_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_POLICY_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY_RULE])) { + $errs[self::FIELD_POLICY_RULE] = []; + } + $errs[self::FIELD_POLICY_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVISION])) { + $v = $this->getProvision(); + foreach($validationRules[self::FIELD_PROVISION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_PROVISION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVISION])) { + $errs[self::FIELD_PROVISION] = []; + } + $errs[self::FIELD_PROVISION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCOPE])) { + $v = $this->getScope(); + foreach($validationRules[self::FIELD_SCOPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_SCOPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCOPE])) { + $errs[self::FIELD_SCOPE] = []; + } + $errs[self::FIELD_SCOPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ATTACHMENT])) { + $v = $this->getSourceAttachment(); + foreach($validationRules[self::FIELD_SOURCE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_SOURCE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ATTACHMENT])) { + $errs[self::FIELD_SOURCE_ATTACHMENT] = []; + } + $errs[self::FIELD_SOURCE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_REFERENCE])) { + $v = $this->getSourceReference(); + foreach($validationRules[self::FIELD_SOURCE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_SOURCE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_REFERENCE])) { + $errs[self::FIELD_SOURCE_REFERENCE] = []; + } + $errs[self::FIELD_SOURCE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERIFICATION])) { + $v = $this->getVerification(); + foreach($validationRules[self::FIELD_VERIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_VERIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERIFICATION])) { + $errs[self::FIELD_VERIFICATION] = []; + } + $errs[self::FIELD_VERIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRContract.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRContract.php index e0a8c57d96..a7c89d9e57 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRContract.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRContract.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -590,7 +590,7 @@ class FHIRContract extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Contract * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContract Constructor @@ -2803,12 +2803,746 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAlias())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALIAS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getApplies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPLIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthority())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHORITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContentDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentDerivative())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_DERIVATIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDomain())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOMAIN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExpirationType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRATION_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFriendly())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FRIENDLY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInstantiatesCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getInstantiatesUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANTIATES_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLegal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LEGAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLegalState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LEGAL_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLegallyBindingAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LEGALLY_BINDING_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLegallyBindingReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LEGALLY_BINDING_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelevantHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELEVANT_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getScope())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCOPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSigner())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SIGNER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubtitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTerm())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TERM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTopicCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOPIC_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTopicReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOPIC_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPLIES])) { + $v = $this->getApplies(); + foreach($validationRules[self::FIELD_APPLIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_APPLIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES])) { + $errs[self::FIELD_APPLIES] = []; + } + $errs[self::FIELD_APPLIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_DEFINITION])) { + $v = $this->getContentDefinition(); + foreach($validationRules[self::FIELD_CONTENT_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_CONTENT_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_DEFINITION])) { + $errs[self::FIELD_CONTENT_DEFINITION] = []; + } + $errs[self::FIELD_CONTENT_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_DERIVATIVE])) { + $v = $this->getContentDerivative(); + foreach($validationRules[self::FIELD_CONTENT_DERIVATIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_CONTENT_DERIVATIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_DERIVATIVE])) { + $errs[self::FIELD_CONTENT_DERIVATIVE] = []; + } + $errs[self::FIELD_CONTENT_DERIVATIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOMAIN])) { + $v = $this->getDomain(); + foreach($validationRules[self::FIELD_DOMAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_DOMAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOMAIN])) { + $errs[self::FIELD_DOMAIN] = []; + } + $errs[self::FIELD_DOMAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPIRATION_TYPE])) { + $v = $this->getExpirationType(); + foreach($validationRules[self::FIELD_EXPIRATION_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_EXPIRATION_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRATION_TYPE])) { + $errs[self::FIELD_EXPIRATION_TYPE] = []; + } + $errs[self::FIELD_EXPIRATION_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FRIENDLY])) { + $v = $this->getFriendly(); + foreach($validationRules[self::FIELD_FRIENDLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_FRIENDLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRIENDLY])) { + $errs[self::FIELD_FRIENDLY] = []; + } + $errs[self::FIELD_FRIENDLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEGAL])) { + $v = $this->getLegal(); + foreach($validationRules[self::FIELD_LEGAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_LEGAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEGAL])) { + $errs[self::FIELD_LEGAL] = []; + } + $errs[self::FIELD_LEGAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEGAL_STATE])) { + $v = $this->getLegalState(); + foreach($validationRules[self::FIELD_LEGAL_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_LEGAL_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEGAL_STATE])) { + $errs[self::FIELD_LEGAL_STATE] = []; + } + $errs[self::FIELD_LEGAL_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEGALLY_BINDING_ATTACHMENT])) { + $v = $this->getLegallyBindingAttachment(); + foreach($validationRules[self::FIELD_LEGALLY_BINDING_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_LEGALLY_BINDING_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEGALLY_BINDING_ATTACHMENT])) { + $errs[self::FIELD_LEGALLY_BINDING_ATTACHMENT] = []; + } + $errs[self::FIELD_LEGALLY_BINDING_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEGALLY_BINDING_REFERENCE])) { + $v = $this->getLegallyBindingReference(); + foreach($validationRules[self::FIELD_LEGALLY_BINDING_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_LEGALLY_BINDING_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEGALLY_BINDING_REFERENCE])) { + $errs[self::FIELD_LEGALLY_BINDING_REFERENCE] = []; + } + $errs[self::FIELD_LEGALLY_BINDING_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEVANT_HISTORY])) { + $v = $this->getRelevantHistory(); + foreach($validationRules[self::FIELD_RELEVANT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_RELEVANT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEVANT_HISTORY])) { + $errs[self::FIELD_RELEVANT_HISTORY] = []; + } + $errs[self::FIELD_RELEVANT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCOPE])) { + $v = $this->getScope(); + foreach($validationRules[self::FIELD_SCOPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SCOPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCOPE])) { + $errs[self::FIELD_SCOPE] = []; + } + $errs[self::FIELD_SCOPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNER])) { + $v = $this->getSigner(); + foreach($validationRules[self::FIELD_SIGNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SIGNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNER])) { + $errs[self::FIELD_SIGNER] = []; + } + $errs[self::FIELD_SIGNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTITLE])) { + $v = $this->getSubtitle(); + foreach($validationRules[self::FIELD_SUBTITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SUBTITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTITLE])) { + $errs[self::FIELD_SUBTITLE] = []; + } + $errs[self::FIELD_SUBTITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TERM])) { + $v = $this->getTerm(); + foreach($validationRules[self::FIELD_TERM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_TERM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TERM])) { + $errs[self::FIELD_TERM] = []; + } + $errs[self::FIELD_TERM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC_CODEABLE_CONCEPT])) { + $v = $this->getTopicCodeableConcept(); + foreach($validationRules[self::FIELD_TOPIC_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_TOPIC_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC_CODEABLE_CONCEPT])) { + $errs[self::FIELD_TOPIC_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_TOPIC_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC_REFERENCE])) { + $v = $this->getTopicReference(); + foreach($validationRules[self::FIELD_TOPIC_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_TOPIC_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC_REFERENCE])) { + $errs[self::FIELD_TOPIC_REFERENCE] = []; + } + $errs[self::FIELD_TOPIC_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverage.php index f157791efa..e6d0e1ef38 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -320,7 +320,7 @@ class FHIRCoverage extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Coverage * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PAYOR => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1350,12 +1350,422 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBeneficiary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BENEFICIARY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getClass())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CLASS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContract())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCostToBeneficiary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COST_TO_BENEFICIARY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDependent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEPENDENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPayor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPolicyHolder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POLICY_HOLDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubrogation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBROGATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubscriber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSCRIBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubscriberId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSCRIBER_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BENEFICIARY])) { + $v = $this->getBeneficiary(); + foreach($validationRules[self::FIELD_BENEFICIARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_BENEFICIARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFICIARY])) { + $errs[self::FIELD_BENEFICIARY] = []; + } + $errs[self::FIELD_BENEFICIARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRACT])) { + $v = $this->getContract(); + foreach($validationRules[self::FIELD_CONTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_CONTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRACT])) { + $errs[self::FIELD_CONTRACT] = []; + } + $errs[self::FIELD_CONTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COST_TO_BENEFICIARY])) { + $v = $this->getCostToBeneficiary(); + foreach($validationRules[self::FIELD_COST_TO_BENEFICIARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_COST_TO_BENEFICIARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COST_TO_BENEFICIARY])) { + $errs[self::FIELD_COST_TO_BENEFICIARY] = []; + } + $errs[self::FIELD_COST_TO_BENEFICIARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDENT])) { + $v = $this->getDependent(); + foreach($validationRules[self::FIELD_DEPENDENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_DEPENDENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDENT])) { + $errs[self::FIELD_DEPENDENT] = []; + } + $errs[self::FIELD_DEPENDENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDER])) { + $v = $this->getOrder(); + foreach($validationRules[self::FIELD_ORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_ORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDER])) { + $errs[self::FIELD_ORDER] = []; + } + $errs[self::FIELD_ORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYOR])) { + $v = $this->getPayor(); + foreach($validationRules[self::FIELD_PAYOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_PAYOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYOR])) { + $errs[self::FIELD_PAYOR] = []; + } + $errs[self::FIELD_PAYOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY_HOLDER])) { + $v = $this->getPolicyHolder(); + foreach($validationRules[self::FIELD_POLICY_HOLDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_POLICY_HOLDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY_HOLDER])) { + $errs[self::FIELD_POLICY_HOLDER] = []; + } + $errs[self::FIELD_POLICY_HOLDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBROGATION])) { + $v = $this->getSubrogation(); + foreach($validationRules[self::FIELD_SUBROGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_SUBROGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBROGATION])) { + $errs[self::FIELD_SUBROGATION] = []; + } + $errs[self::FIELD_SUBROGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSCRIBER])) { + $v = $this->getSubscriber(); + foreach($validationRules[self::FIELD_SUBSCRIBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_SUBSCRIBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSCRIBER])) { + $errs[self::FIELD_SUBSCRIBER] = []; + } + $errs[self::FIELD_SUBSCRIBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSCRIBER_ID])) { + $v = $this->getSubscriberId(); + foreach($validationRules[self::FIELD_SUBSCRIBER_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_SUBSCRIBER_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSCRIBER_ID])) { + $errs[self::FIELD_SUBSCRIBER_ID] = []; + } + $errs[self::FIELD_SUBSCRIBER_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequest.php index 35b01ce889..d81dfe6b1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -306,7 +306,7 @@ class FHIRCoverageEligibilityRequest extends FHIRDomainResource implements PHPFH * Validation map for fields in type CoverageEligibilityRequest * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PURPOSE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1238,12 +1238,388 @@ public function setSupportingInfo(array $supportingInfo = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFacility())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPurpose())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getServicedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY])) { + $v = $this->getFacility(); + foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_FACILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY])) { + $errs[self::FIELD_FACILITY] = []; + } + $errs[self::FIELD_FACILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_DATE])) { + $v = $this->getServicedDate(); + foreach($validationRules[self::FIELD_SERVICED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_SERVICED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_DATE])) { + $errs[self::FIELD_SERVICED_DATE] = []; + } + $errs[self::FIELD_SERVICED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_PERIOD])) { + $v = $this->getServicedPeriod(); + foreach($validationRules[self::FIELD_SERVICED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_SERVICED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_PERIOD])) { + $errs[self::FIELD_SERVICED_PERIOD] = []; + } + $errs[self::FIELD_SERVICED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_REQUEST, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponse.php index fe6fc0693e..bc409fb775 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -308,7 +308,7 @@ class FHIRCoverageEligibilityResponse extends FHIRDomainResource implements PHPF * Validation map for fields in type CoverageEligibilityResponse * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PURPOSE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1272,12 +1272,403 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getError())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ERROR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreAuthRef())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRE_AUTH_REF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPurpose())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ERROR])) { + $v = $this->getError(); + foreach($validationRules[self::FIELD_ERROR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_ERROR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ERROR])) { + $errs[self::FIELD_ERROR] = []; + } + $errs[self::FIELD_ERROR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF])) { + $v = $this->getPreAuthRef(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_PRE_AUTH_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF])) { + $errs[self::FIELD_PRE_AUTH_REF] = []; + } + $errs[self::FIELD_PRE_AUTH_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTOR])) { + $v = $this->getRequestor(); + foreach($validationRules[self::FIELD_REQUESTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_REQUESTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTOR])) { + $errs[self::FIELD_REQUESTOR] = []; + } + $errs[self::FIELD_REQUESTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_DATE])) { + $v = $this->getServicedDate(); + foreach($validationRules[self::FIELD_SERVICED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_SERVICED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_DATE])) { + $errs[self::FIELD_SERVICED_DATE] = []; + } + $errs[self::FIELD_SERVICED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_PERIOD])) { + $v = $this->getServicedPeriod(); + foreach($validationRules[self::FIELD_SERVICED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_SERVICED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_PERIOD])) { + $errs[self::FIELD_SERVICED_PERIOD] = []; + } + $errs[self::FIELD_SERVICED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_ELIGIBILITY_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php index daa0129c66..3068cbd004 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -273,7 +273,7 @@ class FHIRDetectedIssue extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type DetectedIssue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDetectedIssue Constructor @@ -1087,12 +1087,352 @@ public function setStatus(FHIRObservationStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvidence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVIDENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifiedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifiedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIED_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImplicated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPLICATED, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMitigation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MITIGATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVIDENCE])) { + $v = $this->getEvidence(); + foreach($validationRules[self::FIELD_EVIDENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_EVIDENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVIDENCE])) { + $errs[self::FIELD_EVIDENCE] = []; + } + $errs[self::FIELD_EVIDENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIED_DATE_TIME])) { + $v = $this->getIdentifiedDateTime(); + foreach($validationRules[self::FIELD_IDENTIFIED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_IDENTIFIED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIED_DATE_TIME])) { + $errs[self::FIELD_IDENTIFIED_DATE_TIME] = []; + } + $errs[self::FIELD_IDENTIFIED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIED_PERIOD])) { + $v = $this->getIdentifiedPeriod(); + foreach($validationRules[self::FIELD_IDENTIFIED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_IDENTIFIED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIED_PERIOD])) { + $errs[self::FIELD_IDENTIFIED_PERIOD] = []; + } + $errs[self::FIELD_IDENTIFIED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICATED])) { + $v = $this->getImplicated(); + foreach($validationRules[self::FIELD_IMPLICATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_IMPLICATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICATED])) { + $errs[self::FIELD_IMPLICATED] = []; + } + $errs[self::FIELD_IMPLICATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MITIGATION])) { + $v = $this->getMitigation(); + foreach($validationRules[self::FIELD_MITIGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_MITIGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MITIGATION])) { + $errs[self::FIELD_MITIGATION] = []; + } + $errs[self::FIELD_MITIGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDevice.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDevice.php index 893752aee6..736e6d3122 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -450,7 +450,7 @@ class FHIRDevice extends FHIRDomainResource implements PHPFHIRContainedTypeInter * Validation map for fields in type Device * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDevice Constructor @@ -2132,12 +2132,585 @@ public function setVersion(array $version = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDeviceName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEVICE_NAME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDistinctIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISTINCT_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpirationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRATION_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufactureDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getModelNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODEL_NUMBER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOwner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getParent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProperty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROPERTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSafety())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SAFETY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSerialNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIAL_NUMBER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecialization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALIZATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStatusReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STATUS_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUdiCarrier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI_CARRIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVersion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VERSION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE_NAME])) { + $v = $this->getDeviceName(); + foreach($validationRules[self::FIELD_DEVICE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_DEVICE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE_NAME])) { + $errs[self::FIELD_DEVICE_NAME] = []; + } + $errs[self::FIELD_DEVICE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISTINCT_IDENTIFIER])) { + $v = $this->getDistinctIdentifier(); + foreach($validationRules[self::FIELD_DISTINCT_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_DISTINCT_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISTINCT_IDENTIFIER])) { + $errs[self::FIELD_DISTINCT_IDENTIFIER] = []; + } + $errs[self::FIELD_DISTINCT_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPIRATION_DATE])) { + $v = $this->getExpirationDate(); + foreach($validationRules[self::FIELD_EXPIRATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_EXPIRATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRATION_DATE])) { + $errs[self::FIELD_EXPIRATION_DATE] = []; + } + $errs[self::FIELD_EXPIRATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURE_DATE])) { + $v = $this->getManufactureDate(); + foreach($validationRules[self::FIELD_MANUFACTURE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MANUFACTURE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURE_DATE])) { + $errs[self::FIELD_MANUFACTURE_DATE] = []; + } + $errs[self::FIELD_MANUFACTURE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODEL_NUMBER])) { + $v = $this->getModelNumber(); + foreach($validationRules[self::FIELD_MODEL_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MODEL_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODEL_NUMBER])) { + $errs[self::FIELD_MODEL_NUMBER] = []; + } + $errs[self::FIELD_MODEL_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNER])) { + $v = $this->getOwner(); + foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_OWNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNER])) { + $errs[self::FIELD_OWNER] = []; + } + $errs[self::FIELD_OWNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_NUMBER])) { + $v = $this->getPartNumber(); + foreach($validationRules[self::FIELD_PART_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_PART_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_NUMBER])) { + $errs[self::FIELD_PART_NUMBER] = []; + } + $errs[self::FIELD_PART_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SAFETY])) { + $v = $this->getSafety(); + foreach($validationRules[self::FIELD_SAFETY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_SAFETY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SAFETY])) { + $errs[self::FIELD_SAFETY] = []; + } + $errs[self::FIELD_SAFETY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIAL_NUMBER])) { + $v = $this->getSerialNumber(); + foreach($validationRules[self::FIELD_SERIAL_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_SERIAL_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIAL_NUMBER])) { + $errs[self::FIELD_SERIAL_NUMBER] = []; + } + $errs[self::FIELD_SERIAL_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALIZATION])) { + $v = $this->getSpecialization(); + foreach($validationRules[self::FIELD_SPECIALIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_SPECIALIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALIZATION])) { + $errs[self::FIELD_SPECIALIZATION] = []; + } + $errs[self::FIELD_SPECIALIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI_CARRIER])) { + $v = $this->getUdiCarrier(); + foreach($validationRules[self::FIELD_UDI_CARRIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_UDI_CARRIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI_CARRIER])) { + $errs[self::FIELD_UDI_CARRIER] = []; + } + $errs[self::FIELD_UDI_CARRIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceDefinition.php index 473694cba6..82cdab84a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -400,7 +400,7 @@ class FHIRDeviceDefinition extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type DeviceDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceDefinition Constructor @@ -1946,12 +1946,540 @@ public function setVersion(array $version = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCapability())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CAPABILITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDeviceName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEVICE_NAME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLanguageCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LANGUAGE_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManufacturerReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturerString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMaterial())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MATERIAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getModelNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODEL_NUMBER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOnlineInformation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONLINE_INFORMATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOwner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getParentDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARENT_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPhysicalCharacteristics())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHYSICAL_CHARACTERISTICS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProperty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROPERTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSafety())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SAFETY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getShelfLifeStorage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SHELF_LIFE_STORAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALIZATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUdiDeviceIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI_DEVICE_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVersion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VERSION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CAPABILITY])) { + $v = $this->getCapability(); + foreach($validationRules[self::FIELD_CAPABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_CAPABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPABILITY])) { + $errs[self::FIELD_CAPABILITY] = []; + } + $errs[self::FIELD_CAPABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE_NAME])) { + $v = $this->getDeviceName(); + foreach($validationRules[self::FIELD_DEVICE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_DEVICE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE_NAME])) { + $errs[self::FIELD_DEVICE_NAME] = []; + } + $errs[self::FIELD_DEVICE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE_CODE])) { + $v = $this->getLanguageCode(); + foreach($validationRules[self::FIELD_LANGUAGE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_LANGUAGE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE_CODE])) { + $errs[self::FIELD_LANGUAGE_CODE] = []; + } + $errs[self::FIELD_LANGUAGE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER_REFERENCE])) { + $v = $this->getManufacturerReference(); + foreach($validationRules[self::FIELD_MANUFACTURER_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_MANUFACTURER_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER_REFERENCE])) { + $errs[self::FIELD_MANUFACTURER_REFERENCE] = []; + } + $errs[self::FIELD_MANUFACTURER_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER_STRING])) { + $v = $this->getManufacturerString(); + foreach($validationRules[self::FIELD_MANUFACTURER_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_MANUFACTURER_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER_STRING])) { + $errs[self::FIELD_MANUFACTURER_STRING] = []; + } + $errs[self::FIELD_MANUFACTURER_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MATERIAL])) { + $v = $this->getMaterial(); + foreach($validationRules[self::FIELD_MATERIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_MATERIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MATERIAL])) { + $errs[self::FIELD_MATERIAL] = []; + } + $errs[self::FIELD_MATERIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODEL_NUMBER])) { + $v = $this->getModelNumber(); + foreach($validationRules[self::FIELD_MODEL_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_MODEL_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODEL_NUMBER])) { + $errs[self::FIELD_MODEL_NUMBER] = []; + } + $errs[self::FIELD_MODEL_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONLINE_INFORMATION])) { + $v = $this->getOnlineInformation(); + foreach($validationRules[self::FIELD_ONLINE_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_ONLINE_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONLINE_INFORMATION])) { + $errs[self::FIELD_ONLINE_INFORMATION] = []; + } + $errs[self::FIELD_ONLINE_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNER])) { + $v = $this->getOwner(); + foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_OWNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNER])) { + $errs[self::FIELD_OWNER] = []; + } + $errs[self::FIELD_OWNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT_DEVICE])) { + $v = $this->getParentDevice(); + foreach($validationRules[self::FIELD_PARENT_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_PARENT_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT_DEVICE])) { + $errs[self::FIELD_PARENT_DEVICE] = []; + } + $errs[self::FIELD_PARENT_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHYSICAL_CHARACTERISTICS])) { + $v = $this->getPhysicalCharacteristics(); + foreach($validationRules[self::FIELD_PHYSICAL_CHARACTERISTICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_PHYSICAL_CHARACTERISTICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHYSICAL_CHARACTERISTICS])) { + $errs[self::FIELD_PHYSICAL_CHARACTERISTICS] = []; + } + $errs[self::FIELD_PHYSICAL_CHARACTERISTICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SAFETY])) { + $v = $this->getSafety(); + foreach($validationRules[self::FIELD_SAFETY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_SAFETY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SAFETY])) { + $errs[self::FIELD_SAFETY] = []; + } + $errs[self::FIELD_SAFETY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHELF_LIFE_STORAGE])) { + $v = $this->getShelfLifeStorage(); + foreach($validationRules[self::FIELD_SHELF_LIFE_STORAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_SHELF_LIFE_STORAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHELF_LIFE_STORAGE])) { + $errs[self::FIELD_SHELF_LIFE_STORAGE] = []; + } + $errs[self::FIELD_SHELF_LIFE_STORAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALIZATION])) { + $v = $this->getSpecialization(); + foreach($validationRules[self::FIELD_SPECIALIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_SPECIALIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALIZATION])) { + $errs[self::FIELD_SPECIALIZATION] = []; + } + $errs[self::FIELD_SPECIALIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI_DEVICE_IDENTIFIER])) { + $v = $this->getUdiDeviceIdentifier(); + foreach($validationRules[self::FIELD_UDI_DEVICE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_UDI_DEVICE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI_DEVICE_IDENTIFIER])) { + $errs[self::FIELD_UDI_DEVICE_IDENTIFIER] = []; + } + $errs[self::FIELD_UDI_DEVICE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php index fd1cb87937..dae3370e82 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -242,7 +242,7 @@ class FHIRDeviceMetric extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type DeviceMetric * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetric Constructor @@ -834,12 +834,297 @@ public function setUnit(FHIRCodeableConcept $unit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCalibration())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CALIBRATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getColor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMeasurementPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASUREMENT_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATIONAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getParent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CALIBRATION])) { + $v = $this->getCalibration(); + foreach($validationRules[self::FIELD_CALIBRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_CALIBRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CALIBRATION])) { + $errs[self::FIELD_CALIBRATION] = []; + } + $errs[self::FIELD_CALIBRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLOR])) { + $v = $this->getColor(); + foreach($validationRules[self::FIELD_COLOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_COLOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLOR])) { + $errs[self::FIELD_COLOR] = []; + } + $errs[self::FIELD_COLOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASUREMENT_PERIOD])) { + $v = $this->getMeasurementPeriod(); + foreach($validationRules[self::FIELD_MEASUREMENT_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_MEASUREMENT_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASUREMENT_PERIOD])) { + $errs[self::FIELD_MEASUREMENT_PERIOD] = []; + } + $errs[self::FIELD_MEASUREMENT_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATIONAL_STATUS])) { + $v = $this->getOperationalStatus(); + foreach($validationRules[self::FIELD_OPERATIONAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_OPERATIONAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATIONAL_STATUS])) { + $errs[self::FIELD_OPERATIONAL_STATUS] = []; + } + $errs[self::FIELD_OPERATIONAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php index 7c94523c0a..a12fad0908 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -466,7 +466,7 @@ class FHIRDeviceRequest extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type DeviceRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceRequest Constructor @@ -2192,12 +2192,606 @@ public function setSupportingInfo(array $supportingInfo = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCodeCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCodeReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_URI, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformerType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPriorRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRIOR_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelevantHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELEVANT_HISTORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE_CODEABLE_CONCEPT])) { + $v = $this->getCodeCodeableConcept(); + foreach($validationRules[self::FIELD_CODE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_CODE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_CODE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_CODE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE_REFERENCE])) { + $v = $this->getCodeReference(); + foreach($validationRules[self::FIELD_CODE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_CODE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_REFERENCE])) { + $errs[self::FIELD_CODE_REFERENCE] = []; + } + $errs[self::FIELD_CODE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER_TYPE])) { + $v = $this->getPerformerType(); + foreach($validationRules[self::FIELD_PERFORMER_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_PERFORMER_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER_TYPE])) { + $errs[self::FIELD_PERFORMER_TYPE] = []; + } + $errs[self::FIELD_PERFORMER_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIOR_REQUEST])) { + $v = $this->getPriorRequest(); + foreach($validationRules[self::FIELD_PRIOR_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_PRIOR_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIOR_REQUEST])) { + $errs[self::FIELD_PRIOR_REQUEST] = []; + } + $errs[self::FIELD_PRIOR_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEVANT_HISTORY])) { + $v = $this->getRelevantHistory(); + foreach($validationRules[self::FIELD_RELEVANT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_RELEVANT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEVANT_HISTORY])) { + $errs[self::FIELD_RELEVANT_HISTORY] = []; + } + $errs[self::FIELD_RELEVANT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php index 47361172fc..fa038d0462 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -298,7 +298,7 @@ class FHIRDeviceUseStatement extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type DeviceUseStatement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceUseStatement Constructor @@ -1235,12 +1235,390 @@ public function setTimingTiming(FHIRTiming $timingTiming = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDerivedFrom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DERIVED_FROM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecordedOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED_ON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DERIVED_FROM])) { + $v = $this->getDerivedFrom(); + foreach($validationRules[self::FIELD_DERIVED_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_DERIVED_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DERIVED_FROM])) { + $errs[self::FIELD_DERIVED_FROM] = []; + } + $errs[self::FIELD_DERIVED_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED_ON])) { + $v = $this->getRecordedOn(); + foreach($validationRules[self::FIELD_RECORDED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_RECORDED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED_ON])) { + $errs[self::FIELD_RECORDED_ON] = []; + } + $errs[self::FIELD_RECORDED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php index fd54e40e07..027b3cd788 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -364,7 +364,7 @@ class FHIRDiagnosticReport extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type DiagnosticReport * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReport Constructor @@ -1690,12 +1690,468 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getConclusion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCLUSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getConclusionCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCLUSION_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImagingStudy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGING_STUDY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMedia())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEDIA, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPresentedForm())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRESENTED_FORM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResult())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESULT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResultsInterpreter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESULTS_INTERPRETER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCLUSION])) { + $v = $this->getConclusion(); + foreach($validationRules[self::FIELD_CONCLUSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CONCLUSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCLUSION])) { + $errs[self::FIELD_CONCLUSION] = []; + } + $errs[self::FIELD_CONCLUSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCLUSION_CODE])) { + $v = $this->getConclusionCode(); + foreach($validationRules[self::FIELD_CONCLUSION_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CONCLUSION_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCLUSION_CODE])) { + $errs[self::FIELD_CONCLUSION_CODE] = []; + } + $errs[self::FIELD_CONCLUSION_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGING_STUDY])) { + $v = $this->getImagingStudy(); + foreach($validationRules[self::FIELD_IMAGING_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IMAGING_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGING_STUDY])) { + $errs[self::FIELD_IMAGING_STUDY] = []; + } + $errs[self::FIELD_IMAGING_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIA])) { + $v = $this->getMedia(); + foreach($validationRules[self::FIELD_MEDIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_MEDIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIA])) { + $errs[self::FIELD_MEDIA] = []; + } + $errs[self::FIELD_MEDIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESENTED_FORM])) { + $v = $this->getPresentedForm(); + foreach($validationRules[self::FIELD_PRESENTED_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_PRESENTED_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESENTED_FORM])) { + $errs[self::FIELD_PRESENTED_FORM] = []; + } + $errs[self::FIELD_PRESENTED_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULTS_INTERPRETER])) { + $v = $this->getResultsInterpreter(); + foreach($validationRules[self::FIELD_RESULTS_INTERPRETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_RESULTS_INTERPRETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULTS_INTERPRETER])) { + $errs[self::FIELD_RESULTS_INTERPRETER] = []; + } + $errs[self::FIELD_RESULTS_INTERPRETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php index 10f5e30f95..66abb75bbe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -259,7 +259,7 @@ class FHIRDocumentManifest extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type DocumentManifest * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CONTENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1064,12 +1064,337 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMasterIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MASTER_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MASTER_IDENTIFIER])) { + $v = $this->getMasterIdentifier(); + foreach($validationRules[self::FIELD_MASTER_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_MASTER_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MASTER_IDENTIFIER])) { + $errs[self::FIELD_MASTER_IDENTIFIER] = []; + } + $errs[self::FIELD_MASTER_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php index 57047ecf0f..fc397bc7e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -324,7 +324,7 @@ class FHIRDocumentReference extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type DocumentReference * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CONTENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1343,12 +1343,407 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthenticator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHENTICATOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCustodian())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CUSTODIAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOC_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMasterIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MASTER_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatesTo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATES_TO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHENTICATOR])) { + $v = $this->getAuthenticator(); + foreach($validationRules[self::FIELD_AUTHENTICATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_AUTHENTICATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHENTICATOR])) { + $errs[self::FIELD_AUTHENTICATOR] = []; + } + $errs[self::FIELD_AUTHENTICATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CUSTODIAN])) { + $v = $this->getCustodian(); + foreach($validationRules[self::FIELD_CUSTODIAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CUSTODIAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CUSTODIAN])) { + $errs[self::FIELD_CUSTODIAN] = []; + } + $errs[self::FIELD_CUSTODIAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOC_STATUS])) { + $v = $this->getDocStatus(); + foreach($validationRules[self::FIELD_DOC_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_DOC_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOC_STATUS])) { + $errs[self::FIELD_DOC_STATUS] = []; + } + $errs[self::FIELD_DOC_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MASTER_IDENTIFIER])) { + $v = $this->getMasterIdentifier(); + foreach($validationRules[self::FIELD_MASTER_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_MASTER_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MASTER_IDENTIFIER])) { + $errs[self::FIELD_MASTER_IDENTIFIER] = []; + } + $errs[self::FIELD_MASTER_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATES_TO])) { + $v = $this->getRelatesTo(); + foreach($validationRules[self::FIELD_RELATES_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_RELATES_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATES_TO])) { + $errs[self::FIELD_RELATES_TO] = []; + } + $errs[self::FIELD_RELATES_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesis.php index e6d7ffcdcf..a2522c8bb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -578,7 +578,7 @@ class FHIREffectEvidenceSynthesis extends FHIRDomainResource implements PHPFHIRC * Validation map for fields in type EffectEvidenceSynthesis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREffectEvidenceSynthesis Constructor @@ -2776,12 +2776,712 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCertainty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CERTAINTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEffectEstimate())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EFFECT_ESTIMATE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExposure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPOSURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExposureAlternative())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPOSURE_ALTERNATIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPopulation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POPULATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResultsByExposure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESULTS_BY_EXPOSURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSampleSize())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SAMPLE_SIZE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudyType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSynthesisType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYNTHESIS_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CERTAINTY])) { + $v = $this->getCertainty(); + foreach($validationRules[self::FIELD_CERTAINTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_CERTAINTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CERTAINTY])) { + $errs[self::FIELD_CERTAINTY] = []; + } + $errs[self::FIELD_CERTAINTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECT_ESTIMATE])) { + $v = $this->getEffectEstimate(); + foreach($validationRules[self::FIELD_EFFECT_ESTIMATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_EFFECT_ESTIMATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECT_ESTIMATE])) { + $errs[self::FIELD_EFFECT_ESTIMATE] = []; + } + $errs[self::FIELD_EFFECT_ESTIMATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE])) { + $v = $this->getExposure(); + foreach($validationRules[self::FIELD_EXPOSURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_EXPOSURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE])) { + $errs[self::FIELD_EXPOSURE] = []; + } + $errs[self::FIELD_EXPOSURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE_ALTERNATIVE])) { + $v = $this->getExposureAlternative(); + foreach($validationRules[self::FIELD_EXPOSURE_ALTERNATIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_EXPOSURE_ALTERNATIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE_ALTERNATIVE])) { + $errs[self::FIELD_EXPOSURE_ALTERNATIVE] = []; + } + $errs[self::FIELD_EXPOSURE_ALTERNATIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULTS_BY_EXPOSURE])) { + $v = $this->getResultsByExposure(); + foreach($validationRules[self::FIELD_RESULTS_BY_EXPOSURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_RESULTS_BY_EXPOSURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULTS_BY_EXPOSURE])) { + $errs[self::FIELD_RESULTS_BY_EXPOSURE] = []; + } + $errs[self::FIELD_RESULTS_BY_EXPOSURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SAMPLE_SIZE])) { + $v = $this->getSampleSize(); + foreach($validationRules[self::FIELD_SAMPLE_SIZE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_SAMPLE_SIZE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SAMPLE_SIZE])) { + $errs[self::FIELD_SAMPLE_SIZE] = []; + } + $errs[self::FIELD_SAMPLE_SIZE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY_TYPE])) { + $v = $this->getStudyType(); + foreach($validationRules[self::FIELD_STUDY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_STUDY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY_TYPE])) { + $errs[self::FIELD_STUDY_TYPE] = []; + } + $errs[self::FIELD_STUDY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYNTHESIS_TYPE])) { + $v = $this->getSynthesisType(); + foreach($validationRules[self::FIELD_SYNTHESIS_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_SYNTHESIS_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYNTHESIS_TYPE])) { + $errs[self::FIELD_SYNTHESIS_TYPE] = []; + } + $errs[self::FIELD_SYNTHESIS_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EFFECT_EVIDENCE_SYNTHESIS, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREncounter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREncounter.php index 212eba1937..8acb0bfb60 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREncounter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREncounter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -402,7 +402,7 @@ class FHIREncounter extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Encounter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounter Constructor @@ -1865,12 +1865,540 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAccount())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACCOUNT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAppointment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_APPOINTMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getClassHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CLASS_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEpisodeOfCare())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EPISODE_OF_CARE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getHospitalization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HOSPITALIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LENGTH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getServiceProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getServiceType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStatusHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STATUS_HISTORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACCOUNT])) { + $v = $this->getAccount(); + foreach($validationRules[self::FIELD_ACCOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_ACCOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCOUNT])) { + $errs[self::FIELD_ACCOUNT] = []; + } + $errs[self::FIELD_ACCOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT])) { + $v = $this->getAppointment(); + foreach($validationRules[self::FIELD_APPOINTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_APPOINTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT])) { + $errs[self::FIELD_APPOINTMENT] = []; + } + $errs[self::FIELD_APPOINTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS_HISTORY])) { + $v = $this->getClassHistory(); + foreach($validationRules[self::FIELD_CLASS_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_CLASS_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS_HISTORY])) { + $errs[self::FIELD_CLASS_HISTORY] = []; + } + $errs[self::FIELD_CLASS_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EPISODE_OF_CARE])) { + $v = $this->getEpisodeOfCare(); + foreach($validationRules[self::FIELD_EPISODE_OF_CARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_EPISODE_OF_CARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EPISODE_OF_CARE])) { + $errs[self::FIELD_EPISODE_OF_CARE] = []; + } + $errs[self::FIELD_EPISODE_OF_CARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HOSPITALIZATION])) { + $v = $this->getHospitalization(); + foreach($validationRules[self::FIELD_HOSPITALIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_HOSPITALIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HOSPITALIZATION])) { + $errs[self::FIELD_HOSPITALIZATION] = []; + } + $errs[self::FIELD_HOSPITALIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LENGTH])) { + $v = $this->getLength(); + foreach($validationRules[self::FIELD_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LENGTH])) { + $errs[self::FIELD_LENGTH] = []; + } + $errs[self::FIELD_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_PROVIDER])) { + $v = $this->getServiceProvider(); + foreach($validationRules[self::FIELD_SERVICE_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_SERVICE_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_PROVIDER])) { + $errs[self::FIELD_SERVICE_PROVIDER] = []; + } + $errs[self::FIELD_SERVICE_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_TYPE])) { + $v = $this->getServiceType(); + foreach($validationRules[self::FIELD_SERVICE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_SERVICE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_TYPE])) { + $errs[self::FIELD_SERVICE_TYPE] = []; + } + $errs[self::FIELD_SERVICE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_HISTORY])) { + $v = $this->getStatusHistory(); + foreach($validationRules[self::FIELD_STATUS_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_STATUS_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_HISTORY])) { + $errs[self::FIELD_STATUS_HISTORY] = []; + } + $errs[self::FIELD_STATUS_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREndpoint.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREndpoint.php index 4337a4f823..ba2634ae8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREndpoint.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREndpoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -247,7 +247,7 @@ class FHIREndpoint extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Endpoint * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PAYLOAD_TYPE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1045,12 +1045,320 @@ public function setStatus(FHIREndpointStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getConnectionType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONNECTION_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getHeader())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HEADER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPayloadMimeType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYLOAD_MIME_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPayloadType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYLOAD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONNECTION_TYPE])) { + $v = $this->getConnectionType(); + foreach($validationRules[self::FIELD_CONNECTION_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_CONNECTION_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONNECTION_TYPE])) { + $errs[self::FIELD_CONNECTION_TYPE] = []; + } + $errs[self::FIELD_CONNECTION_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER])) { + $v = $this->getHeader(); + foreach($validationRules[self::FIELD_HEADER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_HEADER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER])) { + $errs[self::FIELD_HEADER] = []; + } + $errs[self::FIELD_HEADER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD_MIME_TYPE])) { + $v = $this->getPayloadMimeType(); + foreach($validationRules[self::FIELD_PAYLOAD_MIME_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_PAYLOAD_MIME_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD_MIME_TYPE])) { + $errs[self::FIELD_PAYLOAD_MIME_TYPE] = []; + } + $errs[self::FIELD_PAYLOAD_MIME_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD_TYPE])) { + $v = $this->getPayloadType(); + foreach($validationRules[self::FIELD_PAYLOAD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_PAYLOAD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD_TYPE])) { + $errs[self::FIELD_PAYLOAD_TYPE] = []; + } + $errs[self::FIELD_PAYLOAD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php index 76f62c4e02..5141b3f7a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -180,7 +180,7 @@ class FHIREnrollmentRequest extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type EnrollmentRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREnrollmentRequest Constructor @@ -572,12 +572,244 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCandidate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CANDIDATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CANDIDATE])) { + $v = $this->getCandidate(); + foreach($validationRules[self::FIELD_CANDIDATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_CANDIDATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CANDIDATE])) { + $errs[self::FIELD_CANDIDATE] = []; + } + $errs[self::FIELD_CANDIDATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php index 3f4dbcba10..d5997d8709 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -194,7 +194,7 @@ class FHIREnrollmentResponse extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type EnrollmentResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREnrollmentResponse Constructor @@ -659,12 +659,261 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php index 4002858b9d..b1cfe902d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -249,7 +249,7 @@ class FHIREpisodeOfCare extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type EpisodeOfCare * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCare Constructor @@ -1043,12 +1043,341 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAccount())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACCOUNT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCareManager())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARE_MANAGER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferralRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERRAL_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStatusHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STATUS_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTeam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEAM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACCOUNT])) { + $v = $this->getAccount(); + foreach($validationRules[self::FIELD_ACCOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_ACCOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCOUNT])) { + $errs[self::FIELD_ACCOUNT] = []; + } + $errs[self::FIELD_ACCOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_MANAGER])) { + $v = $this->getCareManager(); + foreach($validationRules[self::FIELD_CARE_MANAGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_CARE_MANAGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_MANAGER])) { + $errs[self::FIELD_CARE_MANAGER] = []; + } + $errs[self::FIELD_CARE_MANAGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL_REQUEST])) { + $v = $this->getReferralRequest(); + foreach($validationRules[self::FIELD_REFERRAL_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_REFERRAL_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL_REQUEST])) { + $errs[self::FIELD_REFERRAL_REQUEST] = []; + } + $errs[self::FIELD_REFERRAL_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_HISTORY])) { + $v = $this->getStatusHistory(); + foreach($validationRules[self::FIELD_STATUS_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_STATUS_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_HISTORY])) { + $errs[self::FIELD_STATUS_HISTORY] = []; + } + $errs[self::FIELD_STATUS_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEAM])) { + $v = $this->getTeam(); + foreach($validationRules[self::FIELD_TEAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_TEAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEAM])) { + $errs[self::FIELD_TEAM] = []; + } + $errs[self::FIELD_TEAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREventDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREventDefinition.php index 354b0cb99d..3e43090bc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREventDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREventDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -533,7 +533,7 @@ class FHIREventDefinition extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type EventDefinition * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_TRIGGER => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -2578,12 +2578,638 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTrigger())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TRIGGER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $v = $this->getSubjectCodeableConcept(); + foreach($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_SUBJECT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_REFERENCE])) { + $v = $this->getSubjectReference(); + foreach($validationRules[self::FIELD_SUBJECT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_SUBJECT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_REFERENCE])) { + $errs[self::FIELD_SUBJECT_REFERENCE] = []; + } + $errs[self::FIELD_SUBJECT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTITLE])) { + $v = $this->getSubtitle(); + foreach($validationRules[self::FIELD_SUBTITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_SUBTITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTITLE])) { + $errs[self::FIELD_SUBTITLE] = []; + } + $errs[self::FIELD_SUBTITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRIGGER])) { + $v = $this->getTrigger(); + foreach($validationRules[self::FIELD_TRIGGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_TRIGGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRIGGER])) { + $errs[self::FIELD_TRIGGER] = []; + } + $errs[self::FIELD_TRIGGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidence.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidence.php index 70af2a92ba..04ca22cd42 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -514,7 +514,7 @@ class FHIREvidence extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Evidence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREvidence Constructor @@ -2534,12 +2534,625 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExposureBackground())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPOSURE_BACKGROUND] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExposureVariant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXPOSURE_VARIANT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutcome())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTCOME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getShortTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SHORT_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE_BACKGROUND])) { + $v = $this->getExposureBackground(); + foreach($validationRules[self::FIELD_EXPOSURE_BACKGROUND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_EXPOSURE_BACKGROUND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE_BACKGROUND])) { + $errs[self::FIELD_EXPOSURE_BACKGROUND] = []; + } + $errs[self::FIELD_EXPOSURE_BACKGROUND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE_VARIANT])) { + $v = $this->getExposureVariant(); + foreach($validationRules[self::FIELD_EXPOSURE_VARIANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_EXPOSURE_VARIANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE_VARIANT])) { + $errs[self::FIELD_EXPOSURE_VARIANT] = []; + } + $errs[self::FIELD_EXPOSURE_VARIANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHORT_TITLE])) { + $v = $this->getShortTitle(); + foreach($validationRules[self::FIELD_SHORT_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_SHORT_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHORT_TITLE])) { + $errs[self::FIELD_SHORT_TITLE] = []; + } + $errs[self::FIELD_SHORT_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTITLE])) { + $v = $this->getSubtitle(); + foreach($validationRules[self::FIELD_SUBTITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_SUBTITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTITLE])) { + $errs[self::FIELD_SUBTITLE] = []; + } + $errs[self::FIELD_SUBTITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidenceVariable.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidenceVariable.php index 5341f9ee9e..15eb9790bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidenceVariable.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidenceVariable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -502,7 +502,7 @@ class FHIREvidenceVariable extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type EvidenceVariable * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CHARACTERISTIC => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -2465,12 +2465,606 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getShortTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SHORT_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC])) { + $v = $this->getCharacteristic(); + foreach($validationRules[self::FIELD_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC])) { + $errs[self::FIELD_CHARACTERISTIC] = []; + } + $errs[self::FIELD_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHORT_TITLE])) { + $v = $this->getShortTitle(); + foreach($validationRules[self::FIELD_SHORT_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_SHORT_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHORT_TITLE])) { + $errs[self::FIELD_SHORT_TITLE] = []; + } + $errs[self::FIELD_SHORT_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTITLE])) { + $v = $this->getSubtitle(); + foreach($validationRules[self::FIELD_SUBTITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_SUBTITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTITLE])) { + $errs[self::FIELD_SUBTITLE] = []; + } + $errs[self::FIELD_SUBTITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExampleScenario.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExampleScenario.php index b45faae4e7..660b92c17d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExampleScenario.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExampleScenario.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -352,7 +352,7 @@ class FHIRExampleScenario extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type ExampleScenario * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExampleScenario Constructor @@ -1646,12 +1646,428 @@ public function setWorkflow(array $workflow = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getActor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcess())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getWorkflow())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_WORKFLOW, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESS])) { + $v = $this->getProcess(); + foreach($validationRules[self::FIELD_PROCESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_PROCESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESS])) { + $errs[self::FIELD_PROCESS] = []; + } + $errs[self::FIELD_PROCESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WORKFLOW])) { + $v = $this->getWorkflow(); + foreach($validationRules[self::FIELD_WORKFLOW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO, self::FIELD_WORKFLOW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WORKFLOW])) { + $errs[self::FIELD_WORKFLOW] = []; + } + $errs[self::FIELD_WORKFLOW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php index 7f4ca17155..beb4026d67 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -669,7 +669,7 @@ class FHIRExplanationOfBenefit extends FHIRDomainResource implements PHPFHIRCont * Validation map for fields in type ExplanationOfBenefit * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INSURANCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -3089,12 +3089,884 @@ public function setUse(FHIRUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccident())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCIDENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBenefitBalance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BENEFIT_BALANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBenefitPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BENEFIT_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getBillablePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BILLABLE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareTeam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClaim())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFacility())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if (null !== ($v = $this->getFormCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFundsReserve())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNDS_RESERVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFundsReserveRequested())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNDS_RESERVE_REQUESTED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOriginalPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPreAuthRef())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRE_AUTH_REF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPreAuthRefPeriod())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRE_AUTH_REF_PERIOD, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrecedence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRECEDENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcedure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProcessNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESS_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferral())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTotal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOTAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCIDENT])) { + $v = $this->getAccident(); + foreach($validationRules[self::FIELD_ACCIDENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ACCIDENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCIDENT])) { + $errs[self::FIELD_ACCIDENT] = []; + } + $errs[self::FIELD_ACCIDENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADD_ITEM])) { + $v = $this->getAddItem(); + foreach($validationRules[self::FIELD_ADD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ADD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADD_ITEM])) { + $errs[self::FIELD_ADD_ITEM] = []; + } + $errs[self::FIELD_ADD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BENEFIT_BALANCE])) { + $v = $this->getBenefitBalance(); + foreach($validationRules[self::FIELD_BENEFIT_BALANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_BENEFIT_BALANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFIT_BALANCE])) { + $errs[self::FIELD_BENEFIT_BALANCE] = []; + } + $errs[self::FIELD_BENEFIT_BALANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BENEFIT_PERIOD])) { + $v = $this->getBenefitPeriod(); + foreach($validationRules[self::FIELD_BENEFIT_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_BENEFIT_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFIT_PERIOD])) { + $errs[self::FIELD_BENEFIT_PERIOD] = []; + } + $errs[self::FIELD_BENEFIT_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BILLABLE_PERIOD])) { + $v = $this->getBillablePeriod(); + foreach($validationRules[self::FIELD_BILLABLE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_BILLABLE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BILLABLE_PERIOD])) { + $errs[self::FIELD_BILLABLE_PERIOD] = []; + } + $errs[self::FIELD_BILLABLE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM])) { + $v = $this->getCareTeam(); + foreach($validationRules[self::FIELD_CARE_TEAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_CARE_TEAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM])) { + $errs[self::FIELD_CARE_TEAM] = []; + } + $errs[self::FIELD_CARE_TEAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLAIM])) { + $v = $this->getClaim(); + foreach($validationRules[self::FIELD_CLAIM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_CLAIM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM])) { + $errs[self::FIELD_CLAIM] = []; + } + $errs[self::FIELD_CLAIM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLAIM_RESPONSE])) { + $v = $this->getClaimResponse(); + foreach($validationRules[self::FIELD_CLAIM_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_CLAIM_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM_RESPONSE])) { + $errs[self::FIELD_CLAIM_RESPONSE] = []; + } + $errs[self::FIELD_CLAIM_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY])) { + $v = $this->getFacility(); + foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_FACILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY])) { + $errs[self::FIELD_FACILITY] = []; + } + $errs[self::FIELD_FACILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM_CODE])) { + $v = $this->getFormCode(); + foreach($validationRules[self::FIELD_FORM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_FORM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM_CODE])) { + $errs[self::FIELD_FORM_CODE] = []; + } + $errs[self::FIELD_FORM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNDS_RESERVE])) { + $v = $this->getFundsReserve(); + foreach($validationRules[self::FIELD_FUNDS_RESERVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_FUNDS_RESERVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNDS_RESERVE])) { + $errs[self::FIELD_FUNDS_RESERVE] = []; + } + $errs[self::FIELD_FUNDS_RESERVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNDS_RESERVE_REQUESTED])) { + $v = $this->getFundsReserveRequested(); + foreach($validationRules[self::FIELD_FUNDS_RESERVE_REQUESTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_FUNDS_RESERVE_REQUESTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNDS_RESERVE_REQUESTED])) { + $errs[self::FIELD_FUNDS_RESERVE_REQUESTED] = []; + } + $errs[self::FIELD_FUNDS_RESERVE_REQUESTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION])) { + $v = $this->getOriginalPrescription(); + foreach($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ORIGINAL_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_PRESCRIPTION])) { + $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = []; + } + $errs[self::FIELD_ORIGINAL_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE])) { + $v = $this->getPayee(); + foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PAYEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE])) { + $errs[self::FIELD_PAYEE] = []; + } + $errs[self::FIELD_PAYEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT])) { + $v = $this->getPayment(); + foreach($validationRules[self::FIELD_PAYMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PAYMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT])) { + $errs[self::FIELD_PAYMENT] = []; + } + $errs[self::FIELD_PAYMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF])) { + $v = $this->getPreAuthRef(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PRE_AUTH_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF])) { + $errs[self::FIELD_PRE_AUTH_REF] = []; + } + $errs[self::FIELD_PRE_AUTH_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF_PERIOD])) { + $v = $this->getPreAuthRefPeriod(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PRE_AUTH_REF_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF_PERIOD])) { + $errs[self::FIELD_PRE_AUTH_REF_PERIOD] = []; + } + $errs[self::FIELD_PRE_AUTH_REF_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECEDENCE])) { + $v = $this->getPrecedence(); + foreach($validationRules[self::FIELD_PRECEDENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PRECEDENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECEDENCE])) { + $errs[self::FIELD_PRECEDENCE] = []; + } + $errs[self::FIELD_PRECEDENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIPTION])) { + $v = $this->getPrescription(); + foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIPTION])) { + $errs[self::FIELD_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESS_NOTE])) { + $v = $this->getProcessNote(); + foreach($validationRules[self::FIELD_PROCESS_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PROCESS_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESS_NOTE])) { + $errs[self::FIELD_PROCESS_NOTE] = []; + } + $errs[self::FIELD_PROCESS_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL])) { + $v = $this->getReferral(); + foreach($validationRules[self::FIELD_REFERRAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_REFERRAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL])) { + $errs[self::FIELD_REFERRAL] = []; + } + $errs[self::FIELD_REFERRAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php index 20e035b0ac..cff772fd7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -465,7 +465,7 @@ class FHIRFamilyMemberHistory extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type FamilyMemberHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyMemberHistory Constructor @@ -2115,12 +2115,579 @@ public function setStatus(FHIRFamilyHistoryStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgeAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAgeRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAgeString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDataAbsentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ABSENT_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getEstimatedAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ESTIMATED_AGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_URI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (null !== ($v = $this->getSex())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEX] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGE_AGE])) { + $v = $this->getAgeAge(); + foreach($validationRules[self::FIELD_AGE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_AGE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_AGE])) { + $errs[self::FIELD_AGE_AGE] = []; + } + $errs[self::FIELD_AGE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGE_RANGE])) { + $v = $this->getAgeRange(); + foreach($validationRules[self::FIELD_AGE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_AGE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_RANGE])) { + $errs[self::FIELD_AGE_RANGE] = []; + } + $errs[self::FIELD_AGE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGE_STRING])) { + $v = $this->getAgeString(); + foreach($validationRules[self::FIELD_AGE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_AGE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_STRING])) { + $errs[self::FIELD_AGE_STRING] = []; + } + $errs[self::FIELD_AGE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_DATE])) { + $v = $this->getBornDate(); + foreach($validationRules[self::FIELD_BORN_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_BORN_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_DATE])) { + $errs[self::FIELD_BORN_DATE] = []; + } + $errs[self::FIELD_BORN_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_PERIOD])) { + $v = $this->getBornPeriod(); + foreach($validationRules[self::FIELD_BORN_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_BORN_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_PERIOD])) { + $errs[self::FIELD_BORN_PERIOD] = []; + } + $errs[self::FIELD_BORN_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_STRING])) { + $v = $this->getBornString(); + foreach($validationRules[self::FIELD_BORN_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_BORN_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_STRING])) { + $errs[self::FIELD_BORN_STRING] = []; + } + $errs[self::FIELD_BORN_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_ABSENT_REASON])) { + $v = $this->getDataAbsentReason(); + foreach($validationRules[self::FIELD_DATA_ABSENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DATA_ABSENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_ABSENT_REASON])) { + $errs[self::FIELD_DATA_ABSENT_REASON] = []; + } + $errs[self::FIELD_DATA_ABSENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_AGE])) { + $v = $this->getDeceasedAge(); + foreach($validationRules[self::FIELD_DECEASED_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_AGE])) { + $errs[self::FIELD_DECEASED_AGE] = []; + } + $errs[self::FIELD_DECEASED_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_BOOLEAN])) { + $v = $this->getDeceasedBoolean(); + foreach($validationRules[self::FIELD_DECEASED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_BOOLEAN])) { + $errs[self::FIELD_DECEASED_BOOLEAN] = []; + } + $errs[self::FIELD_DECEASED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_DATE])) { + $v = $this->getDeceasedDate(); + foreach($validationRules[self::FIELD_DECEASED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_DATE])) { + $errs[self::FIELD_DECEASED_DATE] = []; + } + $errs[self::FIELD_DECEASED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_RANGE])) { + $v = $this->getDeceasedRange(); + foreach($validationRules[self::FIELD_DECEASED_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_RANGE])) { + $errs[self::FIELD_DECEASED_RANGE] = []; + } + $errs[self::FIELD_DECEASED_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_STRING])) { + $v = $this->getDeceasedString(); + foreach($validationRules[self::FIELD_DECEASED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_STRING])) { + $errs[self::FIELD_DECEASED_STRING] = []; + } + $errs[self::FIELD_DECEASED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ESTIMATED_AGE])) { + $v = $this->getEstimatedAge(); + foreach($validationRules[self::FIELD_ESTIMATED_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_ESTIMATED_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ESTIMATED_AGE])) { + $errs[self::FIELD_ESTIMATED_AGE] = []; + } + $errs[self::FIELD_ESTIMATED_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEX])) { + $v = $this->getSex(); + foreach($validationRules[self::FIELD_SEX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_SEX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEX])) { + $errs[self::FIELD_SEX] = []; + } + $errs[self::FIELD_SEX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFlag.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFlag.php index f523db4ecc..03d432e019 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFlag.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFlag.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -197,7 +197,7 @@ class FHIRFlag extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Flag * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFlag Constructor @@ -656,12 +656,263 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGoal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGoal.php index 17c77c3b2c..8c31cdfd9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -325,7 +325,7 @@ class FHIRGoal extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Goal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGoal Constructor @@ -1400,12 +1400,426 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAchievementStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACHIEVEMENT_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddresses())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESSES, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpressedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSED_BY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLifecycleStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIFECYCLE_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutcomeCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTCOME_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutcomeReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTCOME_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStartCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStartDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACHIEVEMENT_STATUS])) { + $v = $this->getAchievementStatus(); + foreach($validationRules[self::FIELD_ACHIEVEMENT_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_ACHIEVEMENT_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACHIEVEMENT_STATUS])) { + $errs[self::FIELD_ACHIEVEMENT_STATUS] = []; + } + $errs[self::FIELD_ACHIEVEMENT_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESSES])) { + $v = $this->getAddresses(); + foreach($validationRules[self::FIELD_ADDRESSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_ADDRESSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESSES])) { + $errs[self::FIELD_ADDRESSES] = []; + } + $errs[self::FIELD_ADDRESSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSED_BY])) { + $v = $this->getExpressedBy(); + foreach($validationRules[self::FIELD_EXPRESSED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_EXPRESSED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSED_BY])) { + $errs[self::FIELD_EXPRESSED_BY] = []; + } + $errs[self::FIELD_EXPRESSED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIFECYCLE_STATUS])) { + $v = $this->getLifecycleStatus(); + foreach($validationRules[self::FIELD_LIFECYCLE_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_LIFECYCLE_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIFECYCLE_STATUS])) { + $errs[self::FIELD_LIFECYCLE_STATUS] = []; + } + $errs[self::FIELD_LIFECYCLE_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_CODE])) { + $v = $this->getOutcomeCode(); + foreach($validationRules[self::FIELD_OUTCOME_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_OUTCOME_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_CODE])) { + $errs[self::FIELD_OUTCOME_CODE] = []; + } + $errs[self::FIELD_OUTCOME_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_REFERENCE])) { + $v = $this->getOutcomeReference(); + foreach($validationRules[self::FIELD_OUTCOME_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_OUTCOME_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_REFERENCE])) { + $errs[self::FIELD_OUTCOME_REFERENCE] = []; + } + $errs[self::FIELD_OUTCOME_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START_CODEABLE_CONCEPT])) { + $v = $this->getStartCodeableConcept(); + foreach($validationRules[self::FIELD_START_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_START_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START_CODEABLE_CONCEPT])) { + $errs[self::FIELD_START_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_START_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START_DATE])) { + $v = $this->getStartDate(); + foreach($validationRules[self::FIELD_START_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_START_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START_DATE])) { + $errs[self::FIELD_START_DATE] = []; + } + $errs[self::FIELD_START_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_DATE])) { + $v = $this->getStatusDate(); + foreach($validationRules[self::FIELD_STATUS_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_STATUS_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_DATE])) { + $errs[self::FIELD_STATUS_DATE] = []; + } + $errs[self::FIELD_STATUS_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php index 5377cc9c02..13f26a6e6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -331,7 +331,7 @@ class FHIRGraphDefinition extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type GraphDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGraphDefinition Constructor @@ -1429,12 +1429,386 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGroup.php index 5f6cbe4779..cef130afd3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -228,7 +228,7 @@ class FHIRGroup extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroup Constructor @@ -883,12 +883,299 @@ public function setType(FHIRGroupType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getActual())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTUAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingEntity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ENTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMember())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTUAL])) { + $v = $this->getActual(); + foreach($validationRules[self::FIELD_ACTUAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_ACTUAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTUAL])) { + $errs[self::FIELD_ACTUAL] = []; + } + $errs[self::FIELD_ACTUAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC])) { + $v = $this->getCharacteristic(); + foreach($validationRules[self::FIELD_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC])) { + $errs[self::FIELD_CHARACTERISTIC] = []; + } + $errs[self::FIELD_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ENTITY])) { + $v = $this->getManagingEntity(); + foreach($validationRules[self::FIELD_MANAGING_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_MANAGING_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ENTITY])) { + $errs[self::FIELD_MANAGING_ENTITY] = []; + } + $errs[self::FIELD_MANAGING_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEMBER])) { + $v = $this->getMember(); + foreach($validationRules[self::FIELD_MEMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_MEMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEMBER])) { + $errs[self::FIELD_MEMBER] = []; + } + $errs[self::FIELD_MEMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php index 092c9bf3f2..507aa95806 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -339,7 +339,7 @@ class FHIRGuidanceResponse extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type GuidanceResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuidanceResponse Constructor @@ -1407,12 +1407,424 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDataRequirement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA_REQUIREMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvaluationMessage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVALUATION_MESSAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getModuleCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODULE_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getModuleCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODULE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getModuleUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODULE_URI] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutputParameters())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTPUT_PARAMETERS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequestIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getResult())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESULT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATA_REQUIREMENT])) { + $v = $this->getDataRequirement(); + foreach($validationRules[self::FIELD_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_REQUIREMENT])) { + $errs[self::FIELD_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVALUATION_MESSAGE])) { + $v = $this->getEvaluationMessage(); + foreach($validationRules[self::FIELD_EVALUATION_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_EVALUATION_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVALUATION_MESSAGE])) { + $errs[self::FIELD_EVALUATION_MESSAGE] = []; + } + $errs[self::FIELD_EVALUATION_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODULE_CANONICAL])) { + $v = $this->getModuleCanonical(); + foreach($validationRules[self::FIELD_MODULE_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODULE_CANONICAL])) { + $errs[self::FIELD_MODULE_CANONICAL] = []; + } + $errs[self::FIELD_MODULE_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODULE_CODEABLE_CONCEPT])) { + $v = $this->getModuleCodeableConcept(); + foreach($validationRules[self::FIELD_MODULE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODULE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MODULE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MODULE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODULE_URI])) { + $v = $this->getModuleUri(); + foreach($validationRules[self::FIELD_MODULE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODULE_URI])) { + $errs[self::FIELD_MODULE_URI] = []; + } + $errs[self::FIELD_MODULE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTPUT_PARAMETERS])) { + $v = $this->getOutputParameters(); + foreach($validationRules[self::FIELD_OUTPUT_PARAMETERS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OUTPUT_PARAMETERS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTPUT_PARAMETERS])) { + $errs[self::FIELD_OUTPUT_PARAMETERS] = []; + } + $errs[self::FIELD_OUTPUT_PARAMETERS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_IDENTIFIER])) { + $v = $this->getRequestIdentifier(); + foreach($validationRules[self::FIELD_REQUEST_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REQUEST_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_IDENTIFIER])) { + $errs[self::FIELD_REQUEST_IDENTIFIER] = []; + } + $errs[self::FIELD_REQUEST_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php index 85ae04eca7..98cb4ef0cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -417,7 +417,7 @@ class FHIRHealthcareService extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type HealthcareService * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareService Constructor @@ -2156,12 +2156,563 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointmentRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailabilityExceptions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAvailableTime())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AVAILABLE_TIME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCommunication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCoverageArea())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COVERAGE_AREA, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEligibility())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELIGIBILITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExtraDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXTRA_DETAILS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNotAvailable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOT_AVAILABLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPhoto())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHOTO] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgram())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProvidedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDED_BY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferralMethod())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERRAL_METHOD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getServiceProvisionCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_PROVISION_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT_REQUIRED])) { + $v = $this->getAppointmentRequired(); + foreach($validationRules[self::FIELD_APPOINTMENT_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_APPOINTMENT_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT_REQUIRED])) { + $errs[self::FIELD_APPOINTMENT_REQUIRED] = []; + } + $errs[self::FIELD_APPOINTMENT_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $v = $this->getAvailabilityExceptions(); + foreach($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_AVAILABILITY_EXCEPTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = []; + } + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_TIME])) { + $v = $this->getAvailableTime(); + foreach($validationRules[self::FIELD_AVAILABLE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_AVAILABLE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_TIME])) { + $errs[self::FIELD_AVAILABLE_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC])) { + $v = $this->getCharacteristic(); + foreach($validationRules[self::FIELD_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC])) { + $errs[self::FIELD_CHARACTERISTIC] = []; + } + $errs[self::FIELD_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION])) { + $v = $this->getCommunication(); + foreach($validationRules[self::FIELD_COMMUNICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_COMMUNICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION])) { + $errs[self::FIELD_COMMUNICATION] = []; + } + $errs[self::FIELD_COMMUNICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE_AREA])) { + $v = $this->getCoverageArea(); + foreach($validationRules[self::FIELD_COVERAGE_AREA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_COVERAGE_AREA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE_AREA])) { + $errs[self::FIELD_COVERAGE_AREA] = []; + } + $errs[self::FIELD_COVERAGE_AREA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELIGIBILITY])) { + $v = $this->getEligibility(); + foreach($validationRules[self::FIELD_ELIGIBILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_ELIGIBILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELIGIBILITY])) { + $errs[self::FIELD_ELIGIBILITY] = []; + } + $errs[self::FIELD_ELIGIBILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTRA_DETAILS])) { + $v = $this->getExtraDetails(); + foreach($validationRules[self::FIELD_EXTRA_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_EXTRA_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTRA_DETAILS])) { + $errs[self::FIELD_EXTRA_DETAILS] = []; + } + $errs[self::FIELD_EXTRA_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_AVAILABLE])) { + $v = $this->getNotAvailable(); + foreach($validationRules[self::FIELD_NOT_AVAILABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_NOT_AVAILABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_AVAILABLE])) { + $errs[self::FIELD_NOT_AVAILABLE] = []; + } + $errs[self::FIELD_NOT_AVAILABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM])) { + $v = $this->getProgram(); + foreach($validationRules[self::FIELD_PROGRAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_PROGRAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM])) { + $errs[self::FIELD_PROGRAM] = []; + } + $errs[self::FIELD_PROGRAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDED_BY])) { + $v = $this->getProvidedBy(); + foreach($validationRules[self::FIELD_PROVIDED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_PROVIDED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDED_BY])) { + $errs[self::FIELD_PROVIDED_BY] = []; + } + $errs[self::FIELD_PROVIDED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL_METHOD])) { + $v = $this->getReferralMethod(); + foreach($validationRules[self::FIELD_REFERRAL_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_REFERRAL_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL_METHOD])) { + $errs[self::FIELD_REFERRAL_METHOD] = []; + } + $errs[self::FIELD_REFERRAL_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_PROVISION_CODE])) { + $v = $this->getServiceProvisionCode(); + foreach($validationRules[self::FIELD_SERVICE_PROVISION_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_SERVICE_PROVISION_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_PROVISION_CODE])) { + $errs[self::FIELD_SERVICE_PROVISION_CODE] = []; + } + $errs[self::FIELD_SERVICE_PROVISION_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php index 00ba1ecbdd..0494e2d78c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -370,7 +370,7 @@ class FHIRImagingStudy extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type ImagingStudy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudy Constructor @@ -1706,12 +1706,483 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInterpreter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERPRETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModality())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODALITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNumberOfInstances())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_SERIES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcedureCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProcedureReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReferrer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSeries())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERIES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStarted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STARTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERPRETER])) { + $v = $this->getInterpreter(); + foreach($validationRules[self::FIELD_INTERPRETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_INTERPRETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERPRETER])) { + $errs[self::FIELD_INTERPRETER] = []; + } + $errs[self::FIELD_INTERPRETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODALITY])) { + $v = $this->getModality(); + foreach($validationRules[self::FIELD_MODALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_MODALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODALITY])) { + $errs[self::FIELD_MODALITY] = []; + } + $errs[self::FIELD_MODALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_INSTANCES])) { + $v = $this->getNumberOfInstances(); + foreach($validationRules[self::FIELD_NUMBER_OF_INSTANCES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_NUMBER_OF_INSTANCES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_INSTANCES])) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = []; + } + $errs[self::FIELD_NUMBER_OF_INSTANCES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_SERIES])) { + $v = $this->getNumberOfSeries(); + foreach($validationRules[self::FIELD_NUMBER_OF_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_NUMBER_OF_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_SERIES])) { + $errs[self::FIELD_NUMBER_OF_SERIES] = []; + } + $errs[self::FIELD_NUMBER_OF_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_CODE])) { + $v = $this->getProcedureCode(); + foreach($validationRules[self::FIELD_PROCEDURE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_PROCEDURE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_CODE])) { + $errs[self::FIELD_PROCEDURE_CODE] = []; + } + $errs[self::FIELD_PROCEDURE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_REFERENCE])) { + $v = $this->getProcedureReference(); + foreach($validationRules[self::FIELD_PROCEDURE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_PROCEDURE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_REFERENCE])) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = []; + } + $errs[self::FIELD_PROCEDURE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRER])) { + $v = $this->getReferrer(); + foreach($validationRules[self::FIELD_REFERRER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_REFERRER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRER])) { + $errs[self::FIELD_REFERRER] = []; + } + $errs[self::FIELD_REFERRER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STARTED])) { + $v = $this->getStarted(); + foreach($validationRules[self::FIELD_STARTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_STARTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STARTED])) { + $errs[self::FIELD_STARTED] = []; + } + $errs[self::FIELD_STARTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunization.php index 3a827a06ac..76a4d1c4e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -486,7 +486,7 @@ class FHIRImmunization extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Immunization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunization Constructor @@ -2226,12 +2226,636 @@ public function setVaccineCode(FHIRCodeableConcept $vaccineCode = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDoseQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEducation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDUCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpirationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFundingSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNDING_SOURCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIsSubpotent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_SUBPOTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrimarySource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIMARY_SOURCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramEligibility())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_ELIGIBILITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProtocolApplied())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROTOCOL_APPLIED, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReaction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REACTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED] = $fieldErrs; + } + } + if (null !== ($v = $this->getReportOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORT_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubpotentReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBPOTENT_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVaccineCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VACCINE_CODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOSE_QUANTITY])) { + $v = $this->getDoseQuantity(); + foreach($validationRules[self::FIELD_DOSE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_DOSE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_QUANTITY])) { + $errs[self::FIELD_DOSE_QUANTITY] = []; + } + $errs[self::FIELD_DOSE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDUCATION])) { + $v = $this->getEducation(); + foreach($validationRules[self::FIELD_EDUCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_EDUCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDUCATION])) { + $errs[self::FIELD_EDUCATION] = []; + } + $errs[self::FIELD_EDUCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPIRATION_DATE])) { + $v = $this->getExpirationDate(); + foreach($validationRules[self::FIELD_EXPIRATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_EXPIRATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRATION_DATE])) { + $errs[self::FIELD_EXPIRATION_DATE] = []; + } + $errs[self::FIELD_EXPIRATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNDING_SOURCE])) { + $v = $this->getFundingSource(); + foreach($validationRules[self::FIELD_FUNDING_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_FUNDING_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNDING_SOURCE])) { + $errs[self::FIELD_FUNDING_SOURCE] = []; + } + $errs[self::FIELD_FUNDING_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_SUBPOTENT])) { + $v = $this->getIsSubpotent(); + foreach($validationRules[self::FIELD_IS_SUBPOTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_IS_SUBPOTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_SUBPOTENT])) { + $errs[self::FIELD_IS_SUBPOTENT] = []; + } + $errs[self::FIELD_IS_SUBPOTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_STRING])) { + $v = $this->getOccurrenceString(); + foreach($validationRules[self::FIELD_OCCURRENCE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_OCCURRENCE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_STRING])) { + $errs[self::FIELD_OCCURRENCE_STRING] = []; + } + $errs[self::FIELD_OCCURRENCE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIMARY_SOURCE])) { + $v = $this->getPrimarySource(); + foreach($validationRules[self::FIELD_PRIMARY_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PRIMARY_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIMARY_SOURCE])) { + $errs[self::FIELD_PRIMARY_SOURCE] = []; + } + $errs[self::FIELD_PRIMARY_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_ELIGIBILITY])) { + $v = $this->getProgramEligibility(); + foreach($validationRules[self::FIELD_PROGRAM_ELIGIBILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PROGRAM_ELIGIBILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_ELIGIBILITY])) { + $errs[self::FIELD_PROGRAM_ELIGIBILITY] = []; + } + $errs[self::FIELD_PROGRAM_ELIGIBILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL_APPLIED])) { + $v = $this->getProtocolApplied(); + foreach($validationRules[self::FIELD_PROTOCOL_APPLIED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PROTOCOL_APPLIED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL_APPLIED])) { + $errs[self::FIELD_PROTOCOL_APPLIED] = []; + } + $errs[self::FIELD_PROTOCOL_APPLIED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REACTION])) { + $v = $this->getReaction(); + foreach($validationRules[self::FIELD_REACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REACTION])) { + $errs[self::FIELD_REACTION] = []; + } + $errs[self::FIELD_REACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED])) { + $v = $this->getRecorded(); + foreach($validationRules[self::FIELD_RECORDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_RECORDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED])) { + $errs[self::FIELD_RECORDED] = []; + } + $errs[self::FIELD_RECORDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORT_ORIGIN])) { + $v = $this->getReportOrigin(); + foreach($validationRules[self::FIELD_REPORT_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REPORT_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORT_ORIGIN])) { + $errs[self::FIELD_REPORT_ORIGIN] = []; + } + $errs[self::FIELD_REPORT_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBPOTENT_REASON])) { + $v = $this->getSubpotentReason(); + foreach($validationRules[self::FIELD_SUBPOTENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_SUBPOTENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBPOTENT_REASON])) { + $errs[self::FIELD_SUBPOTENT_REASON] = []; + } + $errs[self::FIELD_SUBPOTENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINE_CODE])) { + $v = $this->getVaccineCode(); + foreach($validationRules[self::FIELD_VACCINE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_VACCINE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINE_CODE])) { + $errs[self::FIELD_VACCINE_CODE] = []; + } + $errs[self::FIELD_VACCINE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluation.php index e68fb45a33..0dba42b5b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -295,7 +295,7 @@ class FHIRImmunizationEvaluation extends FHIRDomainResource implements PHPFHIRCo * Validation map for fields in type ImmunizationEvaluation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationEvaluation Constructor @@ -1184,12 +1184,382 @@ public function setTargetDisease(FHIRCodeableConcept $targetDisease = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseNumberPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseNumberString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_NUMBER_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDoseStatusReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSE_STATUS_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getImmunizationEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUNIZATION_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeriesDosesPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES_DOSES_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeriesDosesString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES_DOSES_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetDisease())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_DISEASE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { + $v = $this->getDoseNumberPositiveInt(); + foreach($validationRules[self::FIELD_DOSE_NUMBER_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_DOSE_NUMBER_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { + $errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT] = []; + } + $errs[self::FIELD_DOSE_NUMBER_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_NUMBER_STRING])) { + $v = $this->getDoseNumberString(); + foreach($validationRules[self::FIELD_DOSE_NUMBER_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_DOSE_NUMBER_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_NUMBER_STRING])) { + $errs[self::FIELD_DOSE_NUMBER_STRING] = []; + } + $errs[self::FIELD_DOSE_NUMBER_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_STATUS])) { + $v = $this->getDoseStatus(); + foreach($validationRules[self::FIELD_DOSE_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_DOSE_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_STATUS])) { + $errs[self::FIELD_DOSE_STATUS] = []; + } + $errs[self::FIELD_DOSE_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_STATUS_REASON])) { + $v = $this->getDoseStatusReason(); + foreach($validationRules[self::FIELD_DOSE_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_DOSE_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_STATUS_REASON])) { + $errs[self::FIELD_DOSE_STATUS_REASON] = []; + } + $errs[self::FIELD_DOSE_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMMUNIZATION_EVENT])) { + $v = $this->getImmunizationEvent(); + foreach($validationRules[self::FIELD_IMMUNIZATION_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_IMMUNIZATION_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMMUNIZATION_EVENT])) { + $errs[self::FIELD_IMMUNIZATION_EVENT] = []; + } + $errs[self::FIELD_IMMUNIZATION_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { + $v = $this->getSeriesDosesPositiveInt(); + foreach($validationRules[self::FIELD_SERIES_DOSES_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_SERIES_DOSES_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { + $errs[self::FIELD_SERIES_DOSES_POSITIVE_INT] = []; + } + $errs[self::FIELD_SERIES_DOSES_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES_DOSES_STRING])) { + $v = $this->getSeriesDosesString(); + foreach($validationRules[self::FIELD_SERIES_DOSES_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_SERIES_DOSES_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES_DOSES_STRING])) { + $errs[self::FIELD_SERIES_DOSES_STRING] = []; + } + $errs[self::FIELD_SERIES_DOSES_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_DISEASE])) { + $v = $this->getTargetDisease(); + foreach($validationRules[self::FIELD_TARGET_DISEASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION, self::FIELD_TARGET_DISEASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_DISEASE])) { + $errs[self::FIELD_TARGET_DISEASE] = []; + } + $errs[self::FIELD_TARGET_DISEASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php index 20944e938a..713f680d7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRImmunizationRecommendation extends FHIRDomainResource implements PHPFH * Validation map for fields in type ImmunizationRecommendation * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RECOMMENDATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -497,12 +497,212 @@ public function setRecommendation(array $recommendation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecommendation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECOMMENDATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECOMMENDATION])) { + $v = $this->getRecommendation(); + foreach($validationRules[self::FIELD_RECOMMENDATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_RECOMMENDATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECOMMENDATION])) { + $errs[self::FIELD_RECOMMENDATION] = []; + } + $errs[self::FIELD_RECOMMENDATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php index 04cf8bc3c2..224291e1af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -417,7 +417,7 @@ class FHIRImplementationGuide extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type ImplementationGuide * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_FHIR_VERSION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1858,12 +1858,475 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDependsOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEPENDS_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFhirVersion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FHIR_VERSION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGlobal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GLOBAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLicense())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LICENSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getManifest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANIFEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPackageId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PACKAGE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDS_ON])) { + $v = $this->getDependsOn(); + foreach($validationRules[self::FIELD_DEPENDS_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_DEPENDS_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDS_ON])) { + $errs[self::FIELD_DEPENDS_ON] = []; + } + $errs[self::FIELD_DEPENDS_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GLOBAL])) { + $v = $this->getGlobal(); + foreach($validationRules[self::FIELD_GLOBAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_GLOBAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GLOBAL])) { + $errs[self::FIELD_GLOBAL] = []; + } + $errs[self::FIELD_GLOBAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LICENSE])) { + $v = $this->getLicense(); + foreach($validationRules[self::FIELD_LICENSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_LICENSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LICENSE])) { + $errs[self::FIELD_LICENSE] = []; + } + $errs[self::FIELD_LICENSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANIFEST])) { + $v = $this->getManifest(); + foreach($validationRules[self::FIELD_MANIFEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_MANIFEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANIFEST])) { + $errs[self::FIELD_MANIFEST] = []; + } + $errs[self::FIELD_MANIFEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE_ID])) { + $v = $this->getPackageId(); + foreach($validationRules[self::FIELD_PACKAGE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_PACKAGE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE_ID])) { + $errs[self::FIELD_PACKAGE_ID] = []; + } + $errs[self::FIELD_PACKAGE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInsurancePlan.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInsurancePlan.php index 9801346743..50ad348813 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInsurancePlan.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInsurancePlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -267,7 +267,7 @@ class FHIRInsurancePlan extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type InsurancePlan * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInsurancePlan Constructor @@ -1236,12 +1236,379 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdministeredBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADMINISTERED_BY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAlias())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALIAS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCoverage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COVERAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCoverageArea())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COVERAGE_AREA, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNetwork())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NETWORK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOwnedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNED_BY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPlan())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PLAN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADMINISTERED_BY])) { + $v = $this->getAdministeredBy(); + foreach($validationRules[self::FIELD_ADMINISTERED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_ADMINISTERED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMINISTERED_BY])) { + $errs[self::FIELD_ADMINISTERED_BY] = []; + } + $errs[self::FIELD_ADMINISTERED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE_AREA])) { + $v = $this->getCoverageArea(); + foreach($validationRules[self::FIELD_COVERAGE_AREA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_COVERAGE_AREA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE_AREA])) { + $errs[self::FIELD_COVERAGE_AREA] = []; + } + $errs[self::FIELD_COVERAGE_AREA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNED_BY])) { + $v = $this->getOwnedBy(); + foreach($validationRules[self::FIELD_OWNED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_OWNED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNED_BY])) { + $errs[self::FIELD_OWNED_BY] = []; + } + $errs[self::FIELD_OWNED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PLAN])) { + $v = $this->getPlan(); + foreach($validationRules[self::FIELD_PLAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_PLAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PLAN])) { + $errs[self::FIELD_PLAN] = []; + } + $errs[self::FIELD_PLAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSURANCE_PLAN, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInvoice.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInvoice.php index 8ce4177e33..88b8d3000c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInvoice.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInvoice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -310,7 +310,7 @@ class FHIRInvoice extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Invoice * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInvoice Constructor @@ -1258,12 +1258,405 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCancelledReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CANCELLED_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssuer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLineItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINE_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPaymentTerms())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_TERMS] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecipient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECIPIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotalGross())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL_GROSS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotalNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTotalPriceComponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOTAL_PRICE_COMPONENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCOUNT])) { + $v = $this->getAccount(); + foreach($validationRules[self::FIELD_ACCOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_ACCOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCOUNT])) { + $errs[self::FIELD_ACCOUNT] = []; + } + $errs[self::FIELD_ACCOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CANCELLED_REASON])) { + $v = $this->getCancelledReason(); + foreach($validationRules[self::FIELD_CANCELLED_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_CANCELLED_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CANCELLED_REASON])) { + $errs[self::FIELD_CANCELLED_REASON] = []; + } + $errs[self::FIELD_CANCELLED_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUER])) { + $v = $this->getIssuer(); + foreach($validationRules[self::FIELD_ISSUER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_ISSUER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUER])) { + $errs[self::FIELD_ISSUER] = []; + } + $errs[self::FIELD_ISSUER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINE_ITEM])) { + $v = $this->getLineItem(); + foreach($validationRules[self::FIELD_LINE_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_LINE_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINE_ITEM])) { + $errs[self::FIELD_LINE_ITEM] = []; + } + $errs[self::FIELD_LINE_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_TERMS])) { + $v = $this->getPaymentTerms(); + foreach($validationRules[self::FIELD_PAYMENT_TERMS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_PAYMENT_TERMS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_TERMS])) { + $errs[self::FIELD_PAYMENT_TERMS] = []; + } + $errs[self::FIELD_PAYMENT_TERMS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL_GROSS])) { + $v = $this->getTotalGross(); + foreach($validationRules[self::FIELD_TOTAL_GROSS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_TOTAL_GROSS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL_GROSS])) { + $errs[self::FIELD_TOTAL_GROSS] = []; + } + $errs[self::FIELD_TOTAL_GROSS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL_NET])) { + $v = $this->getTotalNet(); + foreach($validationRules[self::FIELD_TOTAL_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_TOTAL_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL_NET])) { + $errs[self::FIELD_TOTAL_NET] = []; + } + $errs[self::FIELD_TOTAL_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL_PRICE_COMPONENT])) { + $v = $this->getTotalPriceComponent(); + foreach($validationRules[self::FIELD_TOTAL_PRICE_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_TOTAL_PRICE_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL_PRICE_COMPONENT])) { + $errs[self::FIELD_TOTAL_PRICE_COMPONENT] = []; + } + $errs[self::FIELD_TOTAL_PRICE_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INVOICE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLibrary.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLibrary.php index 4eae6a363e..c705b9355d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLibrary.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLibrary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -580,7 +580,7 @@ class FHIRLibrary extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Library * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLibrary Constructor @@ -2823,12 +2823,693 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDataRequirement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA_REQUIREMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_REQUIREMENT])) { + $v = $this->getDataRequirement(); + foreach($validationRules[self::FIELD_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_REQUIREMENT])) { + $errs[self::FIELD_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $v = $this->getSubjectCodeableConcept(); + foreach($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_SUBJECT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_REFERENCE])) { + $v = $this->getSubjectReference(); + foreach($validationRules[self::FIELD_SUBJECT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_SUBJECT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_REFERENCE])) { + $errs[self::FIELD_SUBJECT_REFERENCE] = []; + } + $errs[self::FIELD_SUBJECT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTITLE])) { + $v = $this->getSubtitle(); + foreach($validationRules[self::FIELD_SUBTITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_SUBTITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTITLE])) { + $errs[self::FIELD_SUBTITLE] = []; + } + $errs[self::FIELD_SUBTITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLinkage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLinkage.php index 04ef86625f..892682bf12 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLinkage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLinkage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRLinkage extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Linkage * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ITEM => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -359,12 +359,176 @@ public function setItem(array $item = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRList.php index ed3467ea85..a8f318e13b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -265,7 +265,7 @@ class FHIRList extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type List * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRList Constructor @@ -1007,12 +1007,350 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEmptyReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EMPTY_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTRY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrderedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_BY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EMPTY_REASON])) { + $v = $this->getEmptyReason(); + foreach($validationRules[self::FIELD_EMPTY_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_EMPTY_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EMPTY_REASON])) { + $errs[self::FIELD_EMPTY_REASON] = []; + } + $errs[self::FIELD_EMPTY_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTRY])) { + $v = $this->getEntry(); + foreach($validationRules[self::FIELD_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY])) { + $errs[self::FIELD_ENTRY] = []; + } + $errs[self::FIELD_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_BY])) { + $v = $this->getOrderedBy(); + foreach($validationRules[self::FIELD_ORDERED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ORDERED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_BY])) { + $errs[self::FIELD_ORDERED_BY] = []; + } + $errs[self::FIELD_ORDERED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLocation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLocation.php index 8ad974e975..d2291a2263 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -328,7 +328,7 @@ class FHIRLocation extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Location * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocation Constructor @@ -1404,12 +1404,424 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAlias())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALIAS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAvailabilityExceptions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getHoursOfOperation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HOURS_OF_OPERATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATIONAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if (null !== ($v = $this->getPhysicalType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHYSICAL_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPosition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $v = $this->getAvailabilityExceptions(); + foreach($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_AVAILABILITY_EXCEPTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = []; + } + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HOURS_OF_OPERATION])) { + $v = $this->getHoursOfOperation(); + foreach($validationRules[self::FIELD_HOURS_OF_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_HOURS_OF_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HOURS_OF_OPERATION])) { + $errs[self::FIELD_HOURS_OF_OPERATION] = []; + } + $errs[self::FIELD_HOURS_OF_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATIONAL_STATUS])) { + $v = $this->getOperationalStatus(); + foreach($validationRules[self::FIELD_OPERATIONAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_OPERATIONAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATIONAL_STATUS])) { + $errs[self::FIELD_OPERATIONAL_STATUS] = []; + } + $errs[self::FIELD_OPERATIONAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHYSICAL_TYPE])) { + $v = $this->getPhysicalType(); + foreach($validationRules[self::FIELD_PHYSICAL_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_PHYSICAL_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHYSICAL_TYPE])) { + $errs[self::FIELD_PHYSICAL_TYPE] = []; + } + $errs[self::FIELD_PHYSICAL_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POSITION])) { + $v = $this->getPosition(); + foreach($validationRules[self::FIELD_POSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_POSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POSITION])) { + $errs[self::FIELD_POSITION] = []; + } + $errs[self::FIELD_POSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasure.php index f0f1517db2..cb0f122039 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -736,7 +736,7 @@ class FHIRMeasure extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Measure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasure Constructor @@ -3684,12 +3684,867 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClinicalRecommendationStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompositeScoring())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSITE_SCORING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisclaimer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISCLAIMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGuidance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GUIDANCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getImprovementNotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPROVEMENT_NOTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLibrary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIBRARY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateAggregation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_AGGREGATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRationale())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATIONALE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRiskAdjustment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RISK_ADJUSTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getScoring())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCORING] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupplementalData())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPLEMENTAL_DATA, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { + $v = $this->getClinicalRecommendationStatement(); + foreach($validationRules[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { + $errs[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT] = []; + } + $errs[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPOSITE_SCORING])) { + $v = $this->getCompositeScoring(); + foreach($validationRules[self::FIELD_COMPOSITE_SCORING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_COMPOSITE_SCORING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPOSITE_SCORING])) { + $errs[self::FIELD_COMPOSITE_SCORING] = []; + } + $errs[self::FIELD_COMPOSITE_SCORING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCLAIMER])) { + $v = $this->getDisclaimer(); + foreach($validationRules[self::FIELD_DISCLAIMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_DISCLAIMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCLAIMER])) { + $errs[self::FIELD_DISCLAIMER] = []; + } + $errs[self::FIELD_DISCLAIMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GUIDANCE])) { + $v = $this->getGuidance(); + foreach($validationRules[self::FIELD_GUIDANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_GUIDANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GUIDANCE])) { + $errs[self::FIELD_GUIDANCE] = []; + } + $errs[self::FIELD_GUIDANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPROVEMENT_NOTATION])) { + $v = $this->getImprovementNotation(); + foreach($validationRules[self::FIELD_IMPROVEMENT_NOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_IMPROVEMENT_NOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPROVEMENT_NOTATION])) { + $errs[self::FIELD_IMPROVEMENT_NOTATION] = []; + } + $errs[self::FIELD_IMPROVEMENT_NOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIBRARY])) { + $v = $this->getLibrary(); + foreach($validationRules[self::FIELD_LIBRARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_LIBRARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIBRARY])) { + $errs[self::FIELD_LIBRARY] = []; + } + $errs[self::FIELD_LIBRARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_AGGREGATION])) { + $v = $this->getRateAggregation(); + foreach($validationRules[self::FIELD_RATE_AGGREGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_RATE_AGGREGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_AGGREGATION])) { + $errs[self::FIELD_RATE_AGGREGATION] = []; + } + $errs[self::FIELD_RATE_AGGREGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATIONALE])) { + $v = $this->getRationale(); + foreach($validationRules[self::FIELD_RATIONALE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_RATIONALE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATIONALE])) { + $errs[self::FIELD_RATIONALE] = []; + } + $errs[self::FIELD_RATIONALE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RISK_ADJUSTMENT])) { + $v = $this->getRiskAdjustment(); + foreach($validationRules[self::FIELD_RISK_ADJUSTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_RISK_ADJUSTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RISK_ADJUSTMENT])) { + $errs[self::FIELD_RISK_ADJUSTMENT] = []; + } + $errs[self::FIELD_RISK_ADJUSTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORING])) { + $v = $this->getScoring(); + foreach($validationRules[self::FIELD_SCORING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_SCORING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORING])) { + $errs[self::FIELD_SCORING] = []; + } + $errs[self::FIELD_SCORING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $v = $this->getSubjectCodeableConcept(); + foreach($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_SUBJECT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_REFERENCE])) { + $v = $this->getSubjectReference(); + foreach($validationRules[self::FIELD_SUBJECT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_SUBJECT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_REFERENCE])) { + $errs[self::FIELD_SUBJECT_REFERENCE] = []; + } + $errs[self::FIELD_SUBJECT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTITLE])) { + $v = $this->getSubtitle(); + foreach($validationRules[self::FIELD_SUBTITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_SUBTITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTITLE])) { + $errs[self::FIELD_SUBTITLE] = []; + } + $errs[self::FIELD_SUBTITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLEMENTAL_DATA])) { + $v = $this->getSupplementalData(); + foreach($validationRules[self::FIELD_SUPPLEMENTAL_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_SUPPLEMENTAL_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLEMENTAL_DATA])) { + $errs[self::FIELD_SUPPLEMENTAL_DATA] = []; + } + $errs[self::FIELD_SUPPLEMENTAL_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php index cd194c7c62..b21061eddd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -245,7 +245,7 @@ class FHIRMeasureReport extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type MeasureReport * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReport Constructor @@ -921,12 +921,316 @@ public function setType(FHIRMeasureReportType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvaluatedResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVALUATED_RESOURCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getImprovementNotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPROVEMENT_NOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getReporter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVALUATED_RESOURCE])) { + $v = $this->getEvaluatedResource(); + foreach($validationRules[self::FIELD_EVALUATED_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_EVALUATED_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVALUATED_RESOURCE])) { + $errs[self::FIELD_EVALUATED_RESOURCE] = []; + } + $errs[self::FIELD_EVALUATED_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPROVEMENT_NOTATION])) { + $v = $this->getImprovementNotation(); + foreach($validationRules[self::FIELD_IMPROVEMENT_NOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_IMPROVEMENT_NOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPROVEMENT_NOTATION])) { + $errs[self::FIELD_IMPROVEMENT_NOTATION] = []; + } + $errs[self::FIELD_IMPROVEMENT_NOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASURE])) { + $v = $this->getMeasure(); + foreach($validationRules[self::FIELD_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASURE])) { + $errs[self::FIELD_MEASURE] = []; + } + $errs[self::FIELD_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTER])) { + $v = $this->getReporter(); + foreach($validationRules[self::FIELD_REPORTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_REPORTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTER])) { + $errs[self::FIELD_REPORTER] = []; + } + $errs[self::FIELD_REPORTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedia.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedia.php index 16a89668c7..e55f0c1347 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedia.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedia.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -411,7 +411,7 @@ class FHIRMedia extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Media * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedia Constructor @@ -1741,12 +1741,524 @@ public function setWidth($width = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreatedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreatedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrames())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FRAMES] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeight())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEIGHT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getModality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODALITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOperator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getView())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VIEW] = $fieldErrs; + } + } + if (null !== ($v = $this->getWidth())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WIDTH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED_DATE_TIME])) { + $v = $this->getCreatedDateTime(); + foreach($validationRules[self::FIELD_CREATED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_CREATED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED_DATE_TIME])) { + $errs[self::FIELD_CREATED_DATE_TIME] = []; + } + $errs[self::FIELD_CREATED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED_PERIOD])) { + $v = $this->getCreatedPeriod(); + foreach($validationRules[self::FIELD_CREATED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_CREATED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED_PERIOD])) { + $errs[self::FIELD_CREATED_PERIOD] = []; + } + $errs[self::FIELD_CREATED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE_NAME])) { + $v = $this->getDeviceName(); + foreach($validationRules[self::FIELD_DEVICE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_DEVICE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE_NAME])) { + $errs[self::FIELD_DEVICE_NAME] = []; + } + $errs[self::FIELD_DEVICE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FRAMES])) { + $v = $this->getFrames(); + foreach($validationRules[self::FIELD_FRAMES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_FRAMES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRAMES])) { + $errs[self::FIELD_FRAMES] = []; + } + $errs[self::FIELD_FRAMES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEIGHT])) { + $v = $this->getHeight(); + foreach($validationRules[self::FIELD_HEIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_HEIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEIGHT])) { + $errs[self::FIELD_HEIGHT] = []; + } + $errs[self::FIELD_HEIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODALITY])) { + $v = $this->getModality(); + foreach($validationRules[self::FIELD_MODALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_MODALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODALITY])) { + $errs[self::FIELD_MODALITY] = []; + } + $errs[self::FIELD_MODALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATOR])) { + $v = $this->getOperator(); + foreach($validationRules[self::FIELD_OPERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_OPERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATOR])) { + $errs[self::FIELD_OPERATOR] = []; + } + $errs[self::FIELD_OPERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VIEW])) { + $v = $this->getView(); + foreach($validationRules[self::FIELD_VIEW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_VIEW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VIEW])) { + $errs[self::FIELD_VIEW] = []; + } + $errs[self::FIELD_VIEW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WIDTH])) { + $v = $this->getWidth(); + foreach($validationRules[self::FIELD_WIDTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_WIDTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WIDTH])) { + $errs[self::FIELD_WIDTH] = []; + } + $errs[self::FIELD_WIDTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedication.php index 95ae7ff407..e3373b8879 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -202,7 +202,7 @@ class FHIRMedication extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type Medication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedication Constructor @@ -658,12 +658,263 @@ public function setStatus(FHIRMedicationStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBatch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BATCH] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BATCH])) { + $v = $this->getBatch(); + foreach($validationRules[self::FIELD_BATCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_BATCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BATCH])) { + $errs[self::FIELD_BATCH] = []; + } + $errs[self::FIELD_BATCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php index fa5ce77ff2..b3923f7b99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -396,7 +396,7 @@ class FHIRMedicationAdministration extends FHIRDomainResource implements PHPFHIR * Validation map for fields in type MedicationAdministration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministration Constructor @@ -1803,12 +1803,502 @@ public function setSupportingInformation(array $supportingInformation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEVICE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEventHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiates())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStatusReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STATUS_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_HISTORY])) { + $v = $this->getEventHistory(); + foreach($validationRules[self::FIELD_EVENT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_EVENT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_HISTORY])) { + $errs[self::FIELD_EVENT_HISTORY] = []; + } + $errs[self::FIELD_EVENT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES])) { + $v = $this->getInstantiates(); + foreach($validationRules[self::FIELD_INSTANTIATES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_INSTANTIATES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES])) { + $errs[self::FIELD_INSTANTIATES] = []; + } + $errs[self::FIELD_INSTANTIATES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php index 88185d903c..f108a8759f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -460,7 +460,7 @@ class FHIRMedicationDispense extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type MedicationDispense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispense Constructor @@ -2018,12 +2018,585 @@ public function setWhenPrepared($whenPrepared = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAuthorizingPrescription())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHORIZING_PRESCRIPTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDaysSupply())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DAYS_SUPPLY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetectedIssue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETECTED_ISSUE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDosageInstruction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE_INSTRUCTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEventHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReceiver())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECEIVER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstitution())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTITUTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenHandedOver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_HANDED_OVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenPrepared())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_PREPARED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORIZING_PRESCRIPTION])) { + $v = $this->getAuthorizingPrescription(); + foreach($validationRules[self::FIELD_AUTHORIZING_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_AUTHORIZING_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORIZING_PRESCRIPTION])) { + $errs[self::FIELD_AUTHORIZING_PRESCRIPTION] = []; + } + $errs[self::FIELD_AUTHORIZING_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAYS_SUPPLY])) { + $v = $this->getDaysSupply(); + foreach($validationRules[self::FIELD_DAYS_SUPPLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DAYS_SUPPLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAYS_SUPPLY])) { + $errs[self::FIELD_DAYS_SUPPLY] = []; + } + $errs[self::FIELD_DAYS_SUPPLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETECTED_ISSUE])) { + $v = $this->getDetectedIssue(); + foreach($validationRules[self::FIELD_DETECTED_ISSUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DETECTED_ISSUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETECTED_ISSUE])) { + $errs[self::FIELD_DETECTED_ISSUE] = []; + } + $errs[self::FIELD_DETECTED_ISSUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE_INSTRUCTION])) { + $v = $this->getDosageInstruction(); + foreach($validationRules[self::FIELD_DOSAGE_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DOSAGE_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE_INSTRUCTION])) { + $errs[self::FIELD_DOSAGE_INSTRUCTION] = []; + } + $errs[self::FIELD_DOSAGE_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_HISTORY])) { + $v = $this->getEventHistory(); + foreach($validationRules[self::FIELD_EVENT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_EVENT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_HISTORY])) { + $errs[self::FIELD_EVENT_HISTORY] = []; + } + $errs[self::FIELD_EVENT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON_CODEABLE_CONCEPT])) { + $v = $this->getStatusReasonCodeableConcept(); + foreach($validationRules[self::FIELD_STATUS_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_STATUS_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_STATUS_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_STATUS_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON_REFERENCE])) { + $v = $this->getStatusReasonReference(); + foreach($validationRules[self::FIELD_STATUS_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_STATUS_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON_REFERENCE])) { + $errs[self::FIELD_STATUS_REASON_REFERENCE] = []; + } + $errs[self::FIELD_STATUS_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTITUTION])) { + $v = $this->getSubstitution(); + foreach($validationRules[self::FIELD_SUBSTITUTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_SUBSTITUTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTITUTION])) { + $errs[self::FIELD_SUBSTITUTION] = []; + } + $errs[self::FIELD_SUBSTITUTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_HANDED_OVER])) { + $v = $this->getWhenHandedOver(); + foreach($validationRules[self::FIELD_WHEN_HANDED_OVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_WHEN_HANDED_OVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_HANDED_OVER])) { + $errs[self::FIELD_WHEN_HANDED_OVER] = []; + } + $errs[self::FIELD_WHEN_HANDED_OVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_PREPARED])) { + $v = $this->getWhenPrepared(); + foreach($validationRules[self::FIELD_WHEN_PREPARED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_WHEN_PREPARED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_PREPARED])) { + $errs[self::FIELD_WHEN_PREPARED] = []; + } + $errs[self::FIELD_WHEN_PREPARED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledge.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledge.php index 5b6616d57f..ebf93d9e4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledge.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -377,7 +377,7 @@ class FHIRMedicationKnowledge extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type MedicationKnowledge * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationKnowledge Constructor @@ -1876,12 +1876,527 @@ public function setSynonym(array $synonym = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdministrationGuidelines())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADMINISTRATION_GUIDELINES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAssociatedMedication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ASSOCIATED_MEDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContraindication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRAINDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCost())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDoseForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDrugCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DRUG_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIntendedRoute())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTENDED_ROUTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getKinetics())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_KINETICS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMedicineClassification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEDICINE_CLASSIFICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMonitoringProgram())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MONITORING_PROGRAM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMonograph())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MONOGRAPH, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPackaging())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PACKAGING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreparationInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREPARATION_INSTRUCTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProductType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRODUCT_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRegulatory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REGULATORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelatedMedicationKnowledge())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_MEDICATION_KNOWLEDGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSynonym())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SYNONYM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADMINISTRATION_GUIDELINES])) { + $v = $this->getAdministrationGuidelines(); + foreach($validationRules[self::FIELD_ADMINISTRATION_GUIDELINES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_ADMINISTRATION_GUIDELINES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMINISTRATION_GUIDELINES])) { + $errs[self::FIELD_ADMINISTRATION_GUIDELINES] = []; + } + $errs[self::FIELD_ADMINISTRATION_GUIDELINES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSOCIATED_MEDICATION])) { + $v = $this->getAssociatedMedication(); + foreach($validationRules[self::FIELD_ASSOCIATED_MEDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_ASSOCIATED_MEDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSOCIATED_MEDICATION])) { + $errs[self::FIELD_ASSOCIATED_MEDICATION] = []; + } + $errs[self::FIELD_ASSOCIATED_MEDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRAINDICATION])) { + $v = $this->getContraindication(); + foreach($validationRules[self::FIELD_CONTRAINDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_CONTRAINDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRAINDICATION])) { + $errs[self::FIELD_CONTRAINDICATION] = []; + } + $errs[self::FIELD_CONTRAINDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COST])) { + $v = $this->getCost(); + foreach($validationRules[self::FIELD_COST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_COST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COST])) { + $errs[self::FIELD_COST] = []; + } + $errs[self::FIELD_COST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_FORM])) { + $v = $this->getDoseForm(); + foreach($validationRules[self::FIELD_DOSE_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_DOSE_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_FORM])) { + $errs[self::FIELD_DOSE_FORM] = []; + } + $errs[self::FIELD_DOSE_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DRUG_CHARACTERISTIC])) { + $v = $this->getDrugCharacteristic(); + foreach($validationRules[self::FIELD_DRUG_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_DRUG_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DRUG_CHARACTERISTIC])) { + $errs[self::FIELD_DRUG_CHARACTERISTIC] = []; + } + $errs[self::FIELD_DRUG_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENDED_ROUTE])) { + $v = $this->getIntendedRoute(); + foreach($validationRules[self::FIELD_INTENDED_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_INTENDED_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENDED_ROUTE])) { + $errs[self::FIELD_INTENDED_ROUTE] = []; + } + $errs[self::FIELD_INTENDED_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KINETICS])) { + $v = $this->getKinetics(); + foreach($validationRules[self::FIELD_KINETICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_KINETICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KINETICS])) { + $errs[self::FIELD_KINETICS] = []; + } + $errs[self::FIELD_KINETICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICINE_CLASSIFICATION])) { + $v = $this->getMedicineClassification(); + foreach($validationRules[self::FIELD_MEDICINE_CLASSIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_MEDICINE_CLASSIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICINE_CLASSIFICATION])) { + $errs[self::FIELD_MEDICINE_CLASSIFICATION] = []; + } + $errs[self::FIELD_MEDICINE_CLASSIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MONITORING_PROGRAM])) { + $v = $this->getMonitoringProgram(); + foreach($validationRules[self::FIELD_MONITORING_PROGRAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_MONITORING_PROGRAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MONITORING_PROGRAM])) { + $errs[self::FIELD_MONITORING_PROGRAM] = []; + } + $errs[self::FIELD_MONITORING_PROGRAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MONOGRAPH])) { + $v = $this->getMonograph(); + foreach($validationRules[self::FIELD_MONOGRAPH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_MONOGRAPH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MONOGRAPH])) { + $errs[self::FIELD_MONOGRAPH] = []; + } + $errs[self::FIELD_MONOGRAPH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGING])) { + $v = $this->getPackaging(); + foreach($validationRules[self::FIELD_PACKAGING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_PACKAGING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGING])) { + $errs[self::FIELD_PACKAGING] = []; + } + $errs[self::FIELD_PACKAGING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREPARATION_INSTRUCTION])) { + $v = $this->getPreparationInstruction(); + foreach($validationRules[self::FIELD_PREPARATION_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_PREPARATION_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREPARATION_INSTRUCTION])) { + $errs[self::FIELD_PREPARATION_INSTRUCTION] = []; + } + $errs[self::FIELD_PREPARATION_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_TYPE])) { + $v = $this->getProductType(); + foreach($validationRules[self::FIELD_PRODUCT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_PRODUCT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_TYPE])) { + $errs[self::FIELD_PRODUCT_TYPE] = []; + } + $errs[self::FIELD_PRODUCT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REGULATORY])) { + $v = $this->getRegulatory(); + foreach($validationRules[self::FIELD_REGULATORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_REGULATORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REGULATORY])) { + $errs[self::FIELD_REGULATORY] = []; + } + $errs[self::FIELD_REGULATORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_MEDICATION_KNOWLEDGE])) { + $v = $this->getRelatedMedicationKnowledge(); + foreach($validationRules[self::FIELD_RELATED_MEDICATION_KNOWLEDGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_RELATED_MEDICATION_KNOWLEDGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_MEDICATION_KNOWLEDGE])) { + $errs[self::FIELD_RELATED_MEDICATION_KNOWLEDGE] = []; + } + $errs[self::FIELD_RELATED_MEDICATION_KNOWLEDGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYNONYM])) { + $v = $this->getSynonym(); + foreach($validationRules[self::FIELD_SYNONYM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_KNOWLEDGE, self::FIELD_SYNONYM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYNONYM])) { + $errs[self::FIELD_SYNONYM] = []; + } + $errs[self::FIELD_SYNONYM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php index e45f03b621..9e5490fde0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -580,7 +580,7 @@ class FHIRMedicationRequest extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type MedicationRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequest Constructor @@ -2686,12 +2686,727 @@ public function setSupportingInformation(array $supportingInformation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCourseOfTherapyType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COURSE_OF_THERAPY_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetectedIssue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETECTED_ISSUE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDispenseRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPENSE_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoNotPerform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DO_NOT_PERFORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDosageInstruction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE_INSTRUCTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEventHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT_HISTORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_URI, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformerType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriorPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIOR_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReportedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getReportedReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTED_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstitution())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTITUTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COURSE_OF_THERAPY_TYPE])) { + $v = $this->getCourseOfTherapyType(); + foreach($validationRules[self::FIELD_COURSE_OF_THERAPY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_COURSE_OF_THERAPY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COURSE_OF_THERAPY_TYPE])) { + $errs[self::FIELD_COURSE_OF_THERAPY_TYPE] = []; + } + $errs[self::FIELD_COURSE_OF_THERAPY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETECTED_ISSUE])) { + $v = $this->getDetectedIssue(); + foreach($validationRules[self::FIELD_DETECTED_ISSUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_DETECTED_ISSUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETECTED_ISSUE])) { + $errs[self::FIELD_DETECTED_ISSUE] = []; + } + $errs[self::FIELD_DETECTED_ISSUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPENSE_REQUEST])) { + $v = $this->getDispenseRequest(); + foreach($validationRules[self::FIELD_DISPENSE_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_DISPENSE_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSE_REQUEST])) { + $errs[self::FIELD_DISPENSE_REQUEST] = []; + } + $errs[self::FIELD_DISPENSE_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DO_NOT_PERFORM])) { + $v = $this->getDoNotPerform(); + foreach($validationRules[self::FIELD_DO_NOT_PERFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_DO_NOT_PERFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DO_NOT_PERFORM])) { + $errs[self::FIELD_DO_NOT_PERFORM] = []; + } + $errs[self::FIELD_DO_NOT_PERFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE_INSTRUCTION])) { + $v = $this->getDosageInstruction(); + foreach($validationRules[self::FIELD_DOSAGE_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_DOSAGE_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE_INSTRUCTION])) { + $errs[self::FIELD_DOSAGE_INSTRUCTION] = []; + } + $errs[self::FIELD_DOSAGE_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_HISTORY])) { + $v = $this->getEventHistory(); + foreach($validationRules[self::FIELD_EVENT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_EVENT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_HISTORY])) { + $errs[self::FIELD_EVENT_HISTORY] = []; + } + $errs[self::FIELD_EVENT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER_TYPE])) { + $v = $this->getPerformerType(); + foreach($validationRules[self::FIELD_PERFORMER_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_PERFORMER_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER_TYPE])) { + $errs[self::FIELD_PERFORMER_TYPE] = []; + } + $errs[self::FIELD_PERFORMER_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIOR_PRESCRIPTION])) { + $v = $this->getPriorPrescription(); + foreach($validationRules[self::FIELD_PRIOR_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_PRIOR_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIOR_PRESCRIPTION])) { + $errs[self::FIELD_PRIOR_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRIOR_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTED_BOOLEAN])) { + $v = $this->getReportedBoolean(); + foreach($validationRules[self::FIELD_REPORTED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_REPORTED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTED_BOOLEAN])) { + $errs[self::FIELD_REPORTED_BOOLEAN] = []; + } + $errs[self::FIELD_REPORTED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTED_REFERENCE])) { + $v = $this->getReportedReference(); + foreach($validationRules[self::FIELD_REPORTED_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_REPORTED_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTED_REFERENCE])) { + $errs[self::FIELD_REPORTED_REFERENCE] = []; + } + $errs[self::FIELD_REPORTED_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTITUTION])) { + $v = $this->getSubstitution(); + foreach($validationRules[self::FIELD_SUBSTITUTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_SUBSTITUTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTITUTION])) { + $errs[self::FIELD_SUBSTITUTION] = []; + } + $errs[self::FIELD_SUBSTITUTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php index a9746d6f32..e0d6bf47a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -378,7 +378,7 @@ class FHIRMedicationStatement extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type MedicationStatement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatement Constructor @@ -1605,12 +1605,464 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateAsserted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_ASSERTED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDerivedFrom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DERIVED_FROM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDosage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInformationSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INFORMATION_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStatusReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STATUS_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_ASSERTED])) { + $v = $this->getDateAsserted(); + foreach($validationRules[self::FIELD_DATE_ASSERTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_DATE_ASSERTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_ASSERTED])) { + $errs[self::FIELD_DATE_ASSERTED] = []; + } + $errs[self::FIELD_DATE_ASSERTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DERIVED_FROM])) { + $v = $this->getDerivedFrom(); + foreach($validationRules[self::FIELD_DERIVED_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_DERIVED_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DERIVED_FROM])) { + $errs[self::FIELD_DERIVED_FROM] = []; + } + $errs[self::FIELD_DERIVED_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORMATION_SOURCE])) { + $v = $this->getInformationSource(); + foreach($validationRules[self::FIELD_INFORMATION_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_INFORMATION_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORMATION_SOURCE])) { + $errs[self::FIELD_INFORMATION_SOURCE] = []; + } + $errs[self::FIELD_INFORMATION_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProduct.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProduct.php index bc3f0ae9fa..2e006b6097 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProduct.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProduct.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -352,7 +352,7 @@ class FHIRMedicinalProduct extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type MedicinalProduct * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_NAME => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1728,12 +1728,491 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditionalMonitoringIndicator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIONAL_MONITORING_INDICATOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAttachedDocument())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ATTACHED_DOCUMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getClinicalTrial())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CLINICAL_TRIAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCombinedPharmaceuticalDoseForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMBINED_PHARMACEUTICAL_DOSE_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCrossReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CROSS_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDomain())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOMAIN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLegalStatusOfSupply())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getManufacturingBusinessOperation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANUFACTURING_BUSINESS_OPERATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMarketingStatus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MARKETING_STATUS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMasterFile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MASTER_FILE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPackagedMedicinalProduct())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PACKAGED_MEDICINAL_PRODUCT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPaediatricUseIndicator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAEDIATRIC_USE_INDICATOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPharmaceuticalProduct())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHARMACEUTICAL_PRODUCT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProductClassification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRODUCT_CLASSIFICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialMeasures())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_MEASURES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_MONITORING_INDICATOR])) { + $v = $this->getAdditionalMonitoringIndicator(); + foreach($validationRules[self::FIELD_ADDITIONAL_MONITORING_INDICATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_ADDITIONAL_MONITORING_INDICATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_MONITORING_INDICATOR])) { + $errs[self::FIELD_ADDITIONAL_MONITORING_INDICATOR] = []; + } + $errs[self::FIELD_ADDITIONAL_MONITORING_INDICATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ATTACHED_DOCUMENT])) { + $v = $this->getAttachedDocument(); + foreach($validationRules[self::FIELD_ATTACHED_DOCUMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_ATTACHED_DOCUMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTACHED_DOCUMENT])) { + $errs[self::FIELD_ATTACHED_DOCUMENT] = []; + } + $errs[self::FIELD_ATTACHED_DOCUMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLINICAL_TRIAL])) { + $v = $this->getClinicalTrial(); + foreach($validationRules[self::FIELD_CLINICAL_TRIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_CLINICAL_TRIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLINICAL_TRIAL])) { + $errs[self::FIELD_CLINICAL_TRIAL] = []; + } + $errs[self::FIELD_CLINICAL_TRIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMBINED_PHARMACEUTICAL_DOSE_FORM])) { + $v = $this->getCombinedPharmaceuticalDoseForm(); + foreach($validationRules[self::FIELD_COMBINED_PHARMACEUTICAL_DOSE_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_COMBINED_PHARMACEUTICAL_DOSE_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMBINED_PHARMACEUTICAL_DOSE_FORM])) { + $errs[self::FIELD_COMBINED_PHARMACEUTICAL_DOSE_FORM] = []; + } + $errs[self::FIELD_COMBINED_PHARMACEUTICAL_DOSE_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CROSS_REFERENCE])) { + $v = $this->getCrossReference(); + foreach($validationRules[self::FIELD_CROSS_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_CROSS_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CROSS_REFERENCE])) { + $errs[self::FIELD_CROSS_REFERENCE] = []; + } + $errs[self::FIELD_CROSS_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOMAIN])) { + $v = $this->getDomain(); + foreach($validationRules[self::FIELD_DOMAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_DOMAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOMAIN])) { + $errs[self::FIELD_DOMAIN] = []; + } + $errs[self::FIELD_DOMAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEGAL_STATUS_OF_SUPPLY])) { + $v = $this->getLegalStatusOfSupply(); + foreach($validationRules[self::FIELD_LEGAL_STATUS_OF_SUPPLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_LEGAL_STATUS_OF_SUPPLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY])) { + $errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY] = []; + } + $errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURING_BUSINESS_OPERATION])) { + $v = $this->getManufacturingBusinessOperation(); + foreach($validationRules[self::FIELD_MANUFACTURING_BUSINESS_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_MANUFACTURING_BUSINESS_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURING_BUSINESS_OPERATION])) { + $errs[self::FIELD_MANUFACTURING_BUSINESS_OPERATION] = []; + } + $errs[self::FIELD_MANUFACTURING_BUSINESS_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MARKETING_STATUS])) { + $v = $this->getMarketingStatus(); + foreach($validationRules[self::FIELD_MARKETING_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_MARKETING_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MARKETING_STATUS])) { + $errs[self::FIELD_MARKETING_STATUS] = []; + } + $errs[self::FIELD_MARKETING_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MASTER_FILE])) { + $v = $this->getMasterFile(); + foreach($validationRules[self::FIELD_MASTER_FILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_MASTER_FILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MASTER_FILE])) { + $errs[self::FIELD_MASTER_FILE] = []; + } + $errs[self::FIELD_MASTER_FILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGED_MEDICINAL_PRODUCT])) { + $v = $this->getPackagedMedicinalProduct(); + foreach($validationRules[self::FIELD_PACKAGED_MEDICINAL_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_PACKAGED_MEDICINAL_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGED_MEDICINAL_PRODUCT])) { + $errs[self::FIELD_PACKAGED_MEDICINAL_PRODUCT] = []; + } + $errs[self::FIELD_PACKAGED_MEDICINAL_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAEDIATRIC_USE_INDICATOR])) { + $v = $this->getPaediatricUseIndicator(); + foreach($validationRules[self::FIELD_PAEDIATRIC_USE_INDICATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_PAEDIATRIC_USE_INDICATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAEDIATRIC_USE_INDICATOR])) { + $errs[self::FIELD_PAEDIATRIC_USE_INDICATOR] = []; + } + $errs[self::FIELD_PAEDIATRIC_USE_INDICATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHARMACEUTICAL_PRODUCT])) { + $v = $this->getPharmaceuticalProduct(); + foreach($validationRules[self::FIELD_PHARMACEUTICAL_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_PHARMACEUTICAL_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHARMACEUTICAL_PRODUCT])) { + $errs[self::FIELD_PHARMACEUTICAL_PRODUCT] = []; + } + $errs[self::FIELD_PHARMACEUTICAL_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_CLASSIFICATION])) { + $v = $this->getProductClassification(); + foreach($validationRules[self::FIELD_PRODUCT_CLASSIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_PRODUCT_CLASSIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_CLASSIFICATION])) { + $errs[self::FIELD_PRODUCT_CLASSIFICATION] = []; + } + $errs[self::FIELD_PRODUCT_CLASSIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_DESIGNATION])) { + $v = $this->getSpecialDesignation(); + foreach($validationRules[self::FIELD_SPECIAL_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_SPECIAL_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_DESIGNATION])) { + $errs[self::FIELD_SPECIAL_DESIGNATION] = []; + } + $errs[self::FIELD_SPECIAL_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_MEASURES])) { + $v = $this->getSpecialMeasures(); + foreach($validationRules[self::FIELD_SPECIAL_MEASURES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_SPECIAL_MEASURES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_MEASURES])) { + $errs[self::FIELD_SPECIAL_MEASURES] = []; + } + $errs[self::FIELD_SPECIAL_MEASURES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorization.php index 2ce94e6fc9..3a894909cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -308,7 +308,7 @@ class FHIRMedicinalProductAuthorization extends FHIRDomainResource implements PH * Validation map for fields in type MedicinalProductAuthorization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductAuthorization Constructor @@ -1232,12 +1232,403 @@ public function setValidityPeriod(FHIRPeriod $validityPeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCountry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COUNTRY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDataExclusivityPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateOfFirstAuthorization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getHolder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HOLDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInternationalBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTERNATIONAL_BIRTH_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdictionalAuthorization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTIONAL_AUTHORIZATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLegalBasis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LEGAL_BASIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRegulator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REGULATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getRestoreDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESTORE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidityPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDITY_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COUNTRY])) { + $v = $this->getCountry(); + foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_COUNTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY])) { + $errs[self::FIELD_COUNTRY] = []; + } + $errs[self::FIELD_COUNTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_EXCLUSIVITY_PERIOD])) { + $v = $this->getDataExclusivityPeriod(); + foreach($validationRules[self::FIELD_DATA_EXCLUSIVITY_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_DATA_EXCLUSIVITY_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD])) { + $errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD] = []; + } + $errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])) { + $v = $this->getDateOfFirstAuthorization(); + foreach($validationRules[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_DATE_OF_FIRST_AUTHORIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])) { + $errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] = []; + } + $errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HOLDER])) { + $v = $this->getHolder(); + foreach($validationRules[self::FIELD_HOLDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_HOLDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HOLDER])) { + $errs[self::FIELD_HOLDER] = []; + } + $errs[self::FIELD_HOLDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERNATIONAL_BIRTH_DATE])) { + $v = $this->getInternationalBirthDate(); + foreach($validationRules[self::FIELD_INTERNATIONAL_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_INTERNATIONAL_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERNATIONAL_BIRTH_DATE])) { + $errs[self::FIELD_INTERNATIONAL_BIRTH_DATE] = []; + } + $errs[self::FIELD_INTERNATIONAL_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTIONAL_AUTHORIZATION])) { + $v = $this->getJurisdictionalAuthorization(); + foreach($validationRules[self::FIELD_JURISDICTIONAL_AUTHORIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_JURISDICTIONAL_AUTHORIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTIONAL_AUTHORIZATION])) { + $errs[self::FIELD_JURISDICTIONAL_AUTHORIZATION] = []; + } + $errs[self::FIELD_JURISDICTIONAL_AUTHORIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEGAL_BASIS])) { + $v = $this->getLegalBasis(); + foreach($validationRules[self::FIELD_LEGAL_BASIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_LEGAL_BASIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEGAL_BASIS])) { + $errs[self::FIELD_LEGAL_BASIS] = []; + } + $errs[self::FIELD_LEGAL_BASIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REGULATOR])) { + $v = $this->getRegulator(); + foreach($validationRules[self::FIELD_REGULATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_REGULATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REGULATOR])) { + $errs[self::FIELD_REGULATOR] = []; + } + $errs[self::FIELD_REGULATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESTORE_DATE])) { + $v = $this->getRestoreDate(); + foreach($validationRules[self::FIELD_RESTORE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_RESTORE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESTORE_DATE])) { + $errs[self::FIELD_RESTORE_DATE] = []; + } + $errs[self::FIELD_RESTORE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_DATE])) { + $v = $this->getStatusDate(); + foreach($validationRules[self::FIELD_STATUS_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_STATUS_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_DATE])) { + $errs[self::FIELD_STATUS_DATE] = []; + } + $errs[self::FIELD_STATUS_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDITY_PERIOD])) { + $v = $this->getValidityPeriod(); + foreach($validationRules[self::FIELD_VALIDITY_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_VALIDITY_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDITY_PERIOD])) { + $errs[self::FIELD_VALIDITY_PERIOD] = []; + } + $errs[self::FIELD_VALIDITY_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindication.php index a9ac9b8a32..b98950dbaf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -179,7 +179,7 @@ class FHIRMedicinalProductContraindication extends FHIRDomainResource implements * Validation map for fields in type MedicinalProductContraindication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductContraindication Constructor @@ -682,12 +682,252 @@ public function setTherapeuticIndication(array $therapeuticIndication = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getComorbidity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMORBIDITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisease())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISEASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiseaseStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISEASE_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOtherTherapy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OTHER_THERAPY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPopulation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POPULATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTherapeuticIndication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_THERAPEUTIC_INDICATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_COMORBIDITY])) { + $v = $this->getComorbidity(); + foreach($validationRules[self::FIELD_COMORBIDITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_CONTRAINDICATION, self::FIELD_COMORBIDITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMORBIDITY])) { + $errs[self::FIELD_COMORBIDITY] = []; + } + $errs[self::FIELD_COMORBIDITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISEASE])) { + $v = $this->getDisease(); + foreach($validationRules[self::FIELD_DISEASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_CONTRAINDICATION, self::FIELD_DISEASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISEASE])) { + $errs[self::FIELD_DISEASE] = []; + } + $errs[self::FIELD_DISEASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISEASE_STATUS])) { + $v = $this->getDiseaseStatus(); + foreach($validationRules[self::FIELD_DISEASE_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_CONTRAINDICATION, self::FIELD_DISEASE_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISEASE_STATUS])) { + $errs[self::FIELD_DISEASE_STATUS] = []; + } + $errs[self::FIELD_DISEASE_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OTHER_THERAPY])) { + $v = $this->getOtherTherapy(); + foreach($validationRules[self::FIELD_OTHER_THERAPY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_CONTRAINDICATION, self::FIELD_OTHER_THERAPY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OTHER_THERAPY])) { + $errs[self::FIELD_OTHER_THERAPY] = []; + } + $errs[self::FIELD_OTHER_THERAPY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_CONTRAINDICATION, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_CONTRAINDICATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_THERAPEUTIC_INDICATION])) { + $v = $this->getTherapeuticIndication(); + foreach($validationRules[self::FIELD_THERAPEUTIC_INDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_CONTRAINDICATION, self::FIELD_THERAPEUTIC_INDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_THERAPEUTIC_INDICATION])) { + $errs[self::FIELD_THERAPEUTIC_INDICATION] = []; + } + $errs[self::FIELD_THERAPEUTIC_INDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndication.php index 3d7e83dc65..30a5fb3693 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -204,7 +204,7 @@ class FHIRMedicinalProductIndication extends FHIRDomainResource implements PHPFH * Validation map for fields in type MedicinalProductIndication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductIndication Constructor @@ -781,12 +781,286 @@ public function setUndesirableEffect(array $undesirableEffect = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getComorbidity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMORBIDITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDiseaseStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISEASE_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiseaseSymptomProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISEASE_SYMPTOM_PROCEDURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIntendedEffect())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENDED_EFFECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOtherTherapy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OTHER_THERAPY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPopulation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POPULATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUndesirableEffect())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UNDESIRABLE_EFFECT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_COMORBIDITY])) { + $v = $this->getComorbidity(); + foreach($validationRules[self::FIELD_COMORBIDITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION, self::FIELD_COMORBIDITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMORBIDITY])) { + $errs[self::FIELD_COMORBIDITY] = []; + } + $errs[self::FIELD_COMORBIDITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISEASE_STATUS])) { + $v = $this->getDiseaseStatus(); + foreach($validationRules[self::FIELD_DISEASE_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION, self::FIELD_DISEASE_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISEASE_STATUS])) { + $errs[self::FIELD_DISEASE_STATUS] = []; + } + $errs[self::FIELD_DISEASE_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISEASE_SYMPTOM_PROCEDURE])) { + $v = $this->getDiseaseSymptomProcedure(); + foreach($validationRules[self::FIELD_DISEASE_SYMPTOM_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION, self::FIELD_DISEASE_SYMPTOM_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISEASE_SYMPTOM_PROCEDURE])) { + $errs[self::FIELD_DISEASE_SYMPTOM_PROCEDURE] = []; + } + $errs[self::FIELD_DISEASE_SYMPTOM_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENDED_EFFECT])) { + $v = $this->getIntendedEffect(); + foreach($validationRules[self::FIELD_INTENDED_EFFECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION, self::FIELD_INTENDED_EFFECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENDED_EFFECT])) { + $errs[self::FIELD_INTENDED_EFFECT] = []; + } + $errs[self::FIELD_INTENDED_EFFECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OTHER_THERAPY])) { + $v = $this->getOtherTherapy(); + foreach($validationRules[self::FIELD_OTHER_THERAPY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION, self::FIELD_OTHER_THERAPY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OTHER_THERAPY])) { + $errs[self::FIELD_OTHER_THERAPY] = []; + } + $errs[self::FIELD_OTHER_THERAPY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNDESIRABLE_EFFECT])) { + $v = $this->getUndesirableEffect(); + foreach($validationRules[self::FIELD_UNDESIRABLE_EFFECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INDICATION, self::FIELD_UNDESIRABLE_EFFECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNDESIRABLE_EFFECT])) { + $errs[self::FIELD_UNDESIRABLE_EFFECT] = []; + } + $errs[self::FIELD_UNDESIRABLE_EFFECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredient.php index de77cc083b..05601ca6fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -164,7 +164,7 @@ class FHIRMedicinalProductIngredient extends FHIRDomainResource implements PHPFH * Validation map for fields in type MedicinalProductIngredient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductIngredient Constructor @@ -529,12 +529,229 @@ public function setSubstance(FHIRMedicinalProductIngredientSubstance $substance } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllergenicIndicator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLERGENIC_INDICATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getManufacturer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANUFACTURER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecifiedSubstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIFIED_SUBSTANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLERGENIC_INDICATOR])) { + $v = $this->getAllergenicIndicator(); + foreach($validationRules[self::FIELD_ALLERGENIC_INDICATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT, self::FIELD_ALLERGENIC_INDICATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLERGENIC_INDICATOR])) { + $errs[self::FIELD_ALLERGENIC_INDICATOR] = []; + } + $errs[self::FIELD_ALLERGENIC_INDICATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIFIED_SUBSTANCE])) { + $v = $this->getSpecifiedSubstance(); + foreach($validationRules[self::FIELD_SPECIFIED_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT, self::FIELD_SPECIFIED_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIFIED_SUBSTANCE])) { + $errs[self::FIELD_SPECIFIED_SUBSTANCE] = []; + } + $errs[self::FIELD_SPECIFIED_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INGREDIENT, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteraction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteraction.php index 28530d9775..cae2ce5cef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -181,7 +181,7 @@ class FHIRMedicinalProductInteraction extends FHIRDomainResource implements PHPF * Validation map for fields in type MedicinalProductInteraction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductInteraction Constructor @@ -596,12 +596,246 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffect())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIncidence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INCIDENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInteractant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERACTANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGEMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INTERACTION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECT])) { + $v = $this->getEffect(); + foreach($validationRules[self::FIELD_EFFECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INTERACTION, self::FIELD_EFFECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECT])) { + $errs[self::FIELD_EFFECT] = []; + } + $errs[self::FIELD_EFFECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCIDENCE])) { + $v = $this->getIncidence(); + foreach($validationRules[self::FIELD_INCIDENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INTERACTION, self::FIELD_INCIDENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCIDENCE])) { + $errs[self::FIELD_INCIDENCE] = []; + } + $errs[self::FIELD_INCIDENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERACTANT])) { + $v = $this->getInteractant(); + foreach($validationRules[self::FIELD_INTERACTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INTERACTION, self::FIELD_INTERACTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERACTANT])) { + $errs[self::FIELD_INTERACTANT] = []; + } + $errs[self::FIELD_INTERACTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGEMENT])) { + $v = $this->getManagement(); + foreach($validationRules[self::FIELD_MANAGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INTERACTION, self::FIELD_MANAGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGEMENT])) { + $errs[self::FIELD_MANAGEMENT] = []; + } + $errs[self::FIELD_MANAGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INTERACTION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_INTERACTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufactured.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufactured.php index 095e80ec0a..ef5eaf0ffc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufactured.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufactured.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -183,7 +183,7 @@ class FHIRMedicinalProductManufactured extends FHIRDomainResource implements PHP * Validation map for fields in type MedicinalProductManufactured * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductManufactured Constructor @@ -622,12 +622,248 @@ public function setUnitOfPresentation(FHIRCodeableConcept $unitOfPresentation = } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManufacturedDoseForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURED_DOSE_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getManufacturer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANUFACTURER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOtherCharacteristics())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OTHER_CHARACTERISTICS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPhysicalCharacteristics())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHYSICAL_CHARACTERISTICS] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitOfPresentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_OF_PRESENTATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_MANUFACTURED, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURED_DOSE_FORM])) { + $v = $this->getManufacturedDoseForm(); + foreach($validationRules[self::FIELD_MANUFACTURED_DOSE_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_MANUFACTURED, self::FIELD_MANUFACTURED_DOSE_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURED_DOSE_FORM])) { + $errs[self::FIELD_MANUFACTURED_DOSE_FORM] = []; + } + $errs[self::FIELD_MANUFACTURED_DOSE_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_MANUFACTURED, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OTHER_CHARACTERISTICS])) { + $v = $this->getOtherCharacteristics(); + foreach($validationRules[self::FIELD_OTHER_CHARACTERISTICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_MANUFACTURED, self::FIELD_OTHER_CHARACTERISTICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OTHER_CHARACTERISTICS])) { + $errs[self::FIELD_OTHER_CHARACTERISTICS] = []; + } + $errs[self::FIELD_OTHER_CHARACTERISTICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHYSICAL_CHARACTERISTICS])) { + $v = $this->getPhysicalCharacteristics(); + foreach($validationRules[self::FIELD_PHYSICAL_CHARACTERISTICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_MANUFACTURED, self::FIELD_PHYSICAL_CHARACTERISTICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHYSICAL_CHARACTERISTICS])) { + $errs[self::FIELD_PHYSICAL_CHARACTERISTICS] = []; + } + $errs[self::FIELD_PHYSICAL_CHARACTERISTICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_MANUFACTURED, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_OF_PRESENTATION])) { + $v = $this->getUnitOfPresentation(); + foreach($validationRules[self::FIELD_UNIT_OF_PRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_MANUFACTURED, self::FIELD_UNIT_OF_PRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_OF_PRESENTATION])) { + $errs[self::FIELD_UNIT_OF_PRESENTATION] = []; + } + $errs[self::FIELD_UNIT_OF_PRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackaged.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackaged.php index f1f6685af6..36e2ba9317 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackaged.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackaged.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -203,7 +203,7 @@ class FHIRMedicinalProductPackaged extends FHIRDomainResource implements PHPFHIR * Validation map for fields in type MedicinalProductPackaged * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PACKAGE_ITEM => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -836,12 +836,288 @@ public function setSubject(array $subject = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBatchIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BATCH_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLegalStatusOfSupply())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getManufacturer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANUFACTURER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMarketingAuthorization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MARKETING_AUTHORIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMarketingStatus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MARKETING_STATUS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPackageItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PACKAGE_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_BATCH_IDENTIFIER])) { + $v = $this->getBatchIdentifier(); + foreach($validationRules[self::FIELD_BATCH_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED, self::FIELD_BATCH_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BATCH_IDENTIFIER])) { + $errs[self::FIELD_BATCH_IDENTIFIER] = []; + } + $errs[self::FIELD_BATCH_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEGAL_STATUS_OF_SUPPLY])) { + $v = $this->getLegalStatusOfSupply(); + foreach($validationRules[self::FIELD_LEGAL_STATUS_OF_SUPPLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED, self::FIELD_LEGAL_STATUS_OF_SUPPLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY])) { + $errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY] = []; + } + $errs[self::FIELD_LEGAL_STATUS_OF_SUPPLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MARKETING_AUTHORIZATION])) { + $v = $this->getMarketingAuthorization(); + foreach($validationRules[self::FIELD_MARKETING_AUTHORIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED, self::FIELD_MARKETING_AUTHORIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MARKETING_AUTHORIZATION])) { + $errs[self::FIELD_MARKETING_AUTHORIZATION] = []; + } + $errs[self::FIELD_MARKETING_AUTHORIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MARKETING_STATUS])) { + $v = $this->getMarketingStatus(); + foreach($validationRules[self::FIELD_MARKETING_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED, self::FIELD_MARKETING_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MARKETING_STATUS])) { + $errs[self::FIELD_MARKETING_STATUS] = []; + } + $errs[self::FIELD_MARKETING_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE_ITEM])) { + $v = $this->getPackageItem(); + foreach($validationRules[self::FIELD_PACKAGE_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED, self::FIELD_PACKAGE_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE_ITEM])) { + $errs[self::FIELD_PACKAGE_ITEM] = []; + } + $errs[self::FIELD_PACKAGE_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PACKAGED, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceutical.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceutical.php index 287a3b2119..edc9e23eb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceutical.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceutical.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -175,7 +175,7 @@ class FHIRMedicinalProductPharmaceutical extends FHIRDomainResource implements P * Validation map for fields in type MedicinalProductPharmaceutical * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ROUTE_OF_ADMINISTRATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -670,12 +670,252 @@ public function setUnitOfPresentation(FHIRCodeableConcept $unitOfPresentation = } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdministrableDoseForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADMINISTRABLE_DOSE_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCharacteristics())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHARACTERISTICS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRouteOfAdministration())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROUTE_OF_ADMINISTRATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitOfPresentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_OF_PRESENTATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADMINISTRABLE_DOSE_FORM])) { + $v = $this->getAdministrableDoseForm(); + foreach($validationRules[self::FIELD_ADMINISTRABLE_DOSE_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL, self::FIELD_ADMINISTRABLE_DOSE_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMINISTRABLE_DOSE_FORM])) { + $errs[self::FIELD_ADMINISTRABLE_DOSE_FORM] = []; + } + $errs[self::FIELD_ADMINISTRABLE_DOSE_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTICS])) { + $v = $this->getCharacteristics(); + foreach($validationRules[self::FIELD_CHARACTERISTICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL, self::FIELD_CHARACTERISTICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTICS])) { + $errs[self::FIELD_CHARACTERISTICS] = []; + } + $errs[self::FIELD_CHARACTERISTICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE_OF_ADMINISTRATION])) { + $v = $this->getRouteOfAdministration(); + foreach($validationRules[self::FIELD_ROUTE_OF_ADMINISTRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL, self::FIELD_ROUTE_OF_ADMINISTRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE_OF_ADMINISTRATION])) { + $errs[self::FIELD_ROUTE_OF_ADMINISTRATION] = []; + } + $errs[self::FIELD_ROUTE_OF_ADMINISTRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_OF_PRESENTATION])) { + $v = $this->getUnitOfPresentation(); + foreach($validationRules[self::FIELD_UNIT_OF_PRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_PHARMACEUTICAL, self::FIELD_UNIT_OF_PRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_OF_PRESENTATION])) { + $errs[self::FIELD_UNIT_OF_PRESENTATION] = []; + } + $errs[self::FIELD_UNIT_OF_PRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffect.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffect.php index 8aa66c2cf1..8eaad0fdd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffect.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffect.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRMedicinalProductUndesirableEffect extends FHIRDomainResource implement * Validation map for fields in type MedicinalProductUndesirableEffect * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicinalProductUndesirableEffect Constructor @@ -466,12 +466,212 @@ public function setSymptomConditionEffect(FHIRCodeableConcept $symptomConditionE } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClassification())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASSIFICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrequencyOfOccurrence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FREQUENCY_OF_OCCURRENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPopulation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POPULATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSymptomConditionEffect())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYMPTOM_CONDITION_EFFECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLASSIFICATION])) { + $v = $this->getClassification(); + foreach($validationRules[self::FIELD_CLASSIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_UNDESIRABLE_EFFECT, self::FIELD_CLASSIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASSIFICATION])) { + $errs[self::FIELD_CLASSIFICATION] = []; + } + $errs[self::FIELD_CLASSIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FREQUENCY_OF_OCCURRENCE])) { + $v = $this->getFrequencyOfOccurrence(); + foreach($validationRules[self::FIELD_FREQUENCY_OF_OCCURRENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_UNDESIRABLE_EFFECT, self::FIELD_FREQUENCY_OF_OCCURRENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FREQUENCY_OF_OCCURRENCE])) { + $errs[self::FIELD_FREQUENCY_OF_OCCURRENCE] = []; + } + $errs[self::FIELD_FREQUENCY_OF_OCCURRENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_UNDESIRABLE_EFFECT, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_UNDESIRABLE_EFFECT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYMPTOM_CONDITION_EFFECT])) { + $v = $this->getSymptomConditionEffect(); + foreach($validationRules[self::FIELD_SYMPTOM_CONDITION_EFFECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_UNDESIRABLE_EFFECT, self::FIELD_SYMPTOM_CONDITION_EFFECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYMPTOM_CONDITION_EFFECT])) { + $errs[self::FIELD_SYMPTOM_CONDITION_EFFECT] = []; + } + $errs[self::FIELD_SYMPTOM_CONDITION_EFFECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php index 6fdebcec93..d2cb3b2dd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -479,7 +479,7 @@ class FHIRMessageDefinition extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type MessageDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageDefinition Constructor @@ -2343,12 +2343,566 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAllowedResponse())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALLOWED_RESPONSE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFocus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOCUS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGraph())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GRAPH, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getResponseRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLOWED_RESPONSE])) { + $v = $this->getAllowedResponse(); + foreach($validationRules[self::FIELD_ALLOWED_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_ALLOWED_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_RESPONSE])) { + $errs[self::FIELD_ALLOWED_RESPONSE] = []; + } + $errs[self::FIELD_ALLOWED_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_CODING])) { + $v = $this->getEventCoding(); + foreach($validationRules[self::FIELD_EVENT_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_EVENT_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_CODING])) { + $errs[self::FIELD_EVENT_CODING] = []; + } + $errs[self::FIELD_EVENT_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_URI])) { + $v = $this->getEventUri(); + foreach($validationRules[self::FIELD_EVENT_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_EVENT_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_URI])) { + $errs[self::FIELD_EVENT_URI] = []; + } + $errs[self::FIELD_EVENT_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GRAPH])) { + $v = $this->getGraph(); + foreach($validationRules[self::FIELD_GRAPH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_GRAPH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GRAPH])) { + $errs[self::FIELD_GRAPH] = []; + } + $errs[self::FIELD_GRAPH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE_REQUIRED])) { + $v = $this->getResponseRequired(); + foreach($validationRules[self::FIELD_RESPONSE_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_RESPONSE_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE_REQUIRED])) { + $errs[self::FIELD_RESPONSE_REQUIRED] = []; + } + $errs[self::FIELD_RESPONSE_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php index 9cf955e3af..cbe3cf16d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -263,7 +263,7 @@ class FHIRMessageHeader extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type MessageHeader * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeader Constructor @@ -920,12 +920,331 @@ public function setSource(FHIRMessageHeaderSource $source = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDestination())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESTINATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_URI] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFocus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOCUS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_CODING])) { + $v = $this->getEventCoding(); + foreach($validationRules[self::FIELD_EVENT_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_EVENT_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_CODING])) { + $errs[self::FIELD_EVENT_CODING] = []; + } + $errs[self::FIELD_EVENT_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_URI])) { + $v = $this->getEventUri(); + foreach($validationRules[self::FIELD_EVENT_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_EVENT_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_URI])) { + $errs[self::FIELD_EVENT_URI] = []; + } + $errs[self::FIELD_EVENT_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENDER])) { + $v = $this->getSender(); + foreach($validationRules[self::FIELD_SENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_SENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENDER])) { + $errs[self::FIELD_SENDER] = []; + } + $errs[self::FIELD_SENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMolecularSequence.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMolecularSequence.php index fc021dbe85..017e35f8cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMolecularSequence.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMolecularSequence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -299,7 +299,7 @@ class FHIRMolecularSequence extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type MolecularSequence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMolecularSequence Constructor @@ -1263,12 +1263,407 @@ public function setVariant(array $variant = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCoordinateSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COORDINATE_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getObservedSeq())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVED_SEQ] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPointer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POINTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getQuality())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUALITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReadCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_READ_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceSeq())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_SEQ] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRepository())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPOSITORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecimen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStructureVariant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRUCTURE_VARIANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVariant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VARIANT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_COORDINATE_SYSTEM])) { + $v = $this->getCoordinateSystem(); + foreach($validationRules[self::FIELD_COORDINATE_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_COORDINATE_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COORDINATE_SYSTEM])) { + $errs[self::FIELD_COORDINATE_SYSTEM] = []; + } + $errs[self::FIELD_COORDINATE_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OBSERVED_SEQ])) { + $v = $this->getObservedSeq(); + foreach($validationRules[self::FIELD_OBSERVED_SEQ] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_OBSERVED_SEQ, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBSERVED_SEQ])) { + $errs[self::FIELD_OBSERVED_SEQ] = []; + } + $errs[self::FIELD_OBSERVED_SEQ][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POINTER])) { + $v = $this->getPointer(); + foreach($validationRules[self::FIELD_POINTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_POINTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POINTER])) { + $errs[self::FIELD_POINTER] = []; + } + $errs[self::FIELD_POINTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALITY])) { + $v = $this->getQuality(); + foreach($validationRules[self::FIELD_QUALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_QUALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALITY])) { + $errs[self::FIELD_QUALITY] = []; + } + $errs[self::FIELD_QUALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_READ_COVERAGE])) { + $v = $this->getReadCoverage(); + foreach($validationRules[self::FIELD_READ_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_READ_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_READ_COVERAGE])) { + $errs[self::FIELD_READ_COVERAGE] = []; + } + $errs[self::FIELD_READ_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_SEQ])) { + $v = $this->getReferenceSeq(); + foreach($validationRules[self::FIELD_REFERENCE_SEQ] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_REFERENCE_SEQ, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_SEQ])) { + $errs[self::FIELD_REFERENCE_SEQ] = []; + } + $errs[self::FIELD_REFERENCE_SEQ][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPOSITORY])) { + $v = $this->getRepository(); + foreach($validationRules[self::FIELD_REPOSITORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_REPOSITORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPOSITORY])) { + $errs[self::FIELD_REPOSITORY] = []; + } + $errs[self::FIELD_REPOSITORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRUCTURE_VARIANT])) { + $v = $this->getStructureVariant(); + foreach($validationRules[self::FIELD_STRUCTURE_VARIANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_STRUCTURE_VARIANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRUCTURE_VARIANT])) { + $errs[self::FIELD_STRUCTURE_VARIANT] = []; + } + $errs[self::FIELD_STRUCTURE_VARIANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIANT])) { + $v = $this->getVariant(); + foreach($validationRules[self::FIELD_VARIANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MOLECULAR_SEQUENCE, self::FIELD_VARIANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIANT])) { + $errs[self::FIELD_VARIANT] = []; + } + $errs[self::FIELD_VARIANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php index bfc4623bf2..7a252517b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -288,7 +288,7 @@ class FHIRNamingSystem extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type NamingSystem * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_UNIQUE_ID => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1210,12 +1210,352 @@ public function setUseContext(array $useContext = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUniqueId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UNIQUE_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIQUE_ID])) { + $v = $this->getUniqueId(); + foreach($validationRules[self::FIELD_UNIQUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_UNIQUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIQUE_ID])) { + $errs[self::FIELD_UNIQUE_ID] = []; + } + $errs[self::FIELD_UNIQUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php index 0d1016fef2..8d66f04513 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -337,7 +337,7 @@ class FHIRNutritionOrder extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type NutritionOrder * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrder Constructor @@ -1566,12 +1566,430 @@ public function setSupplement(array $supplement = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAllergyIntolerance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALLERGY_INTOLERANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnteralFormula())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERAL_FORMULA] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExcludeFoodModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCLUDE_FOOD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFoodPreferenceModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOOD_PREFERENCE_MODIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiates())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_URI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOralDiet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORAL_DIET] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupplement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPLEMENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALLERGY_INTOLERANCE])) { + $v = $this->getAllergyIntolerance(); + foreach($validationRules[self::FIELD_ALLERGY_INTOLERANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ALLERGY_INTOLERANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLERGY_INTOLERANCE])) { + $errs[self::FIELD_ALLERGY_INTOLERANCE] = []; + } + $errs[self::FIELD_ALLERGY_INTOLERANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERAL_FORMULA])) { + $v = $this->getEnteralFormula(); + foreach($validationRules[self::FIELD_ENTERAL_FORMULA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ENTERAL_FORMULA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERAL_FORMULA])) { + $errs[self::FIELD_ENTERAL_FORMULA] = []; + } + $errs[self::FIELD_ENTERAL_FORMULA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE_FOOD_MODIFIER])) { + $v = $this->getExcludeFoodModifier(); + foreach($validationRules[self::FIELD_EXCLUDE_FOOD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_EXCLUDE_FOOD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE_FOOD_MODIFIER])) { + $errs[self::FIELD_EXCLUDE_FOOD_MODIFIER] = []; + } + $errs[self::FIELD_EXCLUDE_FOOD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOOD_PREFERENCE_MODIFIER])) { + $v = $this->getFoodPreferenceModifier(); + foreach($validationRules[self::FIELD_FOOD_PREFERENCE_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_FOOD_PREFERENCE_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOOD_PREFERENCE_MODIFIER])) { + $errs[self::FIELD_FOOD_PREFERENCE_MODIFIER] = []; + } + $errs[self::FIELD_FOOD_PREFERENCE_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES])) { + $v = $this->getInstantiates(); + foreach($validationRules[self::FIELD_INSTANTIATES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_INSTANTIATES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES])) { + $errs[self::FIELD_INSTANTIATES] = []; + } + $errs[self::FIELD_INSTANTIATES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORAL_DIET])) { + $v = $this->getOralDiet(); + foreach($validationRules[self::FIELD_ORAL_DIET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ORAL_DIET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORAL_DIET])) { + $errs[self::FIELD_ORAL_DIET] = []; + } + $errs[self::FIELD_ORAL_DIET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERER])) { + $v = $this->getOrderer(); + foreach($validationRules[self::FIELD_ORDERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ORDERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERER])) { + $errs[self::FIELD_ORDERER] = []; + } + $errs[self::FIELD_ORDERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLEMENT])) { + $v = $this->getSupplement(); + foreach($validationRules[self::FIELD_SUPPLEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_SUPPLEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLEMENT])) { + $errs[self::FIELD_SUPPLEMENT] = []; + } + $errs[self::FIELD_SUPPLEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservation.php index 9914979a3b..529eaf3ecb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -644,7 +644,7 @@ class FHIRObservation extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type Observation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservation Constructor @@ -2908,12 +2908,776 @@ public function setValueTime($valueTime = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPONENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDataAbsentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ABSENT_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDerivedFrom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DERIVED_FROM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFocus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOCUS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getHasMember())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HAS_MEMBER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInterpretation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERPRETATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReferenceRange())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_RANGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecimen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPONENT])) { + $v = $this->getComponent(); + foreach($validationRules[self::FIELD_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPONENT])) { + $errs[self::FIELD_COMPONENT] = []; + } + $errs[self::FIELD_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_ABSENT_REASON])) { + $v = $this->getDataAbsentReason(); + foreach($validationRules[self::FIELD_DATA_ABSENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_DATA_ABSENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_ABSENT_REASON])) { + $errs[self::FIELD_DATA_ABSENT_REASON] = []; + } + $errs[self::FIELD_DATA_ABSENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DERIVED_FROM])) { + $v = $this->getDerivedFrom(); + foreach($validationRules[self::FIELD_DERIVED_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_DERIVED_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DERIVED_FROM])) { + $errs[self::FIELD_DERIVED_FROM] = []; + } + $errs[self::FIELD_DERIVED_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_INSTANT])) { + $v = $this->getEffectiveInstant(); + foreach($validationRules[self::FIELD_EFFECTIVE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_EFFECTIVE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_INSTANT])) { + $errs[self::FIELD_EFFECTIVE_INSTANT] = []; + } + $errs[self::FIELD_EFFECTIVE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_TIMING])) { + $v = $this->getEffectiveTiming(); + foreach($validationRules[self::FIELD_EFFECTIVE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_EFFECTIVE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_TIMING])) { + $errs[self::FIELD_EFFECTIVE_TIMING] = []; + } + $errs[self::FIELD_EFFECTIVE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HAS_MEMBER])) { + $v = $this->getHasMember(); + foreach($validationRules[self::FIELD_HAS_MEMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_HAS_MEMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HAS_MEMBER])) { + $errs[self::FIELD_HAS_MEMBER] = []; + } + $errs[self::FIELD_HAS_MEMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERPRETATION])) { + $v = $this->getInterpretation(); + foreach($validationRules[self::FIELD_INTERPRETATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_INTERPRETATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERPRETATION])) { + $errs[self::FIELD_INTERPRETATION] = []; + } + $errs[self::FIELD_INTERPRETATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_RANGE])) { + $v = $this->getReferenceRange(); + foreach($validationRules[self::FIELD_REFERENCE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_REFERENCE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_RANGE])) { + $errs[self::FIELD_REFERENCE_RANGE] = []; + } + $errs[self::FIELD_REFERENCE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservationDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservationDefinition.php index abe154a314..03d6b287ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservationDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservationDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -263,7 +263,7 @@ class FHIRObservationDefinition extends FHIRDomainResource implements PHPFHIRCon * Validation map for fields in type ObservationDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationDefinition Constructor @@ -1029,12 +1029,352 @@ public function setValidCodedValueSet(FHIRReference $validCodedValueSet = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbnormalCodedValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABNORMAL_CODED_VALUE_SET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCriticalCodedValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITICAL_CODED_VALUE_SET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultipleResultsAllowed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_RESULTS_ALLOWED] = $fieldErrs; + } + } + if (null !== ($v = $this->getNormalCodedValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NORMAL_CODED_VALUE_SET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPermittedDataType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERMITTED_DATA_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPreferredReportName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFERRED_REPORT_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getQualifiedInterval())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUALIFIED_INTERVAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantitativeDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITATIVE_DETAILS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidCodedValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALID_CODED_VALUE_SET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABNORMAL_CODED_VALUE_SET])) { + $v = $this->getAbnormalCodedValueSet(); + foreach($validationRules[self::FIELD_ABNORMAL_CODED_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_ABNORMAL_CODED_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABNORMAL_CODED_VALUE_SET])) { + $errs[self::FIELD_ABNORMAL_CODED_VALUE_SET] = []; + } + $errs[self::FIELD_ABNORMAL_CODED_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITICAL_CODED_VALUE_SET])) { + $v = $this->getCriticalCodedValueSet(); + foreach($validationRules[self::FIELD_CRITICAL_CODED_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_CRITICAL_CODED_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITICAL_CODED_VALUE_SET])) { + $errs[self::FIELD_CRITICAL_CODED_VALUE_SET] = []; + } + $errs[self::FIELD_CRITICAL_CODED_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_RESULTS_ALLOWED])) { + $v = $this->getMultipleResultsAllowed(); + foreach($validationRules[self::FIELD_MULTIPLE_RESULTS_ALLOWED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_MULTIPLE_RESULTS_ALLOWED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_RESULTS_ALLOWED])) { + $errs[self::FIELD_MULTIPLE_RESULTS_ALLOWED] = []; + } + $errs[self::FIELD_MULTIPLE_RESULTS_ALLOWED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NORMAL_CODED_VALUE_SET])) { + $v = $this->getNormalCodedValueSet(); + foreach($validationRules[self::FIELD_NORMAL_CODED_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_NORMAL_CODED_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NORMAL_CODED_VALUE_SET])) { + $errs[self::FIELD_NORMAL_CODED_VALUE_SET] = []; + } + $errs[self::FIELD_NORMAL_CODED_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERMITTED_DATA_TYPE])) { + $v = $this->getPermittedDataType(); + foreach($validationRules[self::FIELD_PERMITTED_DATA_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_PERMITTED_DATA_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERMITTED_DATA_TYPE])) { + $errs[self::FIELD_PERMITTED_DATA_TYPE] = []; + } + $errs[self::FIELD_PERMITTED_DATA_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFERRED_REPORT_NAME])) { + $v = $this->getPreferredReportName(); + foreach($validationRules[self::FIELD_PREFERRED_REPORT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_PREFERRED_REPORT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFERRED_REPORT_NAME])) { + $errs[self::FIELD_PREFERRED_REPORT_NAME] = []; + } + $errs[self::FIELD_PREFERRED_REPORT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFIED_INTERVAL])) { + $v = $this->getQualifiedInterval(); + foreach($validationRules[self::FIELD_QUALIFIED_INTERVAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_QUALIFIED_INTERVAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFIED_INTERVAL])) { + $errs[self::FIELD_QUALIFIED_INTERVAL] = []; + } + $errs[self::FIELD_QUALIFIED_INTERVAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITATIVE_DETAILS])) { + $v = $this->getQuantitativeDetails(); + foreach($validationRules[self::FIELD_QUANTITATIVE_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_QUANTITATIVE_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITATIVE_DETAILS])) { + $errs[self::FIELD_QUANTITATIVE_DETAILS] = []; + } + $errs[self::FIELD_QUANTITATIVE_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALID_CODED_VALUE_SET])) { + $v = $this->getValidCodedValueSet(); + foreach($validationRules[self::FIELD_VALID_CODED_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DEFINITION, self::FIELD_VALID_CODED_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALID_CODED_VALUE_SET])) { + $errs[self::FIELD_VALID_CODED_VALUE_SET] = []; + } + $errs[self::FIELD_VALID_CODED_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php index 2d8b6f21c5..82397bd553 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -487,7 +487,7 @@ class FHIROperationDefinition extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type OperationDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinition Constructor @@ -2329,12 +2329,577 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAffectsState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AFFECTS_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getInputProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INPUT_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getInstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutputProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTPUT_PROFILE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOverload())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OVERLOAD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AFFECTS_STATE])) { + $v = $this->getAffectsState(); + foreach($validationRules[self::FIELD_AFFECTS_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_AFFECTS_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AFFECTS_STATE])) { + $errs[self::FIELD_AFFECTS_STATE] = []; + } + $errs[self::FIELD_AFFECTS_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INPUT_PROFILE])) { + $v = $this->getInputProfile(); + foreach($validationRules[self::FIELD_INPUT_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_INPUT_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INPUT_PROFILE])) { + $errs[self::FIELD_INPUT_PROFILE] = []; + } + $errs[self::FIELD_INPUT_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTPUT_PROFILE])) { + $v = $this->getOutputProfile(); + foreach($validationRules[self::FIELD_OUTPUT_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_OUTPUT_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTPUT_PROFILE])) { + $errs[self::FIELD_OUTPUT_PROFILE] = []; + } + $errs[self::FIELD_OUTPUT_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OVERLOAD])) { + $v = $this->getOverload(); + foreach($validationRules[self::FIELD_OVERLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_OVERLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OVERLOAD])) { + $errs[self::FIELD_OVERLOAD] = []; + } + $errs[self::FIELD_OVERLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php index 085542446c..41d78e7218 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIROperationOutcome extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type OperationOutcome * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ISSUE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -223,12 +223,142 @@ public function setIssue(array $issue = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getIssue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ISSUE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ISSUE])) { + $v = $this->getIssue(); + foreach($validationRules[self::FIELD_ISSUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME, self::FIELD_ISSUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUE])) { + $errs[self::FIELD_ISSUE] = []; + } + $errs[self::FIELD_ISSUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganization.php index 7639efb8ef..f77545edbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -229,7 +229,7 @@ class FHIROrganization extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Organization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrganization Constructor @@ -1011,12 +1011,307 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAlias())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALIAS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliation.php index c3b991b937..7f13c24d5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -245,7 +245,7 @@ class FHIROrganizationAffiliation extends FHIRDomainResource implements PHPFHIRC * Validation map for fields in type OrganizationAffiliation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrganizationAffiliation Constructor @@ -1078,12 +1078,343 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getHealthcareService())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HEALTHCARE_SERVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNetwork())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NETWORK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getParticipatingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPATING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEALTHCARE_SERVICE])) { + $v = $this->getHealthcareService(); + foreach($validationRules[self::FIELD_HEALTHCARE_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_HEALTHCARE_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEALTHCARE_SERVICE])) { + $errs[self::FIELD_HEALTHCARE_SERVICE] = []; + } + $errs[self::FIELD_HEALTHCARE_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPATING_ORGANIZATION])) { + $v = $this->getParticipatingOrganization(); + foreach($validationRules[self::FIELD_PARTICIPATING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_PARTICIPATING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPATING_ORGANIZATION])) { + $errs[self::FIELD_PARTICIPATING_ORGANIZATION] = []; + } + $errs[self::FIELD_PARTICIPATING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_AFFILIATION, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPatient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPatient.php index 858cfa58a9..6987a08ae1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPatient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPatient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -339,7 +339,7 @@ class FHIRPatient extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Patient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatient Constructor @@ -1580,12 +1580,447 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCommunication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDeceasedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGeneralPractitioner())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GENERAL_PRACTITIONER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaritalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MARITAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultipleBirthBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultipleBirthInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION])) { + $v = $this->getCommunication(); + foreach($validationRules[self::FIELD_COMMUNICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_COMMUNICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION])) { + $errs[self::FIELD_COMMUNICATION] = []; + } + $errs[self::FIELD_COMMUNICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_BOOLEAN])) { + $v = $this->getDeceasedBoolean(); + foreach($validationRules[self::FIELD_DECEASED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_DECEASED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_BOOLEAN])) { + $errs[self::FIELD_DECEASED_BOOLEAN] = []; + } + $errs[self::FIELD_DECEASED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_DATE_TIME])) { + $v = $this->getDeceasedDateTime(); + foreach($validationRules[self::FIELD_DECEASED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_DECEASED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_DATE_TIME])) { + $errs[self::FIELD_DECEASED_DATE_TIME] = []; + } + $errs[self::FIELD_DECEASED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENERAL_PRACTITIONER])) { + $v = $this->getGeneralPractitioner(); + foreach($validationRules[self::FIELD_GENERAL_PRACTITIONER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_GENERAL_PRACTITIONER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENERAL_PRACTITIONER])) { + $errs[self::FIELD_GENERAL_PRACTITIONER] = []; + } + $errs[self::FIELD_GENERAL_PRACTITIONER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MARITAL_STATUS])) { + $v = $this->getMaritalStatus(); + foreach($validationRules[self::FIELD_MARITAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MARITAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MARITAL_STATUS])) { + $errs[self::FIELD_MARITAL_STATUS] = []; + } + $errs[self::FIELD_MARITAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $v = $this->getMultipleBirthBoolean(); + foreach($validationRules[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MULTIPLE_BIRTH_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = []; + } + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $v = $this->getMultipleBirthInteger(); + foreach($validationRules[self::FIELD_MULTIPLE_BIRTH_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MULTIPLE_BIRTH_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER] = []; + } + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php index e421b662e8..86f823fde1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -247,7 +247,7 @@ class FHIRPaymentNotice extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type PaymentNotice * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentNotice Constructor @@ -854,12 +854,329 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPayee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecipient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECIPIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE])) { + $v = $this->getPayee(); + foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_PAYEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE])) { + $errs[self::FIELD_PAYEE] = []; + } + $errs[self::FIELD_PAYEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT])) { + $v = $this->getPayment(); + foreach($validationRules[self::FIELD_PAYMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_PAYMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT])) { + $errs[self::FIELD_PAYMENT] = []; + } + $errs[self::FIELD_PAYMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_DATE])) { + $v = $this->getPaymentDate(); + foreach($validationRules[self::FIELD_PAYMENT_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_PAYMENT_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_DATE])) { + $errs[self::FIELD_PAYMENT_DATE] = []; + } + $errs[self::FIELD_PAYMENT_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_STATUS])) { + $v = $this->getPaymentStatus(); + foreach($validationRules[self::FIELD_PAYMENT_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_PAYMENT_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_STATUS])) { + $errs[self::FIELD_PAYMENT_STATUS] = []; + } + $errs[self::FIELD_PAYMENT_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php index 596349a877..a4df722b39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -288,7 +288,7 @@ class FHIRPaymentReconciliation extends FHIRDomainResource implements PHPFHIRCon * Validation map for fields in type PaymentReconciliation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentReconciliation Constructor @@ -1114,12 +1114,384 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFormCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentIssuer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_ISSUER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcessNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESS_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM_CODE])) { + $v = $this->getFormCode(); + foreach($validationRules[self::FIELD_FORM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_FORM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM_CODE])) { + $errs[self::FIELD_FORM_CODE] = []; + } + $errs[self::FIELD_FORM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_AMOUNT])) { + $v = $this->getPaymentAmount(); + foreach($validationRules[self::FIELD_PAYMENT_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_PAYMENT_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_AMOUNT])) { + $errs[self::FIELD_PAYMENT_AMOUNT] = []; + } + $errs[self::FIELD_PAYMENT_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_DATE])) { + $v = $this->getPaymentDate(); + foreach($validationRules[self::FIELD_PAYMENT_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_PAYMENT_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_DATE])) { + $errs[self::FIELD_PAYMENT_DATE] = []; + } + $errs[self::FIELD_PAYMENT_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_IDENTIFIER])) { + $v = $this->getPaymentIdentifier(); + foreach($validationRules[self::FIELD_PAYMENT_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_PAYMENT_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_IDENTIFIER])) { + $errs[self::FIELD_PAYMENT_IDENTIFIER] = []; + } + $errs[self::FIELD_PAYMENT_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_ISSUER])) { + $v = $this->getPaymentIssuer(); + foreach($validationRules[self::FIELD_PAYMENT_ISSUER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_PAYMENT_ISSUER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_ISSUER])) { + $errs[self::FIELD_PAYMENT_ISSUER] = []; + } + $errs[self::FIELD_PAYMENT_ISSUER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESS_NOTE])) { + $v = $this->getProcessNote(); + foreach($validationRules[self::FIELD_PROCESS_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_PROCESS_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESS_NOTE])) { + $errs[self::FIELD_PROCESS_NOTE] = []; + } + $errs[self::FIELD_PROCESS_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTOR])) { + $v = $this->getRequestor(); + foreach($validationRules[self::FIELD_REQUESTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_REQUESTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTOR])) { + $errs[self::FIELD_REQUESTOR] = []; + } + $errs[self::FIELD_REQUESTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPerson.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPerson.php index d75e3c40cc..d89fef4ede 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -224,7 +224,7 @@ class FHIRPerson extends FHIRDomainResource implements PHPFHIRContainedTypeInter * Validation map for fields in type Person * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPerson Constructor @@ -905,12 +905,303 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPhoto())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHOTO] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php index 65cb96d98d..a6886cfd3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -584,7 +584,7 @@ class FHIRPlanDefinition extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type PlanDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinition Constructor @@ -2862,12 +2862,693 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGoal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLibrary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIBRARY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL])) { + $v = $this->getGoal(); + foreach($validationRules[self::FIELD_GOAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_GOAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL])) { + $errs[self::FIELD_GOAL] = []; + } + $errs[self::FIELD_GOAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIBRARY])) { + $v = $this->getLibrary(); + foreach($validationRules[self::FIELD_LIBRARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_LIBRARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIBRARY])) { + $errs[self::FIELD_LIBRARY] = []; + } + $errs[self::FIELD_LIBRARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $v = $this->getSubjectCodeableConcept(); + foreach($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_SUBJECT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_REFERENCE])) { + $v = $this->getSubjectReference(); + foreach($validationRules[self::FIELD_SUBJECT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_SUBJECT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_REFERENCE])) { + $errs[self::FIELD_SUBJECT_REFERENCE] = []; + } + $errs[self::FIELD_SUBJECT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTITLE])) { + $v = $this->getSubtitle(); + foreach($validationRules[self::FIELD_SUBTITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_SUBTITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTITLE])) { + $errs[self::FIELD_SUBTITLE] = []; + } + $errs[self::FIELD_SUBTITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitioner.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitioner.php index 19c655755d..670902efc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitioner.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitioner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -231,7 +231,7 @@ class FHIRPractitioner extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Practitioner * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitioner Constructor @@ -1007,12 +1007,307 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCommunication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getQualification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUALIFICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION])) { + $v = $this->getCommunication(); + foreach($validationRules[self::FIELD_COMMUNICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_COMMUNICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION])) { + $errs[self::FIELD_COMMUNICATION] = []; + } + $errs[self::FIELD_COMMUNICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFICATION])) { + $v = $this->getQualification(); + foreach($validationRules[self::FIELD_QUALIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_QUALIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFICATION])) { + $errs[self::FIELD_QUALIFICATION] = []; + } + $errs[self::FIELD_QUALIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php index 712ab92619..11c6a37ff0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -274,7 +274,7 @@ class FHIRPractitionerRole extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type PractitionerRole * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerRole Constructor @@ -1244,12 +1244,379 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailabilityExceptions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAvailableTime())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AVAILABLE_TIME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getHealthcareService())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HEALTHCARE_SERVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNotAvailable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOT_AVAILABLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPractitioner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTITIONER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $v = $this->getAvailabilityExceptions(); + foreach($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_AVAILABILITY_EXCEPTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = []; + } + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_TIME])) { + $v = $this->getAvailableTime(); + foreach($validationRules[self::FIELD_AVAILABLE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_AVAILABLE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_TIME])) { + $errs[self::FIELD_AVAILABLE_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEALTHCARE_SERVICE])) { + $v = $this->getHealthcareService(); + foreach($validationRules[self::FIELD_HEALTHCARE_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_HEALTHCARE_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEALTHCARE_SERVICE])) { + $errs[self::FIELD_HEALTHCARE_SERVICE] = []; + } + $errs[self::FIELD_HEALTHCARE_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_AVAILABLE])) { + $v = $this->getNotAvailable(); + foreach($validationRules[self::FIELD_NOT_AVAILABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_NOT_AVAILABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_AVAILABLE])) { + $errs[self::FIELD_NOT_AVAILABLE] = []; + } + $errs[self::FIELD_NOT_AVAILABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRACTITIONER])) { + $v = $this->getPractitioner(); + foreach($validationRules[self::FIELD_PRACTITIONER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_PRACTITIONER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRACTITIONER])) { + $errs[self::FIELD_PRACTITIONER] = []; + } + $errs[self::FIELD_PRACTITIONER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProcedure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProcedure.php index 9389f65f19..58ead2055f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -542,7 +542,7 @@ class FHIRProcedure extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Procedure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedure Constructor @@ -2650,12 +2650,701 @@ public function setUsedReference(array $usedReference = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAsserter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComplication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPLICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getComplicationDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPLICATION_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFocalDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOCAL_DEVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFollowUp())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOLLOW_UP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_URI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPerformedAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMED_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformedRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMED_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMED_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPORT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUsedCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USED_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUsedReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USED_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ASSERTER])) { + $v = $this->getAsserter(); + foreach($validationRules[self::FIELD_ASSERTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_ASSERTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERTER])) { + $errs[self::FIELD_ASSERTER] = []; + } + $errs[self::FIELD_ASSERTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPLICATION])) { + $v = $this->getComplication(); + foreach($validationRules[self::FIELD_COMPLICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_COMPLICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPLICATION])) { + $errs[self::FIELD_COMPLICATION] = []; + } + $errs[self::FIELD_COMPLICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPLICATION_DETAIL])) { + $v = $this->getComplicationDetail(); + foreach($validationRules[self::FIELD_COMPLICATION_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_COMPLICATION_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPLICATION_DETAIL])) { + $errs[self::FIELD_COMPLICATION_DETAIL] = []; + } + $errs[self::FIELD_COMPLICATION_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL_DEVICE])) { + $v = $this->getFocalDevice(); + foreach($validationRules[self::FIELD_FOCAL_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_FOCAL_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL_DEVICE])) { + $errs[self::FIELD_FOCAL_DEVICE] = []; + } + $errs[self::FIELD_FOCAL_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOLLOW_UP])) { + $v = $this->getFollowUp(); + foreach($validationRules[self::FIELD_FOLLOW_UP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_FOLLOW_UP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOLLOW_UP])) { + $errs[self::FIELD_FOLLOW_UP] = []; + } + $errs[self::FIELD_FOLLOW_UP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMED_AGE])) { + $v = $this->getPerformedAge(); + foreach($validationRules[self::FIELD_PERFORMED_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMED_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMED_AGE])) { + $errs[self::FIELD_PERFORMED_AGE] = []; + } + $errs[self::FIELD_PERFORMED_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMED_DATE_TIME])) { + $v = $this->getPerformedDateTime(); + foreach($validationRules[self::FIELD_PERFORMED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMED_DATE_TIME])) { + $errs[self::FIELD_PERFORMED_DATE_TIME] = []; + } + $errs[self::FIELD_PERFORMED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMED_PERIOD])) { + $v = $this->getPerformedPeriod(); + foreach($validationRules[self::FIELD_PERFORMED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMED_PERIOD])) { + $errs[self::FIELD_PERFORMED_PERIOD] = []; + } + $errs[self::FIELD_PERFORMED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMED_RANGE])) { + $v = $this->getPerformedRange(); + foreach($validationRules[self::FIELD_PERFORMED_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMED_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMED_RANGE])) { + $errs[self::FIELD_PERFORMED_RANGE] = []; + } + $errs[self::FIELD_PERFORMED_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMED_STRING])) { + $v = $this->getPerformedString(); + foreach($validationRules[self::FIELD_PERFORMED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMED_STRING])) { + $errs[self::FIELD_PERFORMED_STRING] = []; + } + $errs[self::FIELD_PERFORMED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORT])) { + $v = $this->getReport(); + foreach($validationRules[self::FIELD_REPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORT])) { + $errs[self::FIELD_REPORT] = []; + } + $errs[self::FIELD_REPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_CODE])) { + $v = $this->getUsedCode(); + foreach($validationRules[self::FIELD_USED_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_USED_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_CODE])) { + $errs[self::FIELD_USED_CODE] = []; + } + $errs[self::FIELD_USED_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_REFERENCE])) { + $v = $this->getUsedReference(); + foreach($validationRules[self::FIELD_USED_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_USED_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_REFERENCE])) { + $errs[self::FIELD_USED_REFERENCE] = []; + } + $errs[self::FIELD_USED_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProvenance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProvenance.php index 4d07d3197d..3fd0d63be2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProvenance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProvenance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -272,7 +272,7 @@ class FHIRProvenance extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type Provenance * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_AGENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1125,12 +1125,322 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActivity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEntity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurredDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurredPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRED_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POLICY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSignature())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SIGNATURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVITY])) { + $v = $this->getActivity(); + foreach($validationRules[self::FIELD_ACTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_ACTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVITY])) { + $errs[self::FIELD_ACTIVITY] = []; + } + $errs[self::FIELD_ACTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRED_DATE_TIME])) { + $v = $this->getOccurredDateTime(); + foreach($validationRules[self::FIELD_OCCURRED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_OCCURRED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRED_DATE_TIME])) { + $errs[self::FIELD_OCCURRED_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRED_PERIOD])) { + $v = $this->getOccurredPeriod(); + foreach($validationRules[self::FIELD_OCCURRED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_OCCURRED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRED_PERIOD])) { + $errs[self::FIELD_OCCURRED_PERIOD] = []; + } + $errs[self::FIELD_OCCURRED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY])) { + $v = $this->getPolicy(); + foreach($validationRules[self::FIELD_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY])) { + $errs[self::FIELD_POLICY] = []; + } + $errs[self::FIELD_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED])) { + $v = $this->getRecorded(); + foreach($validationRules[self::FIELD_RECORDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_RECORDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED])) { + $errs[self::FIELD_RECORDED] = []; + } + $errs[self::FIELD_RECORDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNATURE])) { + $v = $this->getSignature(); + foreach($validationRules[self::FIELD_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNATURE])) { + $errs[self::FIELD_SIGNATURE] = []; + } + $errs[self::FIELD_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php index 5003ade35a..b653c7e172 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -439,7 +439,7 @@ class FHIRQuestionnaire extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type Questionnaire * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaire Constructor @@ -2087,12 +2087,513 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDerivedFrom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DERIVED_FROM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubjectType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DERIVED_FROM])) { + $v = $this->getDerivedFrom(); + foreach($validationRules[self::FIELD_DERIVED_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_DERIVED_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DERIVED_FROM])) { + $errs[self::FIELD_DERIVED_FROM] = []; + } + $errs[self::FIELD_DERIVED_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_TYPE])) { + $v = $this->getSubjectType(); + foreach($validationRules[self::FIELD_SUBJECT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_SUBJECT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_TYPE])) { + $errs[self::FIELD_SUBJECT_TYPE] = []; + } + $errs[self::FIELD_SUBJECT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php index 966520d50c..f7a57bf316 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -244,7 +244,7 @@ class FHIRQuestionnaireResponse extends FHIRDomainResource implements PHPFHIRCon * Validation map for fields in type QuestionnaireResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponse Constructor @@ -910,12 +910,316 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthored())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuestionnaire())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTIONNAIRE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED])) { + $v = $this->getAuthored(); + foreach($validationRules[self::FIELD_AUTHORED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_AUTHORED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED])) { + $errs[self::FIELD_AUTHORED] = []; + } + $errs[self::FIELD_AUTHORED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUESTIONNAIRE])) { + $v = $this->getQuestionnaire(); + foreach($validationRules[self::FIELD_QUESTIONNAIRE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_QUESTIONNAIRE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUESTIONNAIRE])) { + $errs[self::FIELD_QUESTIONNAIRE] = []; + } + $errs[self::FIELD_QUESTIONNAIRE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php index 796a285b86..5337d8b9e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -254,7 +254,7 @@ class FHIRRelatedPerson extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type RelatedPerson * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRelatedPerson Constructor @@ -1091,12 +1091,341 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCommunication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelationship())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATIONSHIP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION])) { + $v = $this->getCommunication(); + foreach($validationRules[self::FIELD_COMMUNICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_COMMUNICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION])) { + $errs[self::FIELD_COMMUNICATION] = []; + } + $errs[self::FIELD_COMMUNICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php index f9f68fbc4a..4d2734c640 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -334,7 +334,7 @@ class FHIRRequestGroup extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type RequestGroup * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestGroup Constructor @@ -1543,12 +1543,447 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_URI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchDefinition.php index 4757ca41ff..d1df3e7b09 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -622,7 +622,7 @@ class FHIRResearchDefinition extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type ResearchDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchDefinition Constructor @@ -3028,12 +3028,742 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getComment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExposure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPOSURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExposureAlternative())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPOSURE_ALTERNATIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLibrary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIBRARY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPopulation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POPULATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getShortTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SHORT_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE])) { + $v = $this->getExposure(); + foreach($validationRules[self::FIELD_EXPOSURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_EXPOSURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE])) { + $errs[self::FIELD_EXPOSURE] = []; + } + $errs[self::FIELD_EXPOSURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE_ALTERNATIVE])) { + $v = $this->getExposureAlternative(); + foreach($validationRules[self::FIELD_EXPOSURE_ALTERNATIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_EXPOSURE_ALTERNATIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE_ALTERNATIVE])) { + $errs[self::FIELD_EXPOSURE_ALTERNATIVE] = []; + } + $errs[self::FIELD_EXPOSURE_ALTERNATIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIBRARY])) { + $v = $this->getLibrary(); + foreach($validationRules[self::FIELD_LIBRARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_LIBRARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIBRARY])) { + $errs[self::FIELD_LIBRARY] = []; + } + $errs[self::FIELD_LIBRARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHORT_TITLE])) { + $v = $this->getShortTitle(); + foreach($validationRules[self::FIELD_SHORT_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_SHORT_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHORT_TITLE])) { + $errs[self::FIELD_SHORT_TITLE] = []; + } + $errs[self::FIELD_SHORT_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $v = $this->getSubjectCodeableConcept(); + foreach($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_SUBJECT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_REFERENCE])) { + $v = $this->getSubjectReference(); + foreach($validationRules[self::FIELD_SUBJECT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_SUBJECT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_REFERENCE])) { + $errs[self::FIELD_SUBJECT_REFERENCE] = []; + } + $errs[self::FIELD_SUBJECT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTITLE])) { + $v = $this->getSubtitle(); + foreach($validationRules[self::FIELD_SUBTITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_SUBTITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTITLE])) { + $errs[self::FIELD_SUBTITLE] = []; + } + $errs[self::FIELD_SUBTITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinition.php index fcc219381c..0aac3aaa9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -612,7 +612,7 @@ class FHIRResearchElementDefinition extends FHIRDomainResource implements PHPFHI * Validation map for fields in type ResearchElementDefinition * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CHARACTERISTIC => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -3050,12 +3050,727 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getComment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLibrary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIBRARY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getShortTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SHORT_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubjectReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVariableType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIABLE_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC])) { + $v = $this->getCharacteristic(); + foreach($validationRules[self::FIELD_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC])) { + $errs[self::FIELD_CHARACTERISTIC] = []; + } + $errs[self::FIELD_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIBRARY])) { + $v = $this->getLibrary(); + foreach($validationRules[self::FIELD_LIBRARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_LIBRARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIBRARY])) { + $errs[self::FIELD_LIBRARY] = []; + } + $errs[self::FIELD_LIBRARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHORT_TITLE])) { + $v = $this->getShortTitle(); + foreach($validationRules[self::FIELD_SHORT_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_SHORT_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHORT_TITLE])) { + $errs[self::FIELD_SHORT_TITLE] = []; + } + $errs[self::FIELD_SHORT_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $v = $this->getSubjectCodeableConcept(); + foreach($validationRules[self::FIELD_SUBJECT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_SUBJECT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBJECT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_REFERENCE])) { + $v = $this->getSubjectReference(); + foreach($validationRules[self::FIELD_SUBJECT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_SUBJECT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_REFERENCE])) { + $errs[self::FIELD_SUBJECT_REFERENCE] = []; + } + $errs[self::FIELD_SUBJECT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTITLE])) { + $v = $this->getSubtitle(); + foreach($validationRules[self::FIELD_SUBTITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_SUBTITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTITLE])) { + $errs[self::FIELD_SUBTITLE] = []; + } + $errs[self::FIELD_SUBTITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIABLE_TYPE])) { + $v = $this->getVariableType(); + foreach($validationRules[self::FIELD_VARIABLE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_VARIABLE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIABLE_TYPE])) { + $errs[self::FIELD_VARIABLE_TYPE] = []; + } + $errs[self::FIELD_VARIABLE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php index 5832a65f45..2df29ae801 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -430,7 +430,7 @@ class FHIRResearchStudy extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type ResearchStudy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchStudy Constructor @@ -2081,12 +2081,561 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getArm())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ARM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEnrollment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENROLLMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFocus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOCUS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getKeyword())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_KEYWORD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getObjective())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OBJECTIVE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPhase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrimaryPurposeType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIMARY_PURPOSE_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrincipalInvestigator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRINCIPAL_INVESTIGATOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProtocol())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROTOCOL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReasonStopped())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_STOPPED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSponsor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPONSOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ARM])) { + $v = $this->getArm(); + foreach($validationRules[self::FIELD_ARM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_ARM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ARM])) { + $errs[self::FIELD_ARM] = []; + } + $errs[self::FIELD_ARM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENROLLMENT])) { + $v = $this->getEnrollment(); + foreach($validationRules[self::FIELD_ENROLLMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_ENROLLMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENROLLMENT])) { + $errs[self::FIELD_ENROLLMENT] = []; + } + $errs[self::FIELD_ENROLLMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KEYWORD])) { + $v = $this->getKeyword(); + foreach($validationRules[self::FIELD_KEYWORD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_KEYWORD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KEYWORD])) { + $errs[self::FIELD_KEYWORD] = []; + } + $errs[self::FIELD_KEYWORD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OBJECTIVE])) { + $v = $this->getObjective(); + foreach($validationRules[self::FIELD_OBJECTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_OBJECTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBJECTIVE])) { + $errs[self::FIELD_OBJECTIVE] = []; + } + $errs[self::FIELD_OBJECTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHASE])) { + $v = $this->getPhase(); + foreach($validationRules[self::FIELD_PHASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_PHASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHASE])) { + $errs[self::FIELD_PHASE] = []; + } + $errs[self::FIELD_PHASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIMARY_PURPOSE_TYPE])) { + $v = $this->getPrimaryPurposeType(); + foreach($validationRules[self::FIELD_PRIMARY_PURPOSE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_PRIMARY_PURPOSE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIMARY_PURPOSE_TYPE])) { + $errs[self::FIELD_PRIMARY_PURPOSE_TYPE] = []; + } + $errs[self::FIELD_PRIMARY_PURPOSE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRINCIPAL_INVESTIGATOR])) { + $v = $this->getPrincipalInvestigator(); + foreach($validationRules[self::FIELD_PRINCIPAL_INVESTIGATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_PRINCIPAL_INVESTIGATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRINCIPAL_INVESTIGATOR])) { + $errs[self::FIELD_PRINCIPAL_INVESTIGATOR] = []; + } + $errs[self::FIELD_PRINCIPAL_INVESTIGATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_STOPPED])) { + $v = $this->getReasonStopped(); + foreach($validationRules[self::FIELD_REASON_STOPPED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_REASON_STOPPED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_STOPPED])) { + $errs[self::FIELD_REASON_STOPPED] = []; + } + $errs[self::FIELD_REASON_STOPPED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPONSOR])) { + $v = $this->getSponsor(); + foreach($validationRules[self::FIELD_SPONSOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_SPONSOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPONSOR])) { + $errs[self::FIELD_SPONSOR] = []; + } + $errs[self::FIELD_SPONSOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php index b119df316d..c58b8aa742 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -193,7 +193,7 @@ class FHIRResearchSubject extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type ResearchSubject * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchSubject Constructor @@ -644,12 +644,261 @@ public function setStudy(FHIRReference $study = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActualArm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTUAL_ARM] = $fieldErrs; + } + } + if (null !== ($v = $this->getAssignedArm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSIGNED_ARM] = $fieldErrs; + } + } + if (null !== ($v = $this->getConsent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONSENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIndividual())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDIVIDUAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTUAL_ARM])) { + $v = $this->getActualArm(); + foreach($validationRules[self::FIELD_ACTUAL_ARM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_ACTUAL_ARM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTUAL_ARM])) { + $errs[self::FIELD_ACTUAL_ARM] = []; + } + $errs[self::FIELD_ACTUAL_ARM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSIGNED_ARM])) { + $v = $this->getAssignedArm(); + foreach($validationRules[self::FIELD_ASSIGNED_ARM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_ASSIGNED_ARM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSIGNED_ARM])) { + $errs[self::FIELD_ASSIGNED_ARM] = []; + } + $errs[self::FIELD_ASSIGNED_ARM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONSENT])) { + $v = $this->getConsent(); + foreach($validationRules[self::FIELD_CONSENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_CONSENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONSENT])) { + $errs[self::FIELD_CONSENT] = []; + } + $errs[self::FIELD_CONSENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDIVIDUAL])) { + $v = $this->getIndividual(); + foreach($validationRules[self::FIELD_INDIVIDUAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_INDIVIDUAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDIVIDUAL])) { + $errs[self::FIELD_INDIVIDUAL] = []; + } + $errs[self::FIELD_INDIVIDUAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY])) { + $v = $this->getStudy(); + foreach($validationRules[self::FIELD_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY])) { + $errs[self::FIELD_STUDY] = []; + } + $errs[self::FIELD_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php index ce3f30df09..fb85e2d809 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -326,7 +326,7 @@ class FHIRRiskAssessment extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type RiskAssessment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskAssessment Constructor @@ -1352,12 +1352,441 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBasedOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMitigation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MITIGATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getParent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrediction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PREDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASIS])) { + $v = $this->getBasis(); + foreach($validationRules[self::FIELD_BASIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_BASIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASIS])) { + $errs[self::FIELD_BASIS] = []; + } + $errs[self::FIELD_BASIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MITIGATION])) { + $v = $this->getMitigation(); + foreach($validationRules[self::FIELD_MITIGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_MITIGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MITIGATION])) { + $errs[self::FIELD_MITIGATION] = []; + } + $errs[self::FIELD_MITIGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREDICTION])) { + $v = $this->getPrediction(); + foreach($validationRules[self::FIELD_PREDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_PREDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREDICTION])) { + $errs[self::FIELD_PREDICTION] = []; + } + $errs[self::FIELD_PREDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesis.php index 33c7cab3f0..f07f9d5712 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -551,7 +551,7 @@ class FHIRRiskEvidenceSynthesis extends FHIRDomainResource implements PHPFHIRCon * Validation map for fields in type RiskEvidenceSynthesis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskEvidenceSynthesis Constructor @@ -2596,12 +2596,674 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCertainty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CERTAINTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEditor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EDITOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndorser())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDORSER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExposure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPOSURE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPopulation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POPULATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReviewer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REVIEWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRiskEstimate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RISK_ESTIMATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSampleSize())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SAMPLE_SIZE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudyType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSynthesisType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYNTHESIS_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CERTAINTY])) { + $v = $this->getCertainty(); + foreach($validationRules[self::FIELD_CERTAINTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_CERTAINTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CERTAINTY])) { + $errs[self::FIELD_CERTAINTY] = []; + } + $errs[self::FIELD_CERTAINTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EDITOR])) { + $v = $this->getEditor(); + foreach($validationRules[self::FIELD_EDITOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_EDITOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EDITOR])) { + $errs[self::FIELD_EDITOR] = []; + } + $errs[self::FIELD_EDITOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDORSER])) { + $v = $this->getEndorser(); + foreach($validationRules[self::FIELD_ENDORSER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_ENDORSER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDORSER])) { + $errs[self::FIELD_ENDORSER] = []; + } + $errs[self::FIELD_ENDORSER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE])) { + $v = $this->getExposure(); + foreach($validationRules[self::FIELD_EXPOSURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_EXPOSURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE])) { + $errs[self::FIELD_EXPOSURE] = []; + } + $errs[self::FIELD_EXPOSURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVIEWER])) { + $v = $this->getReviewer(); + foreach($validationRules[self::FIELD_REVIEWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_REVIEWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVIEWER])) { + $errs[self::FIELD_REVIEWER] = []; + } + $errs[self::FIELD_REVIEWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RISK_ESTIMATE])) { + $v = $this->getRiskEstimate(); + foreach($validationRules[self::FIELD_RISK_ESTIMATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_RISK_ESTIMATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RISK_ESTIMATE])) { + $errs[self::FIELD_RISK_ESTIMATE] = []; + } + $errs[self::FIELD_RISK_ESTIMATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SAMPLE_SIZE])) { + $v = $this->getSampleSize(); + foreach($validationRules[self::FIELD_SAMPLE_SIZE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_SAMPLE_SIZE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SAMPLE_SIZE])) { + $errs[self::FIELD_SAMPLE_SIZE] = []; + } + $errs[self::FIELD_SAMPLE_SIZE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY_TYPE])) { + $v = $this->getStudyType(); + foreach($validationRules[self::FIELD_STUDY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_STUDY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY_TYPE])) { + $errs[self::FIELD_STUDY_TYPE] = []; + } + $errs[self::FIELD_STUDY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYNTHESIS_TYPE])) { + $v = $this->getSynthesisType(); + foreach($validationRules[self::FIELD_SYNTHESIS_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_SYNTHESIS_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYNTHESIS_TYPE])) { + $errs[self::FIELD_SYNTHESIS_TYPE] = []; + } + $errs[self::FIELD_SYNTHESIS_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_EVIDENCE_SYNTHESIS, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSchedule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSchedule.php index afb295d180..af1d0b5b88 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSchedule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSchedule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -202,7 +202,7 @@ class FHIRSchedule extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Schedule * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTOR => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -815,12 +815,269 @@ public function setSpecialty(array $specialty = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getActor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPlanningHorizon())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PLANNING_HORIZON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getServiceCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_CATEGORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getServiceType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PLANNING_HORIZON])) { + $v = $this->getPlanningHorizon(); + foreach($validationRules[self::FIELD_PLANNING_HORIZON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_PLANNING_HORIZON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PLANNING_HORIZON])) { + $errs[self::FIELD_PLANNING_HORIZON] = []; + } + $errs[self::FIELD_PLANNING_HORIZON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_CATEGORY])) { + $v = $this->getServiceCategory(); + foreach($validationRules[self::FIELD_SERVICE_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_SERVICE_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_CATEGORY])) { + $errs[self::FIELD_SERVICE_CATEGORY] = []; + } + $errs[self::FIELD_SERVICE_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_TYPE])) { + $v = $this->getServiceType(); + foreach($validationRules[self::FIELD_SERVICE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_SERVICE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_TYPE])) { + $errs[self::FIELD_SERVICE_TYPE] = []; + } + $errs[self::FIELD_SERVICE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php index 4ba75b8b3a..f019a4e89d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -485,7 +485,7 @@ class FHIRSearchParameter extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type SearchParameter * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_BASE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -2451,12 +2451,583 @@ public function setXpathUsage(FHIRXPathUsageType $xpathUsage = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBase())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getChain())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHAIN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComparator())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPARATOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getComponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPONENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDerivedFrom())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DERIVED_FROM] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMultipleAnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_AND] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultipleOr())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_OR] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpathUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH_USAGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHAIN])) { + $v = $this->getChain(); + foreach($validationRules[self::FIELD_CHAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_CHAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHAIN])) { + $errs[self::FIELD_CHAIN] = []; + } + $errs[self::FIELD_CHAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPONENT])) { + $v = $this->getComponent(); + foreach($validationRules[self::FIELD_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPONENT])) { + $errs[self::FIELD_COMPONENT] = []; + } + $errs[self::FIELD_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DERIVED_FROM])) { + $v = $this->getDerivedFrom(); + foreach($validationRules[self::FIELD_DERIVED_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_DERIVED_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DERIVED_FROM])) { + $errs[self::FIELD_DERIVED_FROM] = []; + } + $errs[self::FIELD_DERIVED_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_AND])) { + $v = $this->getMultipleAnd(); + foreach($validationRules[self::FIELD_MULTIPLE_AND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_MULTIPLE_AND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_AND])) { + $errs[self::FIELD_MULTIPLE_AND] = []; + } + $errs[self::FIELD_MULTIPLE_AND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_OR])) { + $v = $this->getMultipleOr(); + foreach($validationRules[self::FIELD_MULTIPLE_OR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_MULTIPLE_OR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_OR])) { + $errs[self::FIELD_MULTIPLE_OR] = []; + } + $errs[self::FIELD_MULTIPLE_OR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH])) { + $v = $this->getXpath(); + foreach($validationRules[self::FIELD_XPATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_XPATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH])) { + $errs[self::FIELD_XPATH] = []; + } + $errs[self::FIELD_XPATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH_USAGE])) { + $v = $this->getXpathUsage(); + foreach($validationRules[self::FIELD_XPATH_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_XPATH_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH_USAGE])) { + $errs[self::FIELD_XPATH_USAGE] = []; + } + $errs[self::FIELD_XPATH_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRServiceRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRServiceRequest.php index a6b45121f0..79c8388883 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRServiceRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRServiceRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -640,7 +640,7 @@ class FHIRServiceRequest extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type ServiceRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRServiceRequest Constructor @@ -3156,12 +3156,805 @@ public function setSupportingInfo(array $supportingInfo = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoNotPerform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DO_NOT_PERFORM] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesCanonical())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_CANONICAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiatesUri())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES_URI, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLocationCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocationReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOrderDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ORDER_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatientInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT_INSTRUCTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPerformerType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantityQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantityRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantityRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY_RATIO] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelevantHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELEVANT_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequisition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUISITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DO_NOT_PERFORM])) { + $v = $this->getDoNotPerform(); + foreach($validationRules[self::FIELD_DO_NOT_PERFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_DO_NOT_PERFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DO_NOT_PERFORM])) { + $errs[self::FIELD_DO_NOT_PERFORM] = []; + } + $errs[self::FIELD_DO_NOT_PERFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_CODE])) { + $v = $this->getLocationCode(); + foreach($validationRules[self::FIELD_LOCATION_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_LOCATION_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_CODE])) { + $errs[self::FIELD_LOCATION_CODE] = []; + } + $errs[self::FIELD_LOCATION_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDER_DETAIL])) { + $v = $this->getOrderDetail(); + foreach($validationRules[self::FIELD_ORDER_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_ORDER_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDER_DETAIL])) { + $errs[self::FIELD_ORDER_DETAIL] = []; + } + $errs[self::FIELD_ORDER_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT_INSTRUCTION])) { + $v = $this->getPatientInstruction(); + foreach($validationRules[self::FIELD_PATIENT_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_PATIENT_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT_INSTRUCTION])) { + $errs[self::FIELD_PATIENT_INSTRUCTION] = []; + } + $errs[self::FIELD_PATIENT_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER_TYPE])) { + $v = $this->getPerformerType(); + foreach($validationRules[self::FIELD_PERFORMER_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_PERFORMER_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER_TYPE])) { + $errs[self::FIELD_PERFORMER_TYPE] = []; + } + $errs[self::FIELD_PERFORMER_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY_QUANTITY])) { + $v = $this->getQuantityQuantity(); + foreach($validationRules[self::FIELD_QUANTITY_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_QUANTITY_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY_QUANTITY])) { + $errs[self::FIELD_QUANTITY_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY_RANGE])) { + $v = $this->getQuantityRange(); + foreach($validationRules[self::FIELD_QUANTITY_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_QUANTITY_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY_RANGE])) { + $errs[self::FIELD_QUANTITY_RANGE] = []; + } + $errs[self::FIELD_QUANTITY_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY_RATIO])) { + $v = $this->getQuantityRatio(); + foreach($validationRules[self::FIELD_QUANTITY_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_QUANTITY_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY_RATIO])) { + $errs[self::FIELD_QUANTITY_RATIO] = []; + } + $errs[self::FIELD_QUANTITY_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEVANT_HISTORY])) { + $v = $this->getRelevantHistory(); + foreach($validationRules[self::FIELD_RELEVANT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_RELEVANT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEVANT_HISTORY])) { + $errs[self::FIELD_RELEVANT_HISTORY] = []; + } + $errs[self::FIELD_RELEVANT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUISITION])) { + $v = $this->getRequisition(); + foreach($validationRules[self::FIELD_REQUISITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_REQUISITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUISITION])) { + $errs[self::FIELD_REQUISITION] = []; + } + $errs[self::FIELD_REQUISITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_REQUEST, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSlot.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSlot.php index ce1f0eae15..be5102fd42 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSlot.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSlot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -247,7 +247,7 @@ class FHIRSlot extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Slot * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSlot Constructor @@ -1006,12 +1006,318 @@ public function setStatus(FHIRSlotStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAppointmentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOverbooked())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OVERBOOKED] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getServiceCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_CATEGORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getServiceType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT_TYPE])) { + $v = $this->getAppointmentType(); + foreach($validationRules[self::FIELD_APPOINTMENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_APPOINTMENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT_TYPE])) { + $errs[self::FIELD_APPOINTMENT_TYPE] = []; + } + $errs[self::FIELD_APPOINTMENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OVERBOOKED])) { + $v = $this->getOverbooked(); + foreach($validationRules[self::FIELD_OVERBOOKED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_OVERBOOKED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OVERBOOKED])) { + $errs[self::FIELD_OVERBOOKED] = []; + } + $errs[self::FIELD_OVERBOOKED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_CATEGORY])) { + $v = $this->getServiceCategory(); + foreach($validationRules[self::FIELD_SERVICE_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_SERVICE_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_CATEGORY])) { + $errs[self::FIELD_SERVICE_CATEGORY] = []; + } + $errs[self::FIELD_SERVICE_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_TYPE])) { + $v = $this->getServiceType(); + foreach($validationRules[self::FIELD_SERVICE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_SERVICE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_TYPE])) { + $errs[self::FIELD_SERVICE_TYPE] = []; + } + $errs[self::FIELD_SERVICE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimen.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimen.php index 17335b3946..d687af29cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimen.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -261,7 +261,7 @@ class FHIRSpecimen extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Specimen * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimen Constructor @@ -1108,12 +1108,358 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccessionIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCESSION_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollection())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContainer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProcessing())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESSING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReceivedTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVED_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCESSION_IDENTIFIER])) { + $v = $this->getAccessionIdentifier(); + foreach($validationRules[self::FIELD_ACCESSION_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_ACCESSION_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCESSION_IDENTIFIER])) { + $errs[self::FIELD_ACCESSION_IDENTIFIER] = []; + } + $errs[self::FIELD_ACCESSION_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTION])) { + $v = $this->getCollection(); + foreach($validationRules[self::FIELD_COLLECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_COLLECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTION])) { + $errs[self::FIELD_COLLECTION] = []; + } + $errs[self::FIELD_COLLECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINER])) { + $v = $this->getContainer(); + foreach($validationRules[self::FIELD_CONTAINER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_CONTAINER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINER])) { + $errs[self::FIELD_CONTAINER] = []; + } + $errs[self::FIELD_CONTAINER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESSING])) { + $v = $this->getProcessing(); + foreach($validationRules[self::FIELD_PROCESSING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_PROCESSING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESSING])) { + $errs[self::FIELD_PROCESSING] = []; + } + $errs[self::FIELD_PROCESSING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVED_TIME])) { + $v = $this->getReceivedTime(); + foreach($validationRules[self::FIELD_RECEIVED_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_RECEIVED_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVED_TIME])) { + $errs[self::FIELD_RECEIVED_TIME] = []; + } + $errs[self::FIELD_RECEIVED_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinition.php index 5ae47523e8..1a1961012e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -165,7 +165,7 @@ class FHIRSpecimenDefinition extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type SpecimenDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenDefinition Constructor @@ -575,12 +575,231 @@ public function setTypeTested(array $typeTested = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCollection())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COLLECTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPatientPreparation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PATIENT_PREPARATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTimeAspect())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME_ASPECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTypeCollected())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE_COLLECTED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTypeTested())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE_TESTED, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTION])) { + $v = $this->getCollection(); + foreach($validationRules[self::FIELD_COLLECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION, self::FIELD_COLLECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTION])) { + $errs[self::FIELD_COLLECTION] = []; + } + $errs[self::FIELD_COLLECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT_PREPARATION])) { + $v = $this->getPatientPreparation(); + foreach($validationRules[self::FIELD_PATIENT_PREPARATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION, self::FIELD_PATIENT_PREPARATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT_PREPARATION])) { + $errs[self::FIELD_PATIENT_PREPARATION] = []; + } + $errs[self::FIELD_PATIENT_PREPARATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_ASPECT])) { + $v = $this->getTimeAspect(); + foreach($validationRules[self::FIELD_TIME_ASPECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION, self::FIELD_TIME_ASPECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_ASPECT])) { + $errs[self::FIELD_TIME_ASPECT] = []; + } + $errs[self::FIELD_TIME_ASPECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE_COLLECTED])) { + $v = $this->getTypeCollected(); + foreach($validationRules[self::FIELD_TYPE_COLLECTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION, self::FIELD_TYPE_COLLECTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE_COLLECTED])) { + $errs[self::FIELD_TYPE_COLLECTED] = []; + } + $errs[self::FIELD_TYPE_COLLECTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE_TESTED])) { + $v = $this->getTypeTested(); + foreach($validationRules[self::FIELD_TYPE_TESTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DEFINITION, self::FIELD_TYPE_TESTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE_TESTED])) { + $errs[self::FIELD_TYPE_TESTED] = []; + } + $errs[self::FIELD_TYPE_TESTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php index 7b4d05f3ec..989b1b02b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -512,7 +512,7 @@ class FHIRStructureDefinition extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type StructureDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinition Constructor @@ -2403,12 +2403,598 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbstract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABSTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBaseDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTEXT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContextInvariant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTEXT_INVARIANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDerivation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DERIVATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDifferential())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIFFERENTIAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFhirVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FHIR_VERSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getKeyword())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_KEYWORD, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMapping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSnapshot())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SNAPSHOT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABSTRACT])) { + $v = $this->getAbstract(); + foreach($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_ABSTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABSTRACT])) { + $errs[self::FIELD_ABSTRACT] = []; + } + $errs[self::FIELD_ABSTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE_DEFINITION])) { + $v = $this->getBaseDefinition(); + foreach($validationRules[self::FIELD_BASE_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_BASE_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE_DEFINITION])) { + $errs[self::FIELD_BASE_DEFINITION] = []; + } + $errs[self::FIELD_BASE_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT_INVARIANT])) { + $v = $this->getContextInvariant(); + foreach($validationRules[self::FIELD_CONTEXT_INVARIANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONTEXT_INVARIANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT_INVARIANT])) { + $errs[self::FIELD_CONTEXT_INVARIANT] = []; + } + $errs[self::FIELD_CONTEXT_INVARIANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DERIVATION])) { + $v = $this->getDerivation(); + foreach($validationRules[self::FIELD_DERIVATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DERIVATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DERIVATION])) { + $errs[self::FIELD_DERIVATION] = []; + } + $errs[self::FIELD_DERIVATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIFFERENTIAL])) { + $v = $this->getDifferential(); + foreach($validationRules[self::FIELD_DIFFERENTIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DIFFERENTIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIFFERENTIAL])) { + $errs[self::FIELD_DIFFERENTIAL] = []; + } + $errs[self::FIELD_DIFFERENTIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KEYWORD])) { + $v = $this->getKeyword(); + foreach($validationRules[self::FIELD_KEYWORD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_KEYWORD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KEYWORD])) { + $errs[self::FIELD_KEYWORD] = []; + } + $errs[self::FIELD_KEYWORD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAPPING])) { + $v = $this->getMapping(); + foreach($validationRules[self::FIELD_MAPPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_MAPPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAPPING])) { + $errs[self::FIELD_MAPPING] = []; + } + $errs[self::FIELD_MAPPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SNAPSHOT])) { + $v = $this->getSnapshot(); + foreach($validationRules[self::FIELD_SNAPSHOT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_SNAPSHOT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SNAPSHOT])) { + $errs[self::FIELD_SNAPSHOT] = []; + } + $errs[self::FIELD_SNAPSHOT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureMap.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureMap.php index d649c102f0..dc2a29113f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureMap.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -372,7 +372,7 @@ class FHIRStructureMap extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type StructureMap * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_GROUP => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1735,12 +1735,443 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPORT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStructure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRUCTURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPORT])) { + $v = $this->getImport(); + foreach($validationRules[self::FIELD_IMPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_IMPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPORT])) { + $errs[self::FIELD_IMPORT] = []; + } + $errs[self::FIELD_IMPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRUCTURE])) { + $v = $this->getStructure(); + foreach($validationRules[self::FIELD_STRUCTURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_STRUCTURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRUCTURE])) { + $errs[self::FIELD_STRUCTURE] = []; + } + $errs[self::FIELD_STRUCTURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubscription.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubscription.php index 899cae695d..7646ae6cc4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubscription.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubscription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -194,7 +194,7 @@ class FHIRSubscription extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Subscription * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscription Constructor @@ -673,12 +673,244 @@ public function setStatus(FHIRSubscriptionStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getChannel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHANNEL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCriteria())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITERIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getError())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ERROR] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CHANNEL])) { + $v = $this->getChannel(); + foreach($validationRules[self::FIELD_CHANNEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_CHANNEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHANNEL])) { + $errs[self::FIELD_CHANNEL] = []; + } + $errs[self::FIELD_CHANNEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITERIA])) { + $v = $this->getCriteria(); + foreach($validationRules[self::FIELD_CRITERIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_CRITERIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITERIA])) { + $errs[self::FIELD_CRITERIA] = []; + } + $errs[self::FIELD_CRITERIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ERROR])) { + $v = $this->getError(); + foreach($validationRules[self::FIELD_ERROR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_ERROR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ERROR])) { + $errs[self::FIELD_ERROR] = []; + } + $errs[self::FIELD_ERROR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstance.php index bdf1e57cc5..0e024996bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -179,7 +179,7 @@ class FHIRSubstance extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Substance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstance Constructor @@ -677,12 +677,250 @@ public function setStatus(FHIRFHIRSubstanceStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcid.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcid.php index 7d01d8b4ff..905adbfe23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcid.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -166,7 +166,7 @@ class FHIRSubstanceNucleicAcid extends FHIRDomainResource implements PHPFHIRCont * Validation map for fields in type SubstanceNucleicAcid * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceNucleicAcid Constructor @@ -510,12 +510,210 @@ public function setSubunit(array $subunit = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAreaOfHybridisation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AREA_OF_HYBRIDISATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfSubunits())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_SUBUNITS] = $fieldErrs; + } + } + if (null !== ($v = $this->getOligoNucleotideType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OLIGO_NUCLEOTIDE_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequenceType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubunit())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBUNIT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AREA_OF_HYBRIDISATION])) { + $v = $this->getAreaOfHybridisation(); + foreach($validationRules[self::FIELD_AREA_OF_HYBRIDISATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID, self::FIELD_AREA_OF_HYBRIDISATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AREA_OF_HYBRIDISATION])) { + $errs[self::FIELD_AREA_OF_HYBRIDISATION] = []; + } + $errs[self::FIELD_AREA_OF_HYBRIDISATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_SUBUNITS])) { + $v = $this->getNumberOfSubunits(); + foreach($validationRules[self::FIELD_NUMBER_OF_SUBUNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID, self::FIELD_NUMBER_OF_SUBUNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_SUBUNITS])) { + $errs[self::FIELD_NUMBER_OF_SUBUNITS] = []; + } + $errs[self::FIELD_NUMBER_OF_SUBUNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OLIGO_NUCLEOTIDE_TYPE])) { + $v = $this->getOligoNucleotideType(); + foreach($validationRules[self::FIELD_OLIGO_NUCLEOTIDE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID, self::FIELD_OLIGO_NUCLEOTIDE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OLIGO_NUCLEOTIDE_TYPE])) { + $errs[self::FIELD_OLIGO_NUCLEOTIDE_TYPE] = []; + } + $errs[self::FIELD_OLIGO_NUCLEOTIDE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_TYPE])) { + $v = $this->getSequenceType(); + foreach($validationRules[self::FIELD_SEQUENCE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID, self::FIELD_SEQUENCE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_TYPE])) { + $errs[self::FIELD_SEQUENCE_TYPE] = []; + } + $errs[self::FIELD_SEQUENCE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBUNIT])) { + $v = $this->getSubunit(); + foreach($validationRules[self::FIELD_SUBUNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_NUCLEIC_ACID, self::FIELD_SUBUNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBUNIT])) { + $errs[self::FIELD_SUBUNIT] = []; + } + $errs[self::FIELD_SUBUNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstancePolymer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstancePolymer.php index e575d70c01..dee48b884a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstancePolymer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstancePolymer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -162,7 +162,7 @@ class FHIRSubstancePolymer extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type SubstancePolymer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstancePolymer Constructor @@ -604,12 +604,233 @@ public function setRepeat(array $repeat = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCopolymerConnectivity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COPOLYMER_CONNECTIVITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGeometry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GEOMETRY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMonomerSet())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MONOMER_SET, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRepeat())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPEAT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPOLYMER_CONNECTIVITY])) { + $v = $this->getCopolymerConnectivity(); + foreach($validationRules[self::FIELD_COPOLYMER_CONNECTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER, self::FIELD_COPOLYMER_CONNECTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPOLYMER_CONNECTIVITY])) { + $errs[self::FIELD_COPOLYMER_CONNECTIVITY] = []; + } + $errs[self::FIELD_COPOLYMER_CONNECTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GEOMETRY])) { + $v = $this->getGeometry(); + foreach($validationRules[self::FIELD_GEOMETRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER, self::FIELD_GEOMETRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GEOMETRY])) { + $errs[self::FIELD_GEOMETRY] = []; + } + $errs[self::FIELD_GEOMETRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFICATION])) { + $v = $this->getModification(); + foreach($validationRules[self::FIELD_MODIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER, self::FIELD_MODIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFICATION])) { + $errs[self::FIELD_MODIFICATION] = []; + } + $errs[self::FIELD_MODIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MONOMER_SET])) { + $v = $this->getMonomerSet(); + foreach($validationRules[self::FIELD_MONOMER_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER, self::FIELD_MONOMER_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MONOMER_SET])) { + $errs[self::FIELD_MONOMER_SET] = []; + } + $errs[self::FIELD_MONOMER_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEAT])) { + $v = $this->getRepeat(); + foreach($validationRules[self::FIELD_REPEAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_POLYMER, self::FIELD_REPEAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEAT])) { + $errs[self::FIELD_REPEAT] = []; + } + $errs[self::FIELD_REPEAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceProtein.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceProtein.php index fae3fa718a..e15ae5ee47 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceProtein.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceProtein.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -169,7 +169,7 @@ class FHIRSubstanceProtein extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type SubstanceProtein * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceProtein Constructor @@ -553,12 +553,195 @@ public function setSubunit(array $subunit = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDisulfideLinkage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DISULFIDE_LINKAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNumberOfSubunits())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_SUBUNITS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequenceType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubunit())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBUNIT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DISULFIDE_LINKAGE])) { + $v = $this->getDisulfideLinkage(); + foreach($validationRules[self::FIELD_DISULFIDE_LINKAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN, self::FIELD_DISULFIDE_LINKAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISULFIDE_LINKAGE])) { + $errs[self::FIELD_DISULFIDE_LINKAGE] = []; + } + $errs[self::FIELD_DISULFIDE_LINKAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_SUBUNITS])) { + $v = $this->getNumberOfSubunits(); + foreach($validationRules[self::FIELD_NUMBER_OF_SUBUNITS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN, self::FIELD_NUMBER_OF_SUBUNITS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_SUBUNITS])) { + $errs[self::FIELD_NUMBER_OF_SUBUNITS] = []; + } + $errs[self::FIELD_NUMBER_OF_SUBUNITS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_TYPE])) { + $v = $this->getSequenceType(); + foreach($validationRules[self::FIELD_SEQUENCE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN, self::FIELD_SEQUENCE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_TYPE])) { + $errs[self::FIELD_SEQUENCE_TYPE] = []; + } + $errs[self::FIELD_SEQUENCE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBUNIT])) { + $v = $this->getSubunit(); + foreach($validationRules[self::FIELD_SUBUNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_PROTEIN, self::FIELD_SUBUNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBUNIT])) { + $errs[self::FIELD_SUBUNIT] = []; + } + $errs[self::FIELD_SUBUNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformation.php index 24440b615d..f0297c690c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRSubstanceReferenceInformation extends FHIRDomainResource implements PH * Validation map for fields in type SubstanceReferenceInformation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceReferenceInformation Constructor @@ -526,12 +526,216 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getClassification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CLASSIFICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGene())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GENE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGeneElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GENE_ELEMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CLASSIFICATION])) { + $v = $this->getClassification(); + foreach($validationRules[self::FIELD_CLASSIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION, self::FIELD_CLASSIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASSIFICATION])) { + $errs[self::FIELD_CLASSIFICATION] = []; + } + $errs[self::FIELD_CLASSIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENE])) { + $v = $this->getGene(); + foreach($validationRules[self::FIELD_GENE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION, self::FIELD_GENE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENE])) { + $errs[self::FIELD_GENE] = []; + } + $errs[self::FIELD_GENE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENE_ELEMENT])) { + $v = $this->getGeneElement(); + foreach($validationRules[self::FIELD_GENE_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION, self::FIELD_GENE_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENE_ELEMENT])) { + $errs[self::FIELD_GENE_ELEMENT] = []; + } + $errs[self::FIELD_GENE_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_REFERENCE_INFORMATION, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterial.php index 8c4b4c873c..b3a7ce369e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -323,7 +323,7 @@ class FHIRSubstanceSourceMaterial extends FHIRDomainResource implements PHPFHIRC * Validation map for fields in type SubstanceSourceMaterial * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSourceMaterial Constructor @@ -1310,12 +1310,356 @@ public function setSourceMaterialType(FHIRCodeableConcept $sourceMaterialType = } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCountryOfOrigin())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COUNTRY_OF_ORIGIN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDevelopmentStage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVELOPMENT_STAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFractionDescription())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FRACTION_DESCRIPTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGeographicalLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GEOGRAPHICAL_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganism())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANISM] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganismId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANISM_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganismName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANISM_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParentSubstanceId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARENT_SUBSTANCE_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParentSubstanceName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARENT_SUBSTANCE_NAME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartDescription())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_DESCRIPTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSourceMaterialClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_MATERIAL_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceMaterialState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_MATERIAL_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceMaterialType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_MATERIAL_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COUNTRY_OF_ORIGIN])) { + $v = $this->getCountryOfOrigin(); + foreach($validationRules[self::FIELD_COUNTRY_OF_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_COUNTRY_OF_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY_OF_ORIGIN])) { + $errs[self::FIELD_COUNTRY_OF_ORIGIN] = []; + } + $errs[self::FIELD_COUNTRY_OF_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVELOPMENT_STAGE])) { + $v = $this->getDevelopmentStage(); + foreach($validationRules[self::FIELD_DEVELOPMENT_STAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_DEVELOPMENT_STAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVELOPMENT_STAGE])) { + $errs[self::FIELD_DEVELOPMENT_STAGE] = []; + } + $errs[self::FIELD_DEVELOPMENT_STAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FRACTION_DESCRIPTION])) { + $v = $this->getFractionDescription(); + foreach($validationRules[self::FIELD_FRACTION_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_FRACTION_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRACTION_DESCRIPTION])) { + $errs[self::FIELD_FRACTION_DESCRIPTION] = []; + } + $errs[self::FIELD_FRACTION_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GEOGRAPHICAL_LOCATION])) { + $v = $this->getGeographicalLocation(); + foreach($validationRules[self::FIELD_GEOGRAPHICAL_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_GEOGRAPHICAL_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GEOGRAPHICAL_LOCATION])) { + $errs[self::FIELD_GEOGRAPHICAL_LOCATION] = []; + } + $errs[self::FIELD_GEOGRAPHICAL_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANISM])) { + $v = $this->getOrganism(); + foreach($validationRules[self::FIELD_ORGANISM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_ORGANISM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANISM])) { + $errs[self::FIELD_ORGANISM] = []; + } + $errs[self::FIELD_ORGANISM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANISM_ID])) { + $v = $this->getOrganismId(); + foreach($validationRules[self::FIELD_ORGANISM_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_ORGANISM_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANISM_ID])) { + $errs[self::FIELD_ORGANISM_ID] = []; + } + $errs[self::FIELD_ORGANISM_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANISM_NAME])) { + $v = $this->getOrganismName(); + foreach($validationRules[self::FIELD_ORGANISM_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_ORGANISM_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANISM_NAME])) { + $errs[self::FIELD_ORGANISM_NAME] = []; + } + $errs[self::FIELD_ORGANISM_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT_SUBSTANCE_ID])) { + $v = $this->getParentSubstanceId(); + foreach($validationRules[self::FIELD_PARENT_SUBSTANCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_PARENT_SUBSTANCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT_SUBSTANCE_ID])) { + $errs[self::FIELD_PARENT_SUBSTANCE_ID] = []; + } + $errs[self::FIELD_PARENT_SUBSTANCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT_SUBSTANCE_NAME])) { + $v = $this->getParentSubstanceName(); + foreach($validationRules[self::FIELD_PARENT_SUBSTANCE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_PARENT_SUBSTANCE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT_SUBSTANCE_NAME])) { + $errs[self::FIELD_PARENT_SUBSTANCE_NAME] = []; + } + $errs[self::FIELD_PARENT_SUBSTANCE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_DESCRIPTION])) { + $v = $this->getPartDescription(); + foreach($validationRules[self::FIELD_PART_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_PART_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_DESCRIPTION])) { + $errs[self::FIELD_PART_DESCRIPTION] = []; + } + $errs[self::FIELD_PART_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_MATERIAL_CLASS])) { + $v = $this->getSourceMaterialClass(); + foreach($validationRules[self::FIELD_SOURCE_MATERIAL_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_SOURCE_MATERIAL_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_MATERIAL_CLASS])) { + $errs[self::FIELD_SOURCE_MATERIAL_CLASS] = []; + } + $errs[self::FIELD_SOURCE_MATERIAL_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_MATERIAL_STATE])) { + $v = $this->getSourceMaterialState(); + foreach($validationRules[self::FIELD_SOURCE_MATERIAL_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_SOURCE_MATERIAL_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_MATERIAL_STATE])) { + $errs[self::FIELD_SOURCE_MATERIAL_STATE] = []; + } + $errs[self::FIELD_SOURCE_MATERIAL_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_MATERIAL_TYPE])) { + $v = $this->getSourceMaterialType(); + foreach($validationRules[self::FIELD_SOURCE_MATERIAL_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SOURCE_MATERIAL, self::FIELD_SOURCE_MATERIAL_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_MATERIAL_TYPE])) { + $errs[self::FIELD_SOURCE_MATERIAL_TYPE] = []; + } + $errs[self::FIELD_SOURCE_MATERIAL_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecification.php index f99e130482..a617b4e276 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -326,7 +326,7 @@ class FHIRSubstanceSpecification extends FHIRDomainResource implements PHPFHIRCo * Validation map for fields in type SubstanceSpecification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceSpecification Constructor @@ -1376,12 +1376,460 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDomain())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOMAIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMoiety())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MOIETY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMolecularWeight())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MOLECULAR_WEIGHT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNucleicAcid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUCLEIC_ACID] = $fieldErrs; + } + } + if (null !== ($v = $this->getPolymer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POLYMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProperty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROPERTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProtein())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROTEIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceInformation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_INFORMATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelationship())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATIONSHIP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSourceMaterial())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_MATERIAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStructure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRUCTURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOMAIN])) { + $v = $this->getDomain(); + foreach($validationRules[self::FIELD_DOMAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_DOMAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOMAIN])) { + $errs[self::FIELD_DOMAIN] = []; + } + $errs[self::FIELD_DOMAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MOIETY])) { + $v = $this->getMoiety(); + foreach($validationRules[self::FIELD_MOIETY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_MOIETY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MOIETY])) { + $errs[self::FIELD_MOIETY] = []; + } + $errs[self::FIELD_MOIETY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MOLECULAR_WEIGHT])) { + $v = $this->getMolecularWeight(); + foreach($validationRules[self::FIELD_MOLECULAR_WEIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_MOLECULAR_WEIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MOLECULAR_WEIGHT])) { + $errs[self::FIELD_MOLECULAR_WEIGHT] = []; + } + $errs[self::FIELD_MOLECULAR_WEIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUCLEIC_ACID])) { + $v = $this->getNucleicAcid(); + foreach($validationRules[self::FIELD_NUCLEIC_ACID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_NUCLEIC_ACID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUCLEIC_ACID])) { + $errs[self::FIELD_NUCLEIC_ACID] = []; + } + $errs[self::FIELD_NUCLEIC_ACID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLYMER])) { + $v = $this->getPolymer(); + foreach($validationRules[self::FIELD_POLYMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_POLYMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLYMER])) { + $errs[self::FIELD_POLYMER] = []; + } + $errs[self::FIELD_POLYMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTEIN])) { + $v = $this->getProtein(); + foreach($validationRules[self::FIELD_PROTEIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_PROTEIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTEIN])) { + $errs[self::FIELD_PROTEIN] = []; + } + $errs[self::FIELD_PROTEIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_INFORMATION])) { + $v = $this->getReferenceInformation(); + foreach($validationRules[self::FIELD_REFERENCE_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_REFERENCE_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_INFORMATION])) { + $errs[self::FIELD_REFERENCE_INFORMATION] = []; + } + $errs[self::FIELD_REFERENCE_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_MATERIAL])) { + $v = $this->getSourceMaterial(); + foreach($validationRules[self::FIELD_SOURCE_MATERIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_SOURCE_MATERIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_MATERIAL])) { + $errs[self::FIELD_SOURCE_MATERIAL] = []; + } + $errs[self::FIELD_SOURCE_MATERIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRUCTURE])) { + $v = $this->getStructure(); + foreach($validationRules[self::FIELD_STRUCTURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_STRUCTURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRUCTURE])) { + $errs[self::FIELD_STRUCTURE] = []; + } + $errs[self::FIELD_STRUCTURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_SPECIFICATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php index f73f28b70f..b7d360e171 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -264,7 +264,7 @@ class FHIRSupplyDelivery extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type SupplyDelivery * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyDelivery Constructor @@ -1008,12 +1008,352 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReceiver())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECEIVER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSuppliedItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLIED_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIED_ITEM])) { + $v = $this->getSuppliedItem(); + foreach($validationRules[self::FIELD_SUPPLIED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_SUPPLIED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIED_ITEM])) { + $errs[self::FIELD_SUPPLIED_ITEM] = []; + } + $errs[self::FIELD_SUPPLIED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIER])) { + $v = $this->getSupplier(); + foreach($validationRules[self::FIELD_SUPPLIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_SUPPLIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIER])) { + $errs[self::FIELD_SUPPLIER] = []; + } + $errs[self::FIELD_SUPPLIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php index d3aa409abb..7f99868af9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -342,7 +342,7 @@ class FHIRSupplyRequest extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type SupplyRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyRequest Constructor @@ -1376,12 +1376,439 @@ public function setSupplier(array $supplier = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeliverFrom())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DELIVER_FROM] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeliverTo())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DELIVER_TO] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupplier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPLIER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DELIVER_FROM])) { + $v = $this->getDeliverFrom(); + foreach($validationRules[self::FIELD_DELIVER_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_DELIVER_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DELIVER_FROM])) { + $errs[self::FIELD_DELIVER_FROM] = []; + } + $errs[self::FIELD_DELIVER_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DELIVER_TO])) { + $v = $this->getDeliverTo(); + foreach($validationRules[self::FIELD_DELIVER_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_DELIVER_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DELIVER_TO])) { + $errs[self::FIELD_DELIVER_TO] = []; + } + $errs[self::FIELD_DELIVER_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIER])) { + $v = $this->getSupplier(); + foreach($validationRules[self::FIELD_SUPPLIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_SUPPLIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIER])) { + $errs[self::FIELD_SUPPLIER] = []; + } + $errs[self::FIELD_SUPPLIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTask.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTask.php index add74cde23..863607d853 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTask.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTask.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -507,7 +507,7 @@ class FHIRTask extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Task * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTask Constructor @@ -2264,12 +2264,668 @@ public function setStatusReason(FHIRCodeableConcept $statusReason = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBusinessStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUSINESS_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getExecutionPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXECUTION_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getFor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInput())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INPUT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInstantiatesCanonical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getInstantiatesUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANTIATES_URI] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLastModified())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_MODIFIED] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutput())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTPUT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOwner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPerformerType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelevantHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELEVANT_HISTORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRestriction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESTRICTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BUSINESS_STATUS])) { + $v = $this->getBusinessStatus(); + foreach($validationRules[self::FIELD_BUSINESS_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_BUSINESS_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BUSINESS_STATUS])) { + $errs[self::FIELD_BUSINESS_STATUS] = []; + } + $errs[self::FIELD_BUSINESS_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXECUTION_PERIOD])) { + $v = $this->getExecutionPeriod(); + foreach($validationRules[self::FIELD_EXECUTION_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_EXECUTION_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXECUTION_PERIOD])) { + $errs[self::FIELD_EXECUTION_PERIOD] = []; + } + $errs[self::FIELD_EXECUTION_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOR])) { + $v = $this->getFor(); + foreach($validationRules[self::FIELD_FOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_FOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOR])) { + $errs[self::FIELD_FOR] = []; + } + $errs[self::FIELD_FOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INPUT])) { + $v = $this->getInput(); + foreach($validationRules[self::FIELD_INPUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_INPUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INPUT])) { + $errs[self::FIELD_INPUT] = []; + } + $errs[self::FIELD_INPUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_CANONICAL])) { + $v = $this->getInstantiatesCanonical(); + foreach($validationRules[self::FIELD_INSTANTIATES_CANONICAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_INSTANTIATES_CANONICAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_CANONICAL])) { + $errs[self::FIELD_INSTANTIATES_CANONICAL] = []; + } + $errs[self::FIELD_INSTANTIATES_CANONICAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES_URI])) { + $v = $this->getInstantiatesUri(); + foreach($validationRules[self::FIELD_INSTANTIATES_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_INSTANTIATES_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES_URI])) { + $errs[self::FIELD_INSTANTIATES_URI] = []; + } + $errs[self::FIELD_INSTANTIATES_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_MODIFIED])) { + $v = $this->getLastModified(); + foreach($validationRules[self::FIELD_LAST_MODIFIED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_LAST_MODIFIED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_MODIFIED])) { + $errs[self::FIELD_LAST_MODIFIED] = []; + } + $errs[self::FIELD_LAST_MODIFIED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTPUT])) { + $v = $this->getOutput(); + foreach($validationRules[self::FIELD_OUTPUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_OUTPUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTPUT])) { + $errs[self::FIELD_OUTPUT] = []; + } + $errs[self::FIELD_OUTPUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNER])) { + $v = $this->getOwner(); + foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_OWNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNER])) { + $errs[self::FIELD_OWNER] = []; + } + $errs[self::FIELD_OWNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER_TYPE])) { + $v = $this->getPerformerType(); + foreach($validationRules[self::FIELD_PERFORMER_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_PERFORMER_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER_TYPE])) { + $errs[self::FIELD_PERFORMER_TYPE] = []; + } + $errs[self::FIELD_PERFORMER_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEVANT_HISTORY])) { + $v = $this->getRelevantHistory(); + foreach($validationRules[self::FIELD_RELEVANT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_RELEVANT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEVANT_HISTORY])) { + $errs[self::FIELD_RELEVANT_HISTORY] = []; + } + $errs[self::FIELD_RELEVANT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESTRICTION])) { + $v = $this->getRestriction(); + foreach($validationRules[self::FIELD_RESTRICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_RESTRICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESTRICTION])) { + $errs[self::FIELD_RESTRICTION] = []; + } + $errs[self::FIELD_RESTRICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilities.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilities.php index 45ec6442ff..3877caeb8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilities.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilities.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -466,7 +466,7 @@ class FHIRTerminologyCapabilities extends FHIRDomainResource implements PHPFHIRC * Validation map for fields in type TerminologyCapabilities * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTerminologyCapabilities Constructor @@ -1991,12 +1991,539 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClosure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLOSURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCodeSearch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_SEARCH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCodeSystem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE_SYSTEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpansion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPANSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getImplementation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLEMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getLockedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCKED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSoftware())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOFTWARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTranslation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRANSLATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValidateCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDATE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLOSURE])) { + $v = $this->getClosure(); + foreach($validationRules[self::FIELD_CLOSURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_CLOSURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLOSURE])) { + $errs[self::FIELD_CLOSURE] = []; + } + $errs[self::FIELD_CLOSURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE_SEARCH])) { + $v = $this->getCodeSearch(); + foreach($validationRules[self::FIELD_CODE_SEARCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_CODE_SEARCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_SEARCH])) { + $errs[self::FIELD_CODE_SEARCH] = []; + } + $errs[self::FIELD_CODE_SEARCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE_SYSTEM])) { + $v = $this->getCodeSystem(); + foreach($validationRules[self::FIELD_CODE_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_CODE_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_SYSTEM])) { + $errs[self::FIELD_CODE_SYSTEM] = []; + } + $errs[self::FIELD_CODE_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPANSION])) { + $v = $this->getExpansion(); + foreach($validationRules[self::FIELD_EXPANSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_EXPANSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPANSION])) { + $errs[self::FIELD_EXPANSION] = []; + } + $errs[self::FIELD_EXPANSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLEMENTATION])) { + $v = $this->getImplementation(); + foreach($validationRules[self::FIELD_IMPLEMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_IMPLEMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLEMENTATION])) { + $errs[self::FIELD_IMPLEMENTATION] = []; + } + $errs[self::FIELD_IMPLEMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCKED_DATE])) { + $v = $this->getLockedDate(); + foreach($validationRules[self::FIELD_LOCKED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_LOCKED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCKED_DATE])) { + $errs[self::FIELD_LOCKED_DATE] = []; + } + $errs[self::FIELD_LOCKED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOFTWARE])) { + $v = $this->getSoftware(); + foreach($validationRules[self::FIELD_SOFTWARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_SOFTWARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOFTWARE])) { + $errs[self::FIELD_SOFTWARE] = []; + } + $errs[self::FIELD_SOFTWARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRANSLATION])) { + $v = $this->getTranslation(); + foreach($validationRules[self::FIELD_TRANSLATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_TRANSLATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSLATION])) { + $errs[self::FIELD_TRANSLATION] = []; + } + $errs[self::FIELD_TRANSLATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATE_CODE])) { + $v = $this->getValidateCode(); + foreach($validationRules[self::FIELD_VALIDATE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_VALIDATE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATE_CODE])) { + $errs[self::FIELD_VALIDATE_CODE] = []; + } + $errs[self::FIELD_VALIDATE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TERMINOLOGY_CAPABILITIES, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestReport.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestReport.php index a19a094262..378230088a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestReport.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -248,7 +248,7 @@ class FHIRTestReport extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type TestReport * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReport Constructor @@ -942,12 +942,331 @@ public function setTester($tester = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getResult())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESULT] = $fieldErrs; + } + } + if (null !== ($v = $this->getScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCORE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSetup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SETUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTeardown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEARDOWN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTestScript())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEST_SCRIPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TESTER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORE])) { + $v = $this->getScore(); + foreach($validationRules[self::FIELD_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORE])) { + $errs[self::FIELD_SCORE] = []; + } + $errs[self::FIELD_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SETUP])) { + $v = $this->getSetup(); + foreach($validationRules[self::FIELD_SETUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_SETUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SETUP])) { + $errs[self::FIELD_SETUP] = []; + } + $errs[self::FIELD_SETUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEARDOWN])) { + $v = $this->getTeardown(); + foreach($validationRules[self::FIELD_TEARDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_TEARDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEARDOWN])) { + $errs[self::FIELD_TEARDOWN] = []; + } + $errs[self::FIELD_TEARDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEST])) { + $v = $this->getTest(); + foreach($validationRules[self::FIELD_TEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_TEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEST])) { + $errs[self::FIELD_TEST] = []; + } + $errs[self::FIELD_TEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEST_SCRIPT])) { + $v = $this->getTestScript(); + foreach($validationRules[self::FIELD_TEST_SCRIPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_TEST_SCRIPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEST_SCRIPT])) { + $errs[self::FIELD_TEST_SCRIPT] = []; + } + $errs[self::FIELD_TEST_SCRIPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TESTER])) { + $v = $this->getTester(); + foreach($validationRules[self::FIELD_TESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_TESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TESTER])) { + $errs[self::FIELD_TESTER] = []; + } + $errs[self::FIELD_TESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestScript.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestScript.php index af370a0883..cc0a5e7b3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestScript.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestScript.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -448,7 +448,7 @@ class FHIRTestScript extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type TestScript * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScript Constructor @@ -2068,12 +2068,549 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDestination())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESTINATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFixture())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FIXTURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMetadata())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METADATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOrigin())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ORIGIN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSetup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SETUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTeardown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEARDOWN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getVariable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VARIABLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXTURE])) { + $v = $this->getFixture(); + foreach($validationRules[self::FIELD_FIXTURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_FIXTURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXTURE])) { + $errs[self::FIELD_FIXTURE] = []; + } + $errs[self::FIELD_FIXTURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METADATA])) { + $v = $this->getMetadata(); + foreach($validationRules[self::FIELD_METADATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_METADATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METADATA])) { + $errs[self::FIELD_METADATA] = []; + } + $errs[self::FIELD_METADATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SETUP])) { + $v = $this->getSetup(); + foreach($validationRules[self::FIELD_SETUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_SETUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SETUP])) { + $errs[self::FIELD_SETUP] = []; + } + $errs[self::FIELD_SETUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEARDOWN])) { + $v = $this->getTeardown(); + foreach($validationRules[self::FIELD_TEARDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_TEARDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEARDOWN])) { + $errs[self::FIELD_TEARDOWN] = []; + } + $errs[self::FIELD_TEARDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEST])) { + $v = $this->getTest(); + foreach($validationRules[self::FIELD_TEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_TEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEST])) { + $errs[self::FIELD_TEST] = []; + } + $errs[self::FIELD_TEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIABLE])) { + $v = $this->getVariable(); + foreach($validationRules[self::FIELD_VARIABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_VARIABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIABLE])) { + $errs[self::FIELD_VARIABLE] = []; + } + $errs[self::FIELD_VARIABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRValueSet.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRValueSet.php index c0e6804272..9276a9474f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRValueSet.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRValueSet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -383,7 +383,7 @@ class FHIRValueSet extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type ValueSet * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSet Constructor @@ -1646,12 +1646,437 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCompose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpansion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPANSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getImmutable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUTABLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPOSE])) { + $v = $this->getCompose(); + foreach($validationRules[self::FIELD_COMPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_COMPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPOSE])) { + $errs[self::FIELD_COMPOSE] = []; + } + $errs[self::FIELD_COMPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPANSION])) { + $v = $this->getExpansion(); + foreach($validationRules[self::FIELD_EXPANSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXPANSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPANSION])) { + $errs[self::FIELD_EXPANSION] = []; + } + $errs[self::FIELD_EXPANSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMMUTABLE])) { + $v = $this->getImmutable(); + foreach($validationRules[self::FIELD_IMMUTABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_IMMUTABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMMUTABLE])) { + $errs[self::FIELD_IMMUTABLE] = []; + } + $errs[self::FIELD_IMMUTABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVerificationResult.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVerificationResult.php index 440550f3ec..525d79f71f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVerificationResult.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVerificationResult.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -284,7 +284,7 @@ class FHIRVerificationResult extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type VerificationResult * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVerificationResult Constructor @@ -1180,12 +1180,371 @@ public function setValidator(array $validator = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAttestation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ATTESTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFailureAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FAILURE_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrequency())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FREQUENCY] = $fieldErrs; + } + } + if (null !== ($v = $this->getLastPerformed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_PERFORMED] = $fieldErrs; + } + } + if (null !== ($v = $this->getNeed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NEED] = $fieldErrs; + } + } + if (null !== ($v = $this->getNextScheduled())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NEXT_SCHEDULED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrimarySource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRIMARY_SOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTargetLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET_LOCATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getValidationProcess())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALIDATION_PROCESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValidationType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDATION_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValidator())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALIDATOR, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ATTESTATION])) { + $v = $this->getAttestation(); + foreach($validationRules[self::FIELD_ATTESTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_ATTESTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTESTATION])) { + $errs[self::FIELD_ATTESTATION] = []; + } + $errs[self::FIELD_ATTESTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FAILURE_ACTION])) { + $v = $this->getFailureAction(); + foreach($validationRules[self::FIELD_FAILURE_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_FAILURE_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FAILURE_ACTION])) { + $errs[self::FIELD_FAILURE_ACTION] = []; + } + $errs[self::FIELD_FAILURE_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FREQUENCY])) { + $v = $this->getFrequency(); + foreach($validationRules[self::FIELD_FREQUENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_FREQUENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FREQUENCY])) { + $errs[self::FIELD_FREQUENCY] = []; + } + $errs[self::FIELD_FREQUENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_PERFORMED])) { + $v = $this->getLastPerformed(); + foreach($validationRules[self::FIELD_LAST_PERFORMED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_LAST_PERFORMED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_PERFORMED])) { + $errs[self::FIELD_LAST_PERFORMED] = []; + } + $errs[self::FIELD_LAST_PERFORMED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NEED])) { + $v = $this->getNeed(); + foreach($validationRules[self::FIELD_NEED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_NEED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NEED])) { + $errs[self::FIELD_NEED] = []; + } + $errs[self::FIELD_NEED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NEXT_SCHEDULED])) { + $v = $this->getNextScheduled(); + foreach($validationRules[self::FIELD_NEXT_SCHEDULED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_NEXT_SCHEDULED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NEXT_SCHEDULED])) { + $errs[self::FIELD_NEXT_SCHEDULED] = []; + } + $errs[self::FIELD_NEXT_SCHEDULED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIMARY_SOURCE])) { + $v = $this->getPrimarySource(); + foreach($validationRules[self::FIELD_PRIMARY_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_PRIMARY_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIMARY_SOURCE])) { + $errs[self::FIELD_PRIMARY_SOURCE] = []; + } + $errs[self::FIELD_PRIMARY_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_DATE])) { + $v = $this->getStatusDate(); + foreach($validationRules[self::FIELD_STATUS_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_STATUS_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_DATE])) { + $errs[self::FIELD_STATUS_DATE] = []; + } + $errs[self::FIELD_STATUS_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_LOCATION])) { + $v = $this->getTargetLocation(); + foreach($validationRules[self::FIELD_TARGET_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_TARGET_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_LOCATION])) { + $errs[self::FIELD_TARGET_LOCATION] = []; + } + $errs[self::FIELD_TARGET_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATION_PROCESS])) { + $v = $this->getValidationProcess(); + foreach($validationRules[self::FIELD_VALIDATION_PROCESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_VALIDATION_PROCESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATION_PROCESS])) { + $errs[self::FIELD_VALIDATION_PROCESS] = []; + } + $errs[self::FIELD_VALIDATION_PROCESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATION_TYPE])) { + $v = $this->getValidationType(); + foreach($validationRules[self::FIELD_VALIDATION_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_VALIDATION_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATION_TYPE])) { + $errs[self::FIELD_VALIDATION_TYPE] = []; + } + $errs[self::FIELD_VALIDATION_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATOR])) { + $v = $this->getValidator(); + foreach($validationRules[self::FIELD_VALIDATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VERIFICATION_RESULT, self::FIELD_VALIDATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATOR])) { + $errs[self::FIELD_VALIDATOR] = []; + } + $errs[self::FIELD_VALIDATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php index c96d9e0113..60dfb0dd95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -199,7 +199,7 @@ class FHIRVisionPrescription extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type VisionPrescription * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_LENS_SPECIFICATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -703,12 +703,263 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateWritten())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_WRITTEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLensSpecification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LENS_SPECIFICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescriber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_WRITTEN])) { + $v = $this->getDateWritten(); + foreach($validationRules[self::FIELD_DATE_WRITTEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_DATE_WRITTEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_WRITTEN])) { + $errs[self::FIELD_DATE_WRITTEN] = []; + } + $errs[self::FIELD_DATE_WRITTEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LENS_SPECIFICATION])) { + $v = $this->getLensSpecification(); + foreach($validationRules[self::FIELD_LENS_SPECIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_LENS_SPECIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LENS_SPECIFICATION])) { + $errs[self::FIELD_LENS_SPECIFICATION] = []; + } + $errs[self::FIELD_LENS_SPECIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIBER])) { + $v = $this->getPrescriber(); + foreach($validationRules[self::FIELD_PRESCRIBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_PRESCRIBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIBER])) { + $errs[self::FIELD_PRESCRIBER] = []; + } + $errs[self::FIELD_PRESCRIBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRParameters.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRParameters.php index 915c89af66..2508b0329f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRParameters.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRParameters.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRParameters extends FHIRResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Parameters * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParameters Constructor @@ -224,12 +224,94 @@ public function setParameter(array $parameter = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResourceContainer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResourceContainer.php index 88b48d1da6..c43a08a2e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResourceContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResourceContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -218,6 +218,7 @@ class FHIRResourceContainer implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_CONTAINER; @@ -1801,7 +1802,7 @@ class FHIRResourceContainer implements PHPFHIRCommentContainerInterface, PHPFHIR * Validation map for fields in type ResourceContainer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceContainer Constructor @@ -6912,12 +6913,757 @@ public function setVisionPrescription(FHIRVisionPrescription $VisionPrescription } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - // TODO: implement validation - return []; + $errs = []; + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getActivityDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVITY_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdverseEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADVERSE_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllergyIntolerance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLERGY_INTOLERANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointmentResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuditEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUDIT_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBasic())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASIC] = $fieldErrs; + } + } + if (null !== ($v = $this->getBinary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getBiologicallyDerivedProduct())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIOLOGICALLY_DERIVED_PRODUCT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBodyStructure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_STRUCTURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBundle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUNDLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCapabilityStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAPABILITY_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCarePlan())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARE_PLAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getCareTeam())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARE_TEAM] = $fieldErrs; + } + } + if (null !== ($v = $this->getCatalogEntry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATALOG_ENTRY] = $fieldErrs; + } + } + if (null !== ($v = $this->getChargeItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHARGE_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getChargeItemDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHARGE_ITEM_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaim())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getClinicalImpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_IMPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCodeSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getCommunication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMUNICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCommunicationRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMUNICATION_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompartmentDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARTMENT_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getComposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getConceptMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCEPT_MAP] = $fieldErrs; + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getConsent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONSENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverageEligibilityRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE_ELIGIBILITY_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverageEligibilityResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE_ELIGIBILITY_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetectedIssue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETECTED_ISSUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceMetric())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_METRIC] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceUseStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_USE_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosticReport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTIC_REPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentManifest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT_MANIFEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectEvidenceSynthesis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECT_EVIDENCE_SYNTHESIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnrollmentRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENROLLMENT_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnrollmentResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENROLLMENT_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEpisodeOfCare())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EPISODE_OF_CARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEvidence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVIDENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEvidenceVariable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVIDENCE_VARIABLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleScenario())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_SCENARIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getExplanationOfBenefit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPLANATION_OF_BENEFIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFamilyMemberHistory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FAMILY_MEMBER_HISTORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFlag())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FLAG] = $fieldErrs; + } + } + if (null !== ($v = $this->getGoal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GOAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getGraphDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GRAPH_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getGuidanceResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GUIDANCE_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getHealthcareService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEALTHCARE_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getImagingStudy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMAGING_STUDY] = $fieldErrs; + } + } + if (null !== ($v = $this->getImmunization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUNIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getImmunizationEvaluation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUNIZATION_EVALUATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getImmunizationRecommendation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUNIZATION_RECOMMENDATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getImplementationGuide())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLEMENTATION_GUIDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getInsurancePlan())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURANCE_PLAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getInvoice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INVOICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLibrary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIBRARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getLinkage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINKAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getList())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIST] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasureReport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE_REPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedia())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationAdministration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_ADMINISTRATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationDispense())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_DISPENSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationKnowledge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_KNOWLEDGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicinalProduct())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICINAL_PRODUCT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicinalProductAuthorization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICINAL_PRODUCT_AUTHORIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicinalProductContraindication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICINAL_PRODUCT_CONTRAINDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicinalProductIndication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICINAL_PRODUCT_INDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicinalProductIngredient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICINAL_PRODUCT_INGREDIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicinalProductInteraction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICINAL_PRODUCT_INTERACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicinalProductManufactured())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICINAL_PRODUCT_MANUFACTURED] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicinalProductPackaged())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICINAL_PRODUCT_PACKAGED] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicinalProductPharmaceutical())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICINAL_PRODUCT_PHARMACEUTICAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicinalProductUndesirableEffect())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICINAL_PRODUCT_UNDESIRABLE_EFFECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMessageDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMessageHeader())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE_HEADER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMolecularSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MOLECULAR_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNamingSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAMING_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getNutritionOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUTRITION_ORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getObservation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getObservationDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVATION_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganizationAffiliation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION_AFFILIATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getParameters())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARAMETERS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentNotice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_NOTICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentReconciliation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_RECONCILIATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerson())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERSON] = $fieldErrs; + } + } + if (null !== ($v = $this->getPlanDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PLAN_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPractitioner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTITIONER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPractitionerRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTITIONER_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvenance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVENANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuestionnaire())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTIONNAIRE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuestionnaireResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTIONNAIRE_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelatedPerson())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATED_PERSON] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getResearchDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESEARCH_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getResearchElementDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESEARCH_ELEMENT_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getResearchStudy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESEARCH_STUDY] = $fieldErrs; + } + } + if (null !== ($v = $this->getResearchSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESEARCH_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getRiskAssessment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RISK_ASSESSMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getRiskEvidenceSynthesis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RISK_EVIDENCE_SYNTHESIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSearchParameter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH_PARAMETER] = $fieldErrs; + } + } + if (null !== ($v = $this->getServiceRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getSlot())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLOT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecimen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecimenDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStructureDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRUCTURE_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStructureMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRUCTURE_MAP] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubscription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstanceNucleicAcid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_NUCLEIC_ACID] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstancePolymer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_POLYMER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstanceProtein())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_PROTEIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstanceReferenceInformation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_REFERENCE_INFORMATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstanceSourceMaterial())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_SOURCE_MATERIAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstanceSpecification())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_SPECIFICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplyDelivery())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLY_DELIVERY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplyRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLY_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getTask())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TASK] = $fieldErrs; + } + } + if (null !== ($v = $this->getTerminologyCapabilities())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TERMINOLOGY_CAPABILITIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getTestReport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEST_REPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTestScript())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEST_SCRIPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET] = $fieldErrs; + } + } + if (null !== ($v = $this->getVerificationResult())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERIFICATION_RESULT] = $fieldErrs; + } + } + if (null !== ($v = $this->getVisionPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VISION_PRESCRIPTION] = $fieldErrs; + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRSampledDataDataTypePrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRSampledDataDataTypePrimitive.php index ab092c60b6..f0c633e7b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRSampledDataDataTypePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRSampledDataDataTypePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type SampledDataDataType-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^((-{0,1}\\d*\\.{0,1}\\d+)|[EUL])( ((-{0,1}\\d*\\.{0,1}\\d+)|[EUL]))*$/', ], @@ -168,12 +170,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRStringPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRStringPrimitive.php index afdc692e13..1fbb5c1976 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRStringPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRStringPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRStringPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRStringPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type string-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, ], @@ -168,12 +170,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRTimePrimitive.php index b6a5655dd9..e1c15b776f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRTimePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TIME_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRTimePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type time-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?$/', ], @@ -177,7 +179,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -188,12 +190,38 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIME_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUnsignedIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUnsignedIntPrimitive.php index 482c47c5e8..77a8d0e64e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUnsignedIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUnsignedIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRUnsignedIntPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRUnsignedIntPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type unsignedInt-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[0]|([1-9][0-9]*)$/', ], @@ -181,12 +183,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUriPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUriPrimitive.php index 98e66e24c1..903d08f5d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUriPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUriPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRUriPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_URI_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRUriPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type uri-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^\\S*$/', ], @@ -168,12 +170,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_URI_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUrlPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUrlPrimitive.php index 71fd7c4559..76c9497bc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUrlPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUrlPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRUrlPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_URL_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRUrlPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type url-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^\\S*$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,12 +171,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_URL_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUuidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUuidPrimitive.php index 9cfc6043bf..c0e576ea39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUuidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUuidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRUuidPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UUID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRUuidPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type uuid-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,12 +171,38 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - // TODO: implement validation - return []; + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UUID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRAutoloader.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRAutoloader.php index 09ca323c6c..7cc3dce755 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRAutoloader.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRAutoloader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -79,6 +79,9 @@ if (!trait_exists('\DCarbone\PHPFHIRGenerated\R4\PHPFHIRCommentContainerTrait', false)) { require __DIR__ . DIRECTORY_SEPARATOR . 'PHPFHIRCommentContainerTrait.php'; } +if (!trait_exists('\DCarbone\PHPFHIRGenerated\R4\PHPFHIRValidationAssertionsTrait', false)) { + require __DIR__ . DIRECTORY_SEPARATOR . 'PHPFHIRValidationAssertionsTrait.php'; +} // common classes if (!class_exists('\DCarbone\PHPFHIRGenerated\R4\PHPFHIRConstants', false)) { diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerInterface.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerInterface.php index 0da767e0f8..8fb237b0d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerTrait.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerTrait.php index cdbfc3891f..a91e1fc95e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerTrait.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerTrait.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRConstants.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRConstants.php index e557d911eb..540bd7e102 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRConstants.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRConstants.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ abstract class PHPFHIRConstants const SOURCE_GENERATION_DATE = 'Fri, Nov 1, 2019 09:29+1100'; // PHPFHIR - const CODE_GENERATION_DATE = 'December 7th, 2019 16:37+0000'; + const CODE_GENERATION_DATE = 'December 22nd, 2019 07:25+0000'; // Common const JSON_FIELD_RESOURCE_TYPE = 'resourceType'; @@ -92,6 +92,8 @@ abstract class PHPFHIRConstants const INT_MAX = 2147483648; const INT_MIN = -2147483648; + const UNLIMITED = -1; + // Validation const VALIDATE_ENUM = 0x1; const VALIDATE_MIN_LENGTH = 0x2; diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRContainedTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRContainedTypeInterface.php index b1f0f2cefc..447c06769c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRContainedTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRContainedTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParser.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParser.php index 2bf4d63640..f2b16d2abe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParser.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParser.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParserConfig.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParserConfig.php index 47bf764259..f43b3c564f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParserConfig.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParserConfig.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php index f489e322e4..42e2f63508 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBooleanPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBooleanPrimitiveTest.php index 25c7a9f2f1..481d4dafc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBooleanPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBooleanPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCanonicalPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCanonicalPrimitiveTest.php index 760183bd23..5f9dfc3ad5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCanonicalPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCanonicalPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php index 489058aa87..2b49c57e1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php index f76a2aba44..9221db4088 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php index 5c6db46f8e..111550d6c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php index 0c95dfab3c..0fafedbd39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php index 712a89d991..c00360e8b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php index b4913d42f0..ef076c7245 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php index 2e0fc7702f..a2d76ebaf9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php index 0acf571616..069855a397 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php index 0456fecc8d..5cd11a953e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php index 757f37801b..b219a44657 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php index 1ebf22be3b..675e2a63a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php index f98f4d0d5e..14e4c1f4d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventActualityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventActualityListTest.php index 27f79f9206..f815433f06 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventActualityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventActualityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php index 689439112d..dd8d668584 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php index 077a55e690..4f56eda5ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php index 0ea1729231..7854a29862 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php index 142bdaa9e7..b0e79a8071 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php index 014adbbf75..4ffee2cb10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php index 520d197a6c..126cfd8d77 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php index df56a2fd28..249c539e6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php index f330c85b99..beb6036304 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php index 564d99e4ac..870f293736 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php index 02885fafcf..2cb7badc2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php index 80f3452123..6e2f17d1f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php index 6351a691c7..fa0cbbff86 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php index e15bb66242..b37b116b81 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryListTest.php index eb9927a81a..964110b1be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusListTest.php index ca7d197707..9679461a69 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleListTest.php index bcf7e5008d..2c4116217f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php index 027f267dac..cde406bf6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php index 71c5460d02..f2b4610478 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityKindListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityKindListTest.php index 7c1b4bf0b5..b3b19bb99d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php index cca8cc988f..9f7814d911 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php index d20413f1d7..9b8d70a8e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php index 1b747629db..53cc73c5f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeListTest.php index cddfd3e4be..71a34b40db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php index 6e0d852ae9..fa0079589a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClaimProcessingCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClaimProcessingCodesListTest.php index d10ccf3da1..db521ba1d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClaimProcessingCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClaimProcessingCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php index 8cb5a568b6..a0dc86ff92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSearchSupportListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSearchSupportListTest.php index d8ed1fc6ca..fea457f6e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSearchSupportListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSearchSupportListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php index 5fb031af23..a03dafcd34 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php index df4b445ae1..1f11133b61 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php index 6cb9273883..04602c60fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php index 7cb69ce756..4087445ac5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php index acc578255f..0a1d640b23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php index acfa2ec7aa..3ba2cd931d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php index 27d315528f..cb58d309dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php index 57ca19a5a7..ce63fad9b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php index d1dd5a0784..ddeb17792f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php index 0921b3e4d4..bb1abe60bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentProvisionTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentProvisionTypeListTest.php index ca20ea3d57..94bb3f8cfc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentProvisionTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentProvisionTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php index 39944db1b5..f6106e522f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php index 6d598ca8d9..edef560d84 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php index 8e7aee4fb1..7002cc8bb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php index 2da0c5564a..3906d19915 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesListTest.php index df4357022f..2a0095943c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php index 6ba5cceed3..aa85b1d430 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php index ab25b069bc..ad45f76596 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php index d1beaccc09..c0bd69c5b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php index 4471591d49..05e50b882d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php index 034540889b..ef28ba5749 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php index 55a4bf8c03..9b2b43a053 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php index 11330fc1b5..5273cc04f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php index b97f435837..8ecbe463d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php index 1632fb45b3..93ab95b0c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceNameTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceNameTypeListTest.php index d1ed2d307b..de39662cee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceNameTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceNameTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php index 53bce90023..b25852af3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php index c8e9b46e83..a68d2b4b98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php index 6fe86ebecd..a4b63180e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php index 4a59348528..29dbd051e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php index 9a362f235c..5d2610e712 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php index bebb1ce352..2e253f947a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityRequestPurposeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityRequestPurposeListTest.php index af91e25237..258f143b72 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityRequestPurposeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityRequestPurposeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityResponsePurposeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityResponsePurposeListTest.php index a6345f29cd..dcb34aacd3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityResponsePurposeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityResponsePurposeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREnableWhenBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREnableWhenBehaviorListTest.php index 0a2b564235..1e000ed128 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREnableWhenBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREnableWhenBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php index b5fd50c22f..13d7bf9c58 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php index 19786218cd..9373732726 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php index 3cd07b44a1..d65f225838 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php index abc0941089..cc2502d6e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php index ad2c73cfa1..08b861677e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php index 0dc8670523..6476ac3d7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php index fd2203475e..c2a489ed3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREvidenceVariableTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREvidenceVariableTypeListTest.php index fe588b41f9..a806cb86cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREvidenceVariableTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREvidenceVariableTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExampleScenarioActorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExampleScenarioActorTypeListTest.php index 36fc817994..595ec9dbec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExampleScenarioActorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExampleScenarioActorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php index f858579735..dc3efe818e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExposureStateListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExposureStateListTest.php index 9f2543ec39..7198a10347 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExposureStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExposureStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExpressionLanguageListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExpressionLanguageListTest.php index 6dc44b20a9..89ea31b297 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExpressionLanguageListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExpressionLanguageListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextTypeListTest.php index 37ede7efd6..12143a96db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php index 21dedf0f94..545a690779 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php index 303e340948..a5dfee67ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRVersionListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRVersionListTest.php index e2b14ddfff..72f7be6a68 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRVersionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRVersionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php index c7ffdbdaf0..c5e41e6d6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php index fcab5dbce9..b926276387 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php index 1a4bdd65c2..51eeea82cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php index 9a0f4eb339..b0000b9327 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalLifecycleStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalLifecycleStatusListTest.php index dd97551af4..6caf5ce8ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalLifecycleStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalLifecycleStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php index 2cd095f88a..9b5fab663b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentUseListTest.php index c2ecc9f45a..9f8a010b62 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupMeasureListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupMeasureListTest.php index 9aecbbae78..f8b90061d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupMeasureListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupMeasureListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php index 10d8cd57f8..fad9190a58 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php index 86b75dd243..3a19335de4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageGenerationListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageGenerationListTest.php index 76296e5cbc..a18b6af124 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageGenerationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageGenerationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideParameterCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideParameterCodeListTest.php index ad899515f0..2c1a753f18 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideParameterCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideParameterCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php index 8ed687c9ab..03a54a5e44 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php index ba155f56d7..3e5931d8dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php index c771a2f984..015ef0aca3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImagingStudyStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImagingStudyStatusListTest.php index a4a7dfb4c3..cd3fdb093b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImagingStudyStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImagingStudyStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesListTest.php index 0ee896e556..2934cf83df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php index 2ced68f1d7..e8e0fdafe8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeListTest.php index 06de3ea25f..9d64542dbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoiceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoiceStatusListTest.php index c7bf5072c4..7265445f2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoiceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoiceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php index d72ad091b9..07dca48126 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php index a9b39fef82..03bd008073 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php index 6262dbc634..bf652b2775 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php index 00fdf762dc..56c7b228a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php index bbaf1f3e8e..685c93b7d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php index 6eac762305..0fc5b292e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php index d9f63b4bee..7536bb9e8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php index f65cd4e59b..e00da0a594 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php index a94108f200..3ef6d475fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php index 070082aba0..1145523df0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php index eb7bb4cf0a..26ffa8a300 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusCodesListTest.php index ca22d9a56f..7f2f4e3890 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationrequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationrequestStatusListTest.php index 41ec569fc2..7130c22a31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationrequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationrequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php index 6b47c58456..01ffd9b352 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageheaderResponseRequestListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageheaderResponseRequestListTest.php index ddbac323da..64ad83b875 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageheaderResponseRequestListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageheaderResponseRequestListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php index ac61f60f95..d2f254d399 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php index 623603252f..1ce680aafb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php index 4a8aa8963e..2e86150165 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php index 3262acec6f..f09581a874 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php index c2c6751964..8e5300a3e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationDataTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationDataTypeListTest.php index c087d10517..6070965901 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationDataTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationDataTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRangeCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRangeCategoryListTest.php index 345685e4e9..2d30c80a9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRangeCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRangeCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php index 1607955012..61811a3856 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php index 2cc9a672c0..bce55cdfcb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php index 5cf9dcbeef..02dc3721b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROrientationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROrientationTypeListTest.php index 157888ac8f..a332016224 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROrientationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROrientationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php index 3bee621387..d2f0981038 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php index c1c7961f84..bedd9df78d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php index 325556cb3f..3e8ec8ba98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php index 5e99ab3e03..cab60e9f3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php index 9ae57097b7..b95b951768 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php index c1387a3519..adfeafcf82 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php index 15e7d7409e..1758e21395 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php index bbce7249f6..19067e426d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorListTest.php index 723a9cb589..16dd8d0bfc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php index 76440ca05e..14bf232a27 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php index 7228e9e85a..60e0001abb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php index 82fc05fc9b..8cab800cf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php index ef82ff9521..972771e490 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php index b18bcef7d8..05ef39065a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php index 0645575949..4bf5015aa0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php index dbd36d25ec..01f5ed3050 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php index 901bbbf06f..4c8cacb77c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php index d444c3c08a..df36e8bfa5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestResourceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestResourceTypeListTest.php index e4d09ce695..8c499dc142 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestResourceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestResourceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php index 7f5655bcec..94bd979004 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchElementTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchElementTypeListTest.php index 0273862861..7c215abb47 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchElementTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchElementTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php index 2902b6012a..81fbae8aa7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php index 4d994c31b5..8536267caf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php index 12357b18c9..cc5b63e363 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php index 7f316d9b31..c17d6fb715 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php index 23c0c440a1..a8d9124513 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php index d8707c1f0f..7ebdd96322 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSPDXLicenseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSPDXLicenseListTest.php index fc3827d069..f3db7fc04a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSPDXLicenseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSPDXLicenseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php index 78f15a1d7e..7b81959b17 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php index 0255f84d94..8c842bf6e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php index 21f35d17c2..0a0029e41f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php index d649b8e614..75bc439424 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSequenceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSequenceTypeListTest.php index 3ea87ed2ec..a0e6456694 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSequenceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSequenceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php index 8bd491a9fc..75ae2a4b5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php index 8c88b03234..64481bea25 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSortDirectionListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSortDirectionListTest.php index 6bb1b8b31f..4d238f17b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSortDirectionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSortDirectionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceListTest.php index 63186a9b98..9dd2c4b0ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php index 6f41c3f296..1b59bc1153 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStatusListTest.php index 13b7e58089..8243b3b204 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStrandTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStrandTypeListTest.php index 3b73ea3eb1..278cd9bfc4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStrandTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStrandTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php index 3ea6083529..d6642c0c97 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php index 73e2b6be61..810004663d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php index 7ad882e213..5b2bf3abf8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php index 7ddab70615..4d8dc5921a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php index 2da07ac7b3..92c2aad138 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php index baf6e05be1..cb3ac9b537 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php index b6413d43eb..9bb9def503 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php index a1102fdb95..3650072c9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php index 0203555324..e595f849e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php index 0b6f8f324b..80fed0bc7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php index 8fa3ab02f1..fd19a1454a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php index 4ad7a3681c..d885de46d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php index 369e0662ed..dbd09e063e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskIntentListTest.php index 059bcf50c9..85678c248f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php index ad644a6477..1a806f2cd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php index c35891cd5f..6c8e3b51c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php index 64d3a70b1a..2f0377625f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php index c8f4feb9d0..375a3d53e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php index b5368a1069..326d7262b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php index a20e5f41de..9267d25509 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php index 49fe08f17a..1c44ab00cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php index 1e679bd6d8..c492c08883 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php index 9a63edcd3e..e42923dbf8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php index 6dec45a6f1..ef82511eaf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php index 879787d2a3..3a249ccbf5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php index 25170a876d..a4b822075f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVConfidentialityClassificationListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVConfidentialityClassificationListTest.php index fff27b2307..7a3cb63ab3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVConfidentialityClassificationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVConfidentialityClassificationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVariableTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVariableTypeListTest.php index 0dc7efa8cb..e33183f829 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVariableTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVariableTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php index de1d94f34e..07210c3f2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php index 147adc85ad..a6fc49d807 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php index 80f04954b8..60ebea5b6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitiveTest.php index c1ae494e92..c72b738c61 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDatePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDatePrimitiveTest.php index c1337f8507..ff1dca1222 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDatePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDatePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDateTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDateTimePrimitiveTest.php index 251dcdf1ae..003a12ea99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDateTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDateTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDecimalPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDecimalPrimitiveTest.php index a7f321974f..3edd4abfa4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDecimalPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDecimalPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php index 64f9959e8a..9f3dd36de3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php index 95b03ec459..9243d1c484 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php index daa372495d..e254ef91c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php index 3cf311ed85..7caeabf12d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php index 3e903ac867..12a749d962 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php index 18e5816ce7..0928bab403 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php index ad3bbdb649..958e1a9b7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php index 450382cb15..0733936b53 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php index 774bd664d6..71246d476d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTest.php index ebe4e25ea9..b479314145 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php index 03ca89eb8e..adbe42f195 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php index d35f7e84c4..df09424544 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php index c9245b49a8..162c5972e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdverseEventActualityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdverseEventActualityTest.php index 1953c60cc7..1a5b212f2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdverseEventActualityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdverseEventActualityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php index 5de61ae75e..2abfec6158 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php index 1cc9e7b571..4ce2827d95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php index 825e11d6ff..fa705b0683 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php index 65caca3ca0..a273e783e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php index 1986689d74..187469336b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php index b80fffe5e6..3f092b5dfb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php index d747252fc3..a4e8113ff4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php index 0c1b44e859..fd03878e7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php index 1f7f4ca46c..c50d5b3e15 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php index 7c4dcc4c39..e70c58f6a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php index 875ef27213..33b729bcce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php index 3bc7247658..c562cee412 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php index 6ab0012c18..8807e03d22 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php index a2ad971c4b..d990e90535 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php index ab38c91028..9615bfa12f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php index 933f892a78..6fae22f21d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php index fa32850710..034a305f4f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php index 37e3e53e3a..c3e9b8821a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausalityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausalityTest.php index 601e29922a..eeab00988a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php index 1a63c73b1c..f6eb7d5f37 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php index ab12008bac..81aae667aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php index 3e66219b7c..770d19bc06 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php index 106114c610..a092881a38 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php index 888dbac0fd..65daefc469 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php index 7a813021bd..f0bc116215 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php index 683ecb70cc..62e0a10f7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php index 5e3bbf5854..afe3a12001 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollectionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollectionTest.php index cee677986c..66b48adef0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulationTest.php index cb95e848fb..e8fafeee88 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessingTest.php index b75c09e697..da1bee716f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorageTest.php index 3c751bec2d..1468bdb14f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php index 2c17070ff0..956e32de55 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php index 45530c184c..dc60b69648 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php index 126b920e5d..3b4f044e38 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php index 2b3fe9f278..ca57d3340d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php index c4d164bfeb..e76c24c8c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php index 6817f36e08..47fad78da9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php index 53518efe97..ca2358bc5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php index 972ff39ffb..41ec6a6fd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php index 98559bd3a5..f40bce18ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php index eccae6f636..c561281e76 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php index 3bee0a0271..d1fd9083df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php index 97e2d97191..ef613b8f17 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php index fa0245e6b9..e857dfce5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php index 68fe2d9ef6..56ea8386aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php index 223b564814..db5eff5291 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php index d8b39c1843..948cf73222 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php index d18cea0033..1afea909ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php index 04daee5773..ce77b8d011 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php index 48e05df3ff..3ca2f1b636 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php index 6d5f0ffa7a..0a25574b70 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php index 2ac8bf2d16..4a36b5c731 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntryTest.php index 297e1476cf..27ff805f27 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformerTest.php index 8af6f5fece..a84eae856d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicabilityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicabilityTest.php index 8de2eecfdc..150fa4f8d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponentTest.php index e4c82ae621..9f78f5dd32 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroupTest.php index 9759036137..f0bd555ec3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php index 917cfc8794..e0b99f5376 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php index 0d21d9837e..ddb8573615 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php index 525c30d4e9..9af6eccd18 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php index 4eebdba7de..148c27ce8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php index 6265329500..10c620e5d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php index 3ff6f8d48c..e4caa1fe8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php index 9dd3205f8f..b0ea1f1632 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php index e33b26616f..f9589e283a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php index 41793513c8..8e6ebfe577 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php index a08cf29b61..be1509b00e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfoTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfoTest.php index f50d1937d7..5ffa175434 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfoTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfoTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php index e29debc3dc..86a3f3e1d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php index 76c8cb0446..0697dda0cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php index e52f9fa973..6dc0208d6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php index 2b58037901..2447c939bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php index a7ee6d2764..d58672f8a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php index 873be329be..1e1217ad20 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php index 4863b15c33..db1320e5b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php index 210c341f72..5b234faf5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php index 2eb74ffe06..3efea31dc0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1Test.php index 020b4c33d3..250128b090 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php index c9e7b83128..20e8a55b67 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotalTest.php index 63bc065e19..aaa8cb0621 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php index c6c1c19a0a..61845a4ce7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php index 37e1cf1374..31078c17bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php index 3985bdfdde..8d6466d077 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php index 411297dee3..c9ec6f6a20 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php index 6e086d0df9..59a07efe5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php index 240ea7a9a4..976a9e08aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php index 992c45d376..26f4c430be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php index c88e79d4f5..c2d95e7172 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php index 53b2f7c34b..504cafbd64 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php index ac25bd8e1e..cce250933c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php index fc2457bb27..ca05ff09ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php index f3a6f01410..e67bda9ea8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php index e5dd669110..df61ad6e29 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php index 108735d2a4..9826b15c16 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php index e7226748aa..6795581e9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php index bfca2ea40d..36d2f88cf3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php index 513102e9d8..0689ad9ab3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php index 3be5fc6453..bc50606d45 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php index 6dad1bdbe2..25885ac9a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php index 6ce106563e..2b539edc08 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php index 89ce3a47ec..4976803185 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php index a267fba348..477a42f600 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php index fa5d539069..1c4bfcef8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php index e8536c60be..077babb176 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvisionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvisionTest.php index 4bba726b70..a35200ddce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvisionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvisionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerificationTest.php index 5ed4ab06ee..236d296547 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActionTest.php index 105ff5f70b..26cd1f4604 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswerTest.php index 994d1aab36..2043f97e00 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAssetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAssetTest.php index b995f2bc5f..809e1197e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAssetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAssetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinitionTest.php index 95f6a7f4c5..6ce49d5027 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContextTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContextTest.php index d85dff42d8..6a0f3fdaad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php index 02d1f9c7a7..b1c5d48e03 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php index 86fef1b418..4a6e53d46f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOfferTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOfferTest.php index 7fa3ae7086..1cdc9a98b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOfferTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOfferTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractPartyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractPartyTest.php index 0fe116bfad..41f21af5ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractPartyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractPartyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php index baad4a157d..2f6e700809 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabelTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabelTest.php index 3cc9b92457..26dde14ece 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php index 68727f6c39..c4f6d19cc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubjectTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubjectTest.php index f7778458bb..2a83d9c553 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubjectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubjectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php index af5bcd90a1..16817b114b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php index 95e4335f96..d401ab88e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClassTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClassTest.php index 90bf5f3f4e..6419f60eb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClassTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClassTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiaryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiaryTest.php index d2962d1777..b894447485 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageExceptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageExceptionTest.php index 2f51a437f6..59dfc263b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageExceptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageExceptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosisTest.php index 711ade353e..0735882cd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsuranceTest.php index 1641d828f6..ac0d0384c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItemTest.php index 1c59ee64d7..ebf7ce0ee6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfoTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfoTest.php index aee5e8e45a..34e09ce83b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfoTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfoTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefitTest.php index 2f56d3db49..79bfef0c9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseErrorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseErrorTest.php index d0dec7eed1..7947280c9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseErrorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseErrorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsuranceTest.php index dfa351bf75..30f4d82628 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItemTest.php index d44b4297dc..f7ecc1c737 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidenceTest.php index 53a33ef21d..ea13b35438 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php index 8b9b75d40b..f6365fdc5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceNameTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceNameTest.php index 1d8479f407..cd754bd818 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDevicePropertyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDevicePropertyTest.php index 46c07f938b..0492625d2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDevicePropertyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDevicePropertyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecializationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecializationTest.php index 239a2ebac6..218b7834d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecializationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecializationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrierTest.php index 8d7ddc858c..208505ad3e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersionTest.php index 29da13e077..dd5d11f8f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapabilityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapabilityTest.php index 42bde3c0cb..7cb2e6c37c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceNameTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceNameTest.php index 42913cf23d..cffe7f0844 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterialTest.php index 9937c02756..d8fe290c3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionPropertyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionPropertyTest.php index e2b2ce7998..f4f6ab75fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionPropertyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionPropertyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecializationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecializationTest.php index 0e5f573450..0738cc3bef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecializationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecializationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifierTest.php index 67bdb2a19b..191e8211ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php index d6418450c7..86189212c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameterTest.php index c3db982243..a1be987366 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMediaTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMediaTest.php index ecd0bcc7d5..3e5dc2f6c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMediaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMediaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php index 41918c43d0..d3b85e10dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php index 3e88cb2688..f55f625590 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php index 5ca2971b10..0674cc7d13 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php index 0b51efbedc..37a91cd16b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRateTest.php index c963ca0561..2f7ba5f32b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosageTest.php index 149f32eb3a..3b12f5e591 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponentTest.php index 1ded187fd5..1ed59fd6a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintyTest.php index 533228cf31..243974d005 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimateTest.php index f424099984..c2804e577e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimateTest.php index 3bddf8862a..fed3c4560c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposureTest.php index eac8d5afaa..4436719911 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSizeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSizeTest.php index 523e12c1bc..149d24035e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSizeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSizeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php index 2092805e6a..72e9a857ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php index 6cd5349ddf..8fcbbb607f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php index 09074a9347..c8f8fba081 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php index ebf37ec655..fd7c1dd00f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php index 808c039d73..9bea3ae015 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php index 5dde67d7c9..1c189f4746 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php index f4caeb4206..2bf71c9217 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php index 26c0fa8549..9ae11619f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinitionTest.php index 29ceed2d4c..c0543cbec0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php index daea7c582e..018459f26d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php index 9500c63d8e..e09ff78d61 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php index cc71092f4f..17c4cdc990 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php index 7fd4f7a0ef..20aafcf3f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php index ae565f701b..4731951832 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php index be616717ad..37c0f2e92c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php index 9e50da902d..8a09d1c7ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php index 37c152a9c2..f6904cc391 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristicTest.php index be0ea815ba..0b6eebe066 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActorTest.php index 6759c253ad..a4c7688003 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternativeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternativeTest.php index 69a720d74c..85abdf1238 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternativeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternativeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstanceTest.php index f6a5e48cd5..efeb673642 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstanceTest.php index f4c4abf105..1b5f5483bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperationTest.php index b54ae459da..97e194a34b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcessTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcessTest.php index 1342eaf7c2..2b09b9ba4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcessTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcessTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStepTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStepTest.php index 34a9e9bbc1..0b6a62d950 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStepTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStepTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersionTest.php index cb2229aa0d..83ac3c2672 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php index fb2a36adef..33a0e53125 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php index fda759e57a..ebd064cabd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php index ccdf39969f..c45342a4a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php index 9813c44fce..a2281b5ce8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php index 3e1d02bd46..53cdf9a605 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php index 1081519d92..d8156e64dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php index 899f74335d..343605d3b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php index 593723523d..cbfd184407 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php index 6654d9e3fe..d9250e18ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php index 5844dfa6f6..b0ba983bec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php index 9b442ba1dc..bcef18b58b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php index 17cccf9128..0de2e2e397 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php index 80c88979da..122edf85fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php index 65ba6b41d0..c859dab96b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php index d90218010f..e0c5c17fd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php index 0073fb0ec8..2f85b62aa2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1Test.php index 796a941abb..2a313f69c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php index 21749287c5..9262ca1a12 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfoTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfoTest.php index 9aca5a6a23..d4a0e594f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfoTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfoTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotalTest.php index 91073ee53d..9910df3af4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php index c038039a0d..e9445e780d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php index 2e73649d66..f677c112b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php index e6ffb4877a..1101d56308 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php index bd710967e4..b002e87062 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php index 8bb5b1dc91..272dcdc0fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php index 14b176bc6b..a1a7327abb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php index ec1c4530b3..68ffc40c23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php index 00da419bc7..eabbe70144 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibilityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibilityTest.php index b4657f5091..96e3df9a33 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php index 99ba3ffcf0..4f478093c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php index 0813ac8819..09a031fcb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformerTest.php index 019ea14e57..2a08d49e5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php index a42d1951df..e9d0bbf4f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducationTest.php index 78b6825d21..00d2fee706 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformerTest.php index b2994d611e..ca5962668e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolAppliedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolAppliedTest.php index eb00f0cc1f..623b21b968 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolAppliedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolAppliedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php index 8e0e9fae76..00500bff5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php index 2713614844..48317b70d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php index 83a51e298b..278c6d3175 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinitionTest.php index fa9110cc8c..12fef638ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOnTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOnTest.php index 1e96d4eb50..9448c29688 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php index 4c125f9b0b..6086fed419 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGroupingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGroupingTest.php index fe918e7ff4..0011cce2f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGroupingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGroupingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifestTest.php index 84db1f5896..4d9c864ec2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1Test.php index 70e312ece6..ebb084d2ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php index 5b2557654e..49e8f003df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameterTest.php index 190b7a7a7d..010e19b876 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1Test.php index e0e0c14c40..8f96142d78 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php index dc2f109bb7..5663bbe2ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplateTest.php index ec6c3f9a5c..70539c422e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1Test.php index 532754b952..a8ebc33418 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefitTest.php index bd96d23218..43b39a2df9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContactTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContactTest.php index d55fadda8c..acbace3f93 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCostTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCostTest.php index ecba85b697..59e17532b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCostTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCostTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverageTest.php index c26ea2a0d9..445138eda2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCostTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCostTest.php index 2588b20918..4aef91db1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCostTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCostTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimitTest.php index 0330a5285b..ee741c5ed7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlanTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlanTest.php index a215dbb568..a8f666041f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCostTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCostTest.php index c9db95966a..e8f779a41f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCostTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCostTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItemTest.php index bec1b325ee..daf8875a9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipantTest.php index c16766374b..5fd34966fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponentTest.php index 4b940f9d68..a7e08328f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php index a7abfed417..2d206a60e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php index 5d8afa5b8c..43a125696c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperationTest.php index 199264b5da..26fe37c031 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php index a9ae96e682..dbc23d3583 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMarketingStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMarketingStatusTest.php index adcfce9200..778ca37c0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMarketingStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMarketingStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponentTest.php index e50ff4009c..12193446b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php index cbc7ebd7bf..1680409751 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php index 21f89cd03a..dc1a518ad8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php index e69c3d19e5..27e82b92f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php index 84667c5808..4b55394df7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponentTest.php index 86ca474df1..081a35231f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php index 35b3c383e4..ce0b6e5ab1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php index ed3d784441..fb3abf823b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php index c4793b2df9..cefe0055c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php index 4039183b7b..272ad0123d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php index 4d20410e3f..d6dda0a881 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php index f0092cd0da..cbdeb2102c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php index 670e244c90..a90a8e9ad4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php index d8fbce13db..6b9b440f39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php index 8f7697dd3b..deeb01a903 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php index 91c707dca2..3dcfffbc63 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php index b62724a1a7..eccd9a004f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelinesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelinesTest.php index 603d77dddf..a426b66c8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelinesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelinesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCostTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCostTest.php index d8f029460a..4efbf1f84d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCostTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCostTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosageTest.php index a51afcc7de..a75890f65a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristicTest.php index 43803ca973..7944519011 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredientTest.php index 834bfa96c3..f7f64c7aa8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKineticsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKineticsTest.php index 3bfc954554..52fdae7635 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKineticsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKineticsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispenseTest.php index be3fa7f537..5270779831 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassificationTest.php index 01a226e15d..ec7a99ef26 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgramTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgramTest.php index 7ed40f9f65..69363b677c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgramTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgramTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonographTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonographTest.php index c95403f208..b2dc861f72 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonographTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonographTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackagingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackagingTest.php index 483ea4514c..7027e994d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackagingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackagingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristicsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristicsTest.php index a3ee3fee31..31a6eced0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristicsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristicsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatoryTest.php index a4bf9e6f8b..1df15f27e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledgeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledgeTest.php index dd5086cbdc..22ca6c0932 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeScheduleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeScheduleTest.php index 9ab826335a..d952a15e01 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeScheduleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeScheduleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitutionTest.php index 705ccacf19..135e510735 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php index c83e0bfdd0..d5a2787993 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFillTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFillTest.php index 95e24e3277..1a7d824c0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFillTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFillTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php index db378a60ff..2aa745e29f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguageTest.php index 4d4af1fac4..1b1c8962f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperationTest.php index c8951f434c..4d190e02ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePartTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePartTest.php index 7aebecf9af..eec8b4b0ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePartTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePartTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNameTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNameTest.php index 69a67e961e..6f2918ff10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignationTest.php index 103f242558..b314b1cbef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorizationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorizationTest.php index d5d5e6b131..5a94a5c4c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedureTest.php index 51bf332e52..51292b1f0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapyTest.php index bc664cff5b..cf04b3310d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapyTest.php index c660d8bd32..b2efd720c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrengthTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrengthTest.php index c413632eae..daf0d1970b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrengthTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrengthTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstanceTest.php index 58656552a9..133bc56b9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrengthTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrengthTest.php index 77e1b521f3..72511ad2e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrengthTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrengthTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstanceTest.php index 955b0ff4f8..9bc406ff40 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractantTest.php index 454c9ca5ce..1e16c04691 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifierTest.php index 1fc1e7085f..9bcab66528 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItemTest.php index 93246f62b5..5e5310e265 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristicsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristicsTest.php index 881d61c115..09f5ab1b67 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristicsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristicsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministrationTest.php index cbe1a23369..4465b99a23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpeciesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpeciesTest.php index f7a2e180ab..033a0abd5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpeciesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpeciesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriodTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriodTest.php index 641f73d3f4..99ab9b1ea4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriodTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriodTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php index eb3075a6bb..fe8de8e841 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php index 3d23c32973..fb4e621996 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php index 3442985318..a036be1d5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php index 144e667d32..41081913fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php index 2b6a46a6dc..80dd19ad4f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInnerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInnerTest.php index ce0f6ebe67..1f25b708e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInnerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInnerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuterTest.php index f37ba92124..de395c68be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQualityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQualityTest.php index 480e444fe9..7532620884 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQualityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQualityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeqTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeqTest.php index 4805e2a45e..f347512c01 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeqTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeqTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepositoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepositoryTest.php index f8a2c74037..ca04140bed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepositoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepositoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRocTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRocTest.php index b61d8739c3..72963902ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRocTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRocTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariantTest.php index e53aa1f545..b83b65c51f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariantTest.php index 9cfc9c14a5..99f53bff2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php index e8eeb9191e..f508c144e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php index 048bbe3618..4c72fd979e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php index 38fd26efde..cd42450cba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php index cec2dfc9e0..9872019de9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php index e29eaf7d68..af894a77b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php index 9d834eb6a5..e288680a27 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php index 97dfeb5ed2..c3f8d51bfb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php index 6461713aed..179e161575 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php index 099cde382f..aa87e64640 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedIntervalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedIntervalTest.php index ec634f5150..0a9baef673 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedIntervalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedIntervalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetailsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetailsTest.php index c949d8fe10..40477e4c32 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetailsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetailsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php index 44fb4888b8..333879c91c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php index 05e03d31ce..42f3cc908b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php index 09c2ee9026..7d42547085 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFromTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFromTest.php index e1d5a1f80e..83b8655f1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFromTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFromTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php index 6716d185c1..ec52345577 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php index 07e25a1d51..70cefd28f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php index 642d85775a..89ac215329 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php index a0eb12d69e..de2b9defb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php index 453906b444..d53411c312 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php index 83f8f36b3d..d8cb1fd2d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php index c36fd54555..e772e96075 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php index 1f90bfcc7d..d72f07859e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php index 7aa68e6de9..4e95186e9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php index 1e1cfa65c9..762bc68209 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php index 35b26bf9ea..6e8227d0a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php index 6bc300b266..c7cbd09f1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php index 9be540a396..c532a24a9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php index 3696bf4d76..3c674722b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php index 8af87877d6..b6b4dd774a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php index 9e01c8512f..badb509834 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPopulationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPopulationTest.php index cf09812ab2..c68ec5d31e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPopulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPopulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php index e8398d6ad3..573cd5086a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php index e0b394293b..4962652114 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php index 61ad51b1e0..33c710e2c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php index f595ddb612..d3b30d7892 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php index 5d26212a18..0013b61c8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristicTest.php index 7bbc794385..ec14b5174b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProductShelfLifeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProductShelfLifeTest.php index 04f9cc5dab..96ee6b41c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProductShelfLifeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProductShelfLifeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php index e8a6787175..8571090f0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php index a8fceb1519..f4e81d7570 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOptionTest.php index 0bb2318ce6..ab4b83ed68 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php index 93954b4a86..f34511053c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitialTest.php index 412bf7e23e..0baa9801c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php index 20407e0f99..01ea7188d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php index 22e71d6b07..6144d1cace 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php index ec9b5ef8b1..9e20921a93 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunicationTest.php index 3473b461ae..a3392dedf9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php index a3cea60a7c..56bd3ac277 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php index 09da03c76c..41aa0d3201 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php index 8609a0f15f..ae6b86df45 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristicTest.php index ee8aa86669..e9854046ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php index 9048b83eaf..1d3cee7881 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjectiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjectiveTest.php index 85088412ce..b43b513e68 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjectiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjectiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php index 59dfdf0c92..51ad4d4e06 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponentTest.php index f8bebf313e..2643dcd277 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintyTest.php index 252617ee4a..b0c007adda 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimateTest.php index d9dfa26771..3ac9daf242 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimateTest.php index eac9d190d9..f0c45f637a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSizeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSizeTest.php index de89a1f2e7..488059586b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSizeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSizeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php index 6c318bbb9f..eb7fe7068c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php index 4988378892..67f96a287f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php index 30e2869097..739b7cd5e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php index 52baa1ed95..6ce7d119ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditiveTest.php index a49e39dde7..be60eacf69 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainerTest.php index 5fb067b918..e76a5f0944 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandlingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandlingTest.php index 3d3c328749..f15531dd27 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandlingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandlingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTestedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTestedTest.php index abc014c144..e098cdeb94 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTestedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTestedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContextTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContextTest.php index 70b9460e39..50a1494347 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php index 557f2c75ac..6291182722 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php index 46b714f7c5..89f539d28e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php index 115ead4df2..3588f7f10f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php index 23d9a0342f..9dffc6f747 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php index 47589386cc..6425af8b28 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php index 014eedfaae..d65b3c3810 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php index 2c8f4bf155..843709e764 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php index 72c2bbaca8..8e0d1007c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php index 38cfaf4889..6ad986be4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php index eaa4a3f1f2..0fa18184ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php index 985758c2fb..06240989c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php index 1e25793e36..71124ef87e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php index 660d6fade6..6066e3a4da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php index fa635c5ef5..7b62ff28a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRangeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRangeTest.php index 5f4df60d7a..6ee710f960 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmountTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmountTest.php index 591becb622..349388f74e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkageTest.php index fde36331a4..6c308efa10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunitTest.php index 97bdfe59a9..650f44981e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugarTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugarTest.php index 575bfc2803..d7431acbfb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugarTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugarTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisationTest.php index c099e4851c..8e8ece714a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSetTest.php index 93855e723b..76a7747fdb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatTest.php index 6815a319fc..cbab7dc8c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnitTest.php index 3597a43189..6aa9fda3ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterialTest.php index 04c8fe8b8a..830fb73dcb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentationTest.php index baecf3d373..8dcaa97411 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunitTest.php index add2895193..4e2bb42073 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassificationTest.php index b0a67931d2..4634c772a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElementTest.php index a0ebcac08a..66e53b4816 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneTest.php index 987f521a98..0833c4bc14 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTargetTest.php index 125f88ef7a..45eaa0b17f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthorTest.php index fec08e6a00..15c7ab71ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescriptionTest.php index 376464f4ed..50d798c060 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybridTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybridTest.php index 571955b68b..45c154beb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybridTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybridTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneralTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneralTest.php index f0ffaed66a..60f7c22179 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneralTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneralTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismTest.php index 547395d2c5..33c71d2066 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescriptionTest.php index c8ccee4d0c..62d1c913a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCodeTest.php index 951a81c1e4..f6b1e97ed5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotopeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotopeTest.php index 0439ac5743..eb879d4a8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotopeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotopeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoietyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoietyTest.php index 76bfac0978..f59aa01c34 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoietyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoietyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeightTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeightTest.php index 93fe5024a1..5213a7f357 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeightTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeightTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationNameTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationNameTest.php index dcd10d52e6..a644c9cce8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficialTest.php index 4b1b854d0c..c12d0eea7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationPropertyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationPropertyTest.php index 9eb08bef92..c5a50e2abc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationPropertyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationPropertyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationshipTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationshipTest.php index 502c31d6ed..f87acf0b8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationshipTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationshipTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentationTest.php index 775cfd6646..deba45b141 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructureTest.php index aa91b12d95..0302ae78db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php index cc3e120cef..514f6cff34 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameterTest.php index f43dd4b500..1f13ddba49 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php index 1b2b5e7f3a..a768b76db9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php index f5b001e65f..678af0296e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php index 00c9854cdc..65db4bfc3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosureTest.php index 09eb28cdbd..b6157c37e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystemTest.php index f04aad83e6..9fd1e533c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansionTest.php index 8844eb24e4..559c9cd6c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilterTest.php index 7d8df6266c..219bcb2ed6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementationTest.php index 7fd19ee64a..9fbf563ee3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameterTest.php index e60543386c..09d82f34ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftwareTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftwareTest.php index b6677facf4..fe9c55d4fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftwareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftwareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslationTest.php index 6db213628c..43312b0060 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCodeTest.php index df4923b426..6050d25660 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersionTest.php index 460acea7de..4a991d03f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php index 1dd13534e4..9322eae4b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php index 3a25bb5e02..15facd8c28 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php index 65bcff6341..755f0f68f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php index 475d409507..98ee5a8556 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php index bd8a2e447b..4ece0629f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php index 0ec41aa485..2e440e6005 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php index d6e3110e2b..86e74cd195 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php index f1ede497b7..b040337fb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php index 552c544d77..cda7cc43ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php index 58613c7990..6743d807b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php index 993a68d6b1..bce5c6ca64 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php index a00f594985..79f67d0e1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php index 9e895975d6..0bc9e1d197 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php index 84497c71ba..222da2a5cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php index 1e2165079e..e340b71fdb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php index 29de54208d..5ee9809c08 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php index 0191113dfd..b1804dc461 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php index b8947f15a5..064079ba1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php index bb82fc4f93..a4bb01e3f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php index f62672bef7..f53ff4abb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php index 39c5b4423b..b7e9551772 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php index d057b934c6..d5a547444c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php index 08a9d40714..47d9429149 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php index 81c04da2b9..ff87010810 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php index 58cb9ce813..a2e839b979 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeatTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeatTest.php index 35aac263a3..3d4b5bf937 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTimingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTimingTest.php index b8d3cf5fc2..849b4adee0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php index fee2147ea1..d42bf1b6a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php index 082520175a..d1339c6487 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php index 3d1fc60410..e22553ca57 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php index c8544b9919..d8e1247b27 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php index b5a7236198..c244764536 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php index b0338b7815..66310e8855 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php index 86a35f8f92..a0ec33a210 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php index 28f7a90961..b5675f4ef1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestationTest.php index 75d892efd8..9a41b472a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySourceTest.php index e58dff6d72..b25d2a7426 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidatorTest.php index eaad7b6e4e..e384adba80 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecificationTest.php index 79b4777ddc..b73d3112e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrismTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrismTest.php index c5eb5614f0..b0780a9e30 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrismTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrismTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php index d7fd8de565..6e0c6cce06 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php index af4c2a6c5e..d24a3172c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php index 5f677df34a..09b252b115 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductCategoryTest.php index fe11818d98..cc4914f0b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStatusTest.php index fcfbbe3991..1094af683e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStorageScaleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStorageScaleTest.php index cf4a230890..bbaf013e2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStorageScaleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStorageScaleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php index 16df0b6297..b620670e92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php index 15e9f111f8..866d8e7511 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCanonicalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCanonicalTest.php index 161600cee8..2db9b1ae57 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCanonicalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCanonicalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php index 97371501f8..6b527329f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityKindTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityKindTest.php index 4d0cae1d37..51b8c3bcdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php index a9e0e1e157..c1e303a33b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php index bfc0afeb95..be3e40a84f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php index af4742504f..e8acec9841 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCatalogEntryRelationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCatalogEntryRelationTypeTest.php index 81f2a25682..98be7f4f97 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCatalogEntryRelationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCatalogEntryRelationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php index b55e356665..5a80a5daed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClaimProcessingCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClaimProcessingCodesTest.php index bfadae5a13..5b039385cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClaimProcessingCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClaimProcessingCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php index 913c4e5bad..5652e36a92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSearchSupportTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSearchSupportTest.php index 3e0fc6a0f9..fd3cc1a7be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSearchSupportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSearchSupportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php index fc69413094..d47d9301c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php index 097537f144..5609f1199b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeTest.php index 67cd3798ce..d603f8996e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php index 6daa1c1f23..eab92a8a8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodingTest.php index 618f891f92..5a711482da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php index 06065325c6..195cb4baa7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php index 6bb020fa3b..6e28530183 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php index c949564f03..1068213ef1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php index f5be8955ac..b557211b76 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php index 3daa3869c5..27c72854a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php index 4d3bdc98f7..1bcd0a57a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php index 9b7af94952..0441d1a10c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php index bb36df5c8e..087cd3d46e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentProvisionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentProvisionTypeTest.php index 6699d21cf7..5db0e6097d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentProvisionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentProvisionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php index c357865c31..41243cd968 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php index c93453e447..05a7788cc4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php index 99b7c8677b..437caa453c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php index dccb876934..3e83ddb395 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php index 10138c3707..ec4a38c090 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php index 3fe16afb53..af34aeb1b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourcePublicationStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourcePublicationStatusCodesTest.php index 804842f0ee..775b4c8928 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourcePublicationStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourcePublicationStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php index e8453bd6a9..dccdb9e670 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTest.php index 5f953287f6..a5933b81ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php index bf3ab36d7c..a2088e6028 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php index 904888c376..ae4d35f657 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php index 74e6dacd6d..91d7831d6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSortTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSortTest.php index 77a470557d..b1ef74b3c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSortTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSortTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php index 54b56ccf4c..5c11c79640 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTest.php index 1799b44d84..02620f5a2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php index 1f34b2614b..4d89da9c49 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php index e5c3e4bd1c..ab4b01f3a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php index 3252540efc..8aa55803c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php index d2451fdb2a..d6e1430b34 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php index f0b2a054b0..0ff8f2be76 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php index f72c659a66..6a34b84d55 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php index 955fdd3cc7..d1d48ab948 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php index 59db4863fc..3bfe2cfe8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php index b1099e401a..8d9035c38a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceNameTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceNameTypeTest.php index f3263cc9c6..c942e23e7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceNameTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceNameTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php index cd0afb4cb0..665e4832e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php index 301758c310..d2bb6f6276 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php index 030e0fb3ba..fbd7165a7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php index 71ed46b31c..6622dfcdcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php index 16314598c9..67b9524f05 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php index d9914ed672..3f2bce7dbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityRequestPurposeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityRequestPurposeTest.php index 0a8203248c..093351ed9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityRequestPurposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityRequestPurposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityResponsePurposeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityResponsePurposeTest.php index 610ffd4d6b..a3b272f518 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityResponsePurposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityResponsePurposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREnableWhenBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREnableWhenBehaviorTest.php index 5e3e217ed0..6fd96305f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREnableWhenBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREnableWhenBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php index 43676e1a60..822e258354 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php index 4e542619d3..c8309d7c82 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php index ba7d614814..01d4db2e70 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php index 090c3762b8..93d974f3b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php index 395fa2cdca..0f4a0eb3bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php index b2cba41dcb..93341fa66f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php index 12c7e9b362..d405a1a998 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREvidenceVariableTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREvidenceVariableTypeTest.php index 5351371693..ba6d1837fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREvidenceVariableTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREvidenceVariableTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExampleScenarioActorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExampleScenarioActorTypeTest.php index 2a860ad0e8..e712baf3ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExampleScenarioActorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExampleScenarioActorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php index a46b418fa8..745ea6c2c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExposureStateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExposureStateTest.php index 0f4bc81b88..1050280817 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExposureStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExposureStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionLanguageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionLanguageTest.php index 3ac06c04e0..d64927b7b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionLanguageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionLanguageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionTest.php index c1eda749f7..7895c743a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionContextTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionContextTypeTest.php index 715518ba6d..ede0fd93ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionContextTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionContextTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php index 1e0d692d15..a8df9a2497 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php index 34eef7ed6f..9d7b97c565 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php index f299c5fcc9..2f23b70598 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRVersionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRVersionTest.php index 8223bebbf7..fb5ddb8ea2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRVersionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRVersionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php index f06939a3fb..56e632cfeb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php index 944594df32..e6f9a996a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php index 3e17ef04f1..2edde9b057 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php index 78c9be63dc..004c84cb99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGoalLifecycleStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGoalLifecycleStatusTest.php index 0066450c8a..ef75763838 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGoalLifecycleStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGoalLifecycleStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php index 2504bc29c4..460f3ac20f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentUseTest.php index 1b1b2499ca..60751da369 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupMeasureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupMeasureTest.php index 0dbcce80dc..3c69ff23b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupMeasureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupMeasureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php index 9f0635a0c0..895b1095c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php index 7404049aae..f202ab311b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidePageGenerationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidePageGenerationTest.php index aed4b46ea1..e82779cbf3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidePageGenerationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidePageGenerationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuideParameterCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuideParameterCodeTest.php index 38e803c039..a4c52df650 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuideParameterCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuideParameterCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php index a7bac929ff..9fe4fcdc72 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php index 6e2cc1cf85..8587a0dab9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdTest.php index a2c5398b83..125bb35d8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php index 94c91d71e2..c27f37d2d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php index bce420eb32..0d2cb00618 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php index 693f03ef1a..f13ff9d8d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImagingStudyStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImagingStudyStatusTest.php index d472367cf6..edbac8e763 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImagingStudyStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImagingStudyStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationEvaluationStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationEvaluationStatusCodesTest.php index 1843a7934c..dd6e838d58 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationEvaluationStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationEvaluationStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php index 73d727be25..374e7ae0fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInstantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInstantTest.php index c8110f6bc2..9d6cfafbcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInstantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInstantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php index 5783e7a506..58d1a8fb22 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoicePriceComponentTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoicePriceComponentTypeTest.php index 2bbbb17e43..2ed6d0c748 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoicePriceComponentTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoicePriceComponentTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoiceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoiceStatusTest.php index 1001364d2d..230909bd13 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoiceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoiceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php index 0dd8b5c302..b6e00ebcf9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php index 9a138b6488..99548099c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php index 79b840b194..d52d1729a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php index c289ba5d41..8f505924a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListModeTest.php index 9691b6aa64..97cbfe74eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php index 6041e223b0..04fe21cca4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php index 0cb2a3f2ef..41ec40754b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php index 3be957598a..c2e01cb64a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php index b49d2c2a73..9107e44cb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php index aaea259264..f813c63a4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php index 5402015701..903ef8308e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php index 54478aff40..ce43cb325d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationStatusCodesTest.php index a9e691dd52..6feff05568 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationrequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationrequestStatusTest.php index 0fce24dcce..69b60df6a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationrequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationrequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php index ae62bbaa0c..b9e0b3a92b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageheaderResponseRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageheaderResponseRequestTest.php index aaaaf81861..650f57c1bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageheaderResponseRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageheaderResponseRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMetaTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMetaTest.php index ced741370a..ea1d428464 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMetaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMetaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMoneyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMoneyTest.php index 0d4d8fd538..c2225f42ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMoneyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMoneyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php index d14b828ef9..89a2b59864 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php index 14f1e0ae71..ee075a1386 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php index c3d9eb87ae..8d3999c377 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php index ae4c12e43c..29a9d2aa53 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php index 937d8c3a0a..5e10401c2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php index 402393087e..66db57a41e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationDataTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationDataTypeTest.php index 29614f3796..f2aa9ec273 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationDataTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationDataTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationRangeCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationRangeCategoryTest.php index d4255d7f8b..9e1f15969f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationRangeCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationRangeCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php index c6f1b8446b..2c72aabdd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROidTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROidTest.php index 4c08c40f25..209d185aad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php index 5f808a1fa8..3a9f0c44ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php index d71495c277..b3d016e264 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROrientationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROrientationTypeTest.php index 880fc8e594..0938ca95ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROrientationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROrientationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php index 3d9af5d350..cae42a0bc0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php index 7cd7afbf71..5c5077a0a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php index 3a36179bea..2fa345ea10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php index 5c23e51104..83b8ba7e72 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php index c1a6385815..1b98ecadc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php index 1229267999..637e51b315 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php index 13ea9c323d..9e524afb3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php index 459b51f5f2..54ac784dfa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php index 7aa168d80d..83f7491bae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php index c18c1179b3..ffe07c0b92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php index bf1d9ca536..54d1f20246 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php index ed0d1655c6..3e74da57d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php index c07b6f2013..7126cd93cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php index eb49a7b9c9..f723c32a6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php index 9a900fc6cd..edd2359b4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php index 73c7485ec5..a3031dc07c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemOperatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemOperatorTest.php index 819de0c979..c76526c4b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemOperatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemOperatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php index 3307838c2f..e8dec92c37 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php index 77d75d7774..345daa9e45 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRangeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRangeTest.php index 07caccec93..65f3d2d1b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRatioTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRatioTest.php index 5c29f3fcd1..15fa4d8bf5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRatioTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRatioTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php index 231893b689..173f1f44a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php index 3bfd411e20..c7033978e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php index 7ae094b451..f11d32dbc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php index 0b5e312670..0d434e1fac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php index 1c74369197..01eda6c990 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php index 51d2bbe050..70a3acb3de 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php index d68094ca37..156f4e6567 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php index 7037888e75..88fbc7332d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php index 23bb092e98..b7d2fa242e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestResourceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestResourceTypeTest.php index 9254a5811a..006469a051 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestResourceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestResourceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php index 0b7bf911e7..208242b005 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchElementTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchElementTypeTest.php index 5317ba1ce2..69e439e7b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchElementTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchElementTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php index 4394ec40d5..db5955176c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php index 1a9026189a..41b0a1ea89 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php index ebf15014a4..d6f4229e62 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php index 23de1413b2..87af628f76 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php index 7c5ad9f8cb..72bc81d3dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php index 39e7420b35..55fa02beda 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSPDXLicenseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSPDXLicenseTest.php index 855780f3d2..2677f4d69d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSPDXLicenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSPDXLicenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php index d468139472..99d069cfc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php index c7f9688bec..036b3deb95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php index a740fd991d..4f2b8b6345 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php index 64321c292f..8a75b69d74 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php index 612ea9948b..a90a9704e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php index 70538e8388..325b3d02f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSequenceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSequenceTypeTest.php index a9351a9450..5a4febd463 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSequenceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSequenceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php index d8183f6ec5..f0f16c8021 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php index 37558f8b8a..2b65e20c7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php index a5cf53baa3..0c7fd2088d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSortDirectionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSortDirectionTest.php index 9179b398ed..c78d336802 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSortDirectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSortDirectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenContainedPreferenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenContainedPreferenceTest.php index 9eb0edef9b..86bdc0ff05 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenContainedPreferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenContainedPreferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php index a7dbc72235..5c9872edcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStatusTest.php index ffb01130b3..5e9146bdd8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStrandTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStrandTypeTest.php index bdb0207487..135c3edbda 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStrandTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStrandTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStringTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStringTest.php index dc9949a7ad..f3f3025cf3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStringTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStringTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php index f1bb0763f8..8df07f5ac8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php index 9ce8919176..4dd795fdb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php index 236d3207b1..d8288e0fcb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php index 12d0d4c060..03ca7d9fec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php index ce8e9a63d8..2690d35737 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php index 09f6fce537..3ac4327af5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php index 6283e6b12c..63a6d744d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php index 530b20543d..64a2ff3d68 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php index 9b67185c8e..dacd32fb20 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php index f8c1c9ae15..0aeae4b354 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php index 9ab9597197..c76c461cbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php index 3dbb7378f3..e5dc9a660f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php index 2bb5187594..32e5fd6766 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskIntentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskIntentTest.php index b5ed2f2dd6..35c1413960 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php index b8139a4ad1..bc0be4882e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php index 15cd8f053f..9c3d09399c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php index 72dbbc4bc3..4145686c97 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php index 27ec880a64..f198331fec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php index 03c2194bf7..fc12ab420f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php index fc2b334eea..bc9cfe086b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTimeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTimeTest.php index 22a3b694ab..bbf98a5375 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php index 8dfafec979..25b5c6d99f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php index 6f1b60a256..cdba54299c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php index 3a3864b14b..a9f4a3523f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php index 467ab244a2..6661b66c06 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php index 6b3bd2f7e9..88dd7c3a45 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php index b556432e99..fd54914861 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php index d9fff018da..3c964a7fd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUriTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUriTest.php index f4e7c1ac67..bf47a3210b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUriTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUriTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUrlTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUrlTest.php index f8fdf208f8..39353f19a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUrlTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUrlTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php index 9aab7374a2..8fa9141c52 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUseTest.php index 8cba8b981e..0d51c782b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUuidTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUuidTest.php index e6d3efeeda..5706010c59 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUuidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUuidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVConfidentialityClassificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVConfidentialityClassificationTest.php index 772967c22b..34a15dcb1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVConfidentialityClassificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVConfidentialityClassificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVariableTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVariableTypeTest.php index 21cae0986a..2a500a49a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVariableTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVariableTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php index edbdb50a63..61ea26a44c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php index 3fb47e4752..2c09445111 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php index 6933554f87..ce19837495 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElementTest.php index c6abf9a739..a274833983 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIdPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIdPrimitiveTest.php index ae4d545225..9d873a1fd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIdPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIdPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRInstantPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRInstantPrimitiveTest.php index 4d2991a4df..bb598c217e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRInstantPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRInstantPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIntegerPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIntegerPrimitiveTest.php index b474dbede2..18d36f0702 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIntegerPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIntegerPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php index 386b83c1ea..1e4171bbdb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIROidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIROidPrimitiveTest.php index d282bd62ac..9f564e0488 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIROidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIROidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php index 5b93310536..47811d5f3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php index 7da60abcd5..8e0d38a620 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBundleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBundleTest.php index 09143e51fc..eb811d5fa9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBundleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBundleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php index 2eb3c789b7..7d34b7892f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRAccount', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Account/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php index 8ef82a5d4c..629266600d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRActivityDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ActivityDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php index fe142e6c88..7343c3827a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRAdverseEvent', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/AdverseEvent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php index b91af3cb04..e01684e2dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRAllergyIntolerance', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/AllergyIntolerance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php index 0193b0e717..9f6762efc0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRAppointmentResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/AppointmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php index fcfbb79c17..0e0a2a5758 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRAppointment', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Appointment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php index ef6c4a5601..56d5c42161 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRAuditEvent', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/AuditEvent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php index 55284a472b..5e4338a16b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRBasic', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Basic/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProductTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProductTest.php index 28b72eea3e..ec31bc2c5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProductTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProductTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRBiologicallyDerivedProduct', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/BiologicallyDerivedProduct/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodyStructureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodyStructureTest.php index 40fdf7a455..2c4994b10e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodyStructureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodyStructureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRBodyStructure', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/BodyStructure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php index a950abe1ea..7b56638700 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCapabilityStatement', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/CapabilityStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php index 5ac2ac2be1..0e233519c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCarePlan', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/CarePlan/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php index 5326828fda..3f6c09829d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCareTeam', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/CareTeam/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCatalogEntryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCatalogEntryTest.php index cdcce6b4e2..7a4165c627 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCatalogEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCatalogEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCatalogEntry', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/CatalogEntry/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinitionTest.php index 38fe69c437..bca6dfa2a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRChargeItemDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ChargeItemDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php index 3b3c04026c..5fa8e97f66 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRChargeItem', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ChargeItem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php index 249be0687f..68c220545e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRClaimResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ClaimResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php index 8c3e9a82e9..73416c294e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRClaim', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Claim/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php index 6acbd66892..bf32a1b3aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRClinicalImpression', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ClinicalImpression/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php index bb4fd7739e..6327d6ffed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCodeSystem', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/CodeSystem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php index 844454bbfa..d045a58598 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCommunicationRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/CommunicationRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php index 94a3fb2d8b..00544acf06 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCommunication', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Communication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php index 63cca349e4..be6a482001 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCompartmentDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/CompartmentDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php index 1a4674fd99..72eac8f78b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRComposition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Composition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php index 5f71efb7eb..e016660d4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRConceptMap', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ConceptMap/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php index 4825487164..95e2a5e906 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCondition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Condition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php index 964ccca842..11504f187a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRConsent', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Consent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php index 9176e5b28d..3123d594a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRContract', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Contract/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequestTest.php index 9f6405d30b..f1cb979ff1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCoverageEligibilityRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/CoverageEligibilityRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponseTest.php index 4666ccc1b6..0c3a7ebd87 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCoverageEligibilityResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/CoverageEligibilityResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php index e409cd7e64..d84863e302 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRCoverage', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Coverage/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php index 977f8aae4d..f058475743 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRDetectedIssue', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/DetectedIssue/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceDefinitionTest.php index e38cd7ffd5..d8da625bb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRDeviceDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/DeviceDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php index 4b4afe14d5..7cbe1f18e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRDeviceMetric', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/DeviceMetric/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php index 4fe680e657..599155e535 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRDeviceRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/DeviceRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php index 825848cf99..b5efe935ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRDevice', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Device/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php index 0323c5a940..46ea7efc11 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRDeviceUseStatement', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/DeviceUseStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php index 43bc00ddb3..51251aa06b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRDiagnosticReport', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/DiagnosticReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php index 13b923ca95..4f04695cff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRDocumentManifest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/DocumentManifest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php index c34472caff..3374d4827d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRDocumentReference', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/DocumentReference/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesisTest.php index db99323aa6..ad58939f4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIREffectEvidenceSynthesis', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/EffectEvidenceSynthesis/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php index 76e13fb280..f4937e020b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIREncounter', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Encounter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php index 69917b32f1..1c2643ba0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIREndpoint', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Endpoint/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php index 52bf801dbf..e06982a00a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIREnrollmentRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/EnrollmentRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php index 4e925ab764..72911130e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIREnrollmentResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/EnrollmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php index 0e611f2e4a..5f6c4ce760 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIREpisodeOfCare', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/EpisodeOfCare/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREventDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREventDefinitionTest.php index d951a57608..53a6922278 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREventDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREventDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIREventDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/EventDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceTest.php index fd3f9f30db..b68f914200 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIREvidence', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Evidence/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceVariableTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceVariableTest.php index 2c002ce7c8..73f9ed8b20 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceVariableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceVariableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIREvidenceVariable', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/EvidenceVariable/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExampleScenarioTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExampleScenarioTest.php index 367cd6900b..728f84ccce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExampleScenarioTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExampleScenarioTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRExampleScenario', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ExampleScenario/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php index bf7d31c93d..c35de7a320 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRExplanationOfBenefit', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ExplanationOfBenefit/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php index fd08a44f09..df84d31610 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRFamilyMemberHistory', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/FamilyMemberHistory/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php index af4ffc1abc..6dc5860c2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRFlag', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Flag/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php index 98f5f9eabc..9d624826e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRGoal', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Goal/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php index 201a3d0859..a14861a614 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRGraphDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/GraphDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php index 90a6d15dc2..baafdac012 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRGroup', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Group/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php index 3b650d3cdd..23bb031086 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRGuidanceResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/GuidanceResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php index 9889700bf1..54c101f8ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRHealthcareService', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/HealthcareService/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php index 6f20d6a9bd..a61c0dd1a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRImagingStudy', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ImagingStudy/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluationTest.php index 10e68d0123..d97b0b5ee0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRImmunizationEvaluation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ImmunizationEvaluation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php index 13a05d41eb..38a84c6a5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRImmunizationRecommendation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ImmunizationRecommendation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php index db9b4357e0..f0146e865a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRImmunization', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Immunization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php index 78ae84bf7f..b88d688029 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRImplementationGuide', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ImplementationGuide/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInsurancePlanTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInsurancePlanTest.php index 047c2a576c..367ec851b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInsurancePlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInsurancePlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRInsurancePlan', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/InsurancePlan/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInvoiceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInvoiceTest.php index 6a63d9c08b..d20458559d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInvoiceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInvoiceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRInvoice', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Invoice/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php index a240eb0f80..6e24619b01 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRLibrary', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Library/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php index 85a17222c8..657f9f7f1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRLinkage', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Linkage/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php index 32a26a8f27..96849ff646 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRList', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/List/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php index e0768800c9..fd49067a43 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRLocation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Location/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php index 42d4329d8d..4bb12e1d02 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMeasureReport', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MeasureReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php index 3732093062..5839d33623 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMeasure', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Measure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php index f040f2fc11..6648063016 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedia', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Media/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php index 365a92e74e..1ac97d2b11 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicationAdministration', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicationAdministration/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php index 5d7853e2ba..9615b1f580 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicationDispense', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicationDispense/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledgeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledgeTest.php index e01b765de9..de509c6303 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicationKnowledge', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicationKnowledge/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php index e00eab1811..2f418a882d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicationRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicationRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php index db7ab52fa6..a985c7a425 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicationStatement', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicationStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php index 660021b52c..4f5a146b07 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedication', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Medication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorizationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorizationTest.php index 9035008fb1..0c3257083f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicinalProductAuthorization', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductAuthorization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindicationTest.php index 44f72799dc..6495b0d8ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicinalProductContraindication', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductContraindication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndicationTest.php index 03f37fddd4..bfa6853563 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicinalProductIndication', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductIndication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredientTest.php index b8fe61a38f..bee0d6eb03 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicinalProductIngredient', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductIngredient/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteractionTest.php index 24481a26db..e7dfa8e251 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicinalProductInteraction', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductInteraction/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufacturedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufacturedTest.php index 323b0fdb07..b1b6767377 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufacturedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufacturedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicinalProductManufactured', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductManufactured/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackagedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackagedTest.php index 8be070c6c9..0d691db8c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackagedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackagedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicinalProductPackaged', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductPackaged/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceuticalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceuticalTest.php index 2dbd9ead92..994167e4ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceuticalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceuticalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicinalProductPharmaceutical', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductPharmaceutical/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductTest.php index 3656b0bff2..0bdf2da28a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicinalProduct', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProduct/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffectTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffectTest.php index 87362d4d51..11fc25e058 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMedicinalProductUndesirableEffect', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductUndesirableEffect/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php index 67ed8f9130..f1dee1392d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMessageDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MessageDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php index 8186c6f15e..0ca5ab818d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMessageHeader', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MessageHeader/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMolecularSequenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMolecularSequenceTest.php index 4daabb75d2..be978bc69b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMolecularSequenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMolecularSequenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRMolecularSequence', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/MolecularSequence/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php index a93df3f6fe..fa23b913bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRNamingSystem', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/NamingSystem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php index 701a1ae305..e5c6c6a7f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRNutritionOrder', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/NutritionOrder/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationDefinitionTest.php index ca76c0486e..1b98b69f4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRObservationDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ObservationDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php index 71d9c2f2a5..1d5c2f0165 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRObservation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Observation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php index 0c747434ad..a442488396 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIROperationDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/OperationDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php index 2778a79c95..7106501995 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIROperationOutcome', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/OperationOutcome/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliationTest.php index adad4c74fc..5a3ff0394d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIROrganizationAffiliation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/OrganizationAffiliation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php index 5ceed9b699..92dc2ef9f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIROrganization', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Organization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php index ec73dc650f..c0f2845d5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRPatient', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Patient/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php index a837bb61fc..6294014c4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRPaymentNotice', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/PaymentNotice/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php index adfbcf121f..92448fb358 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRPaymentReconciliation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/PaymentReconciliation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php index d158a57231..9dc285438a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRPerson', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Person/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php index 6c9192d97f..2abf8a740e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRPlanDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/PlanDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php index afd848e3ce..3fdce665d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRPractitionerRole', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/PractitionerRole/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php index 4d29fd13b3..abf0b4ebb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRPractitioner', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Practitioner/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php index af31bc045d..7e31d40f9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRProcedure', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Procedure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php index 19870369c7..942b80f4e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRProvenance', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Provenance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php index 65340ae8ac..951040369e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRQuestionnaireResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/QuestionnaireResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php index 53bbf4f4ab..c042d7231b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRQuestionnaire', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Questionnaire/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php index e2e686c3db..12c8a06f1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRRelatedPerson', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/RelatedPerson/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php index b1c9eab9a8..0a228c91d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRRequestGroup', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/RequestGroup/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchDefinitionTest.php index 2dd3eb1e6e..78c9636063 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRResearchDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ResearchDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinitionTest.php index bdd45d90ba..8cf81cd3dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRResearchElementDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ResearchElementDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php index 9d73201723..db106fd394 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRResearchStudy', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ResearchStudy/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php index 1058f812a5..5f3bef97b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRResearchSubject', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ResearchSubject/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php index 491a4bb6cb..a196bc166d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRRiskAssessment', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/RiskAssessment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesisTest.php index 1936570646..1a3e61eba2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRRiskEvidenceSynthesis', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/RiskEvidenceSynthesis/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php index 5784c97e09..c1475fbb4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSchedule', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Schedule/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php index 6dcb94a8c8..5187068f30 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSearchParameter', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/SearchParameter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceRequestTest.php index 0423f4594e..a684113b5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRServiceRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ServiceRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php index 77d53d5830..85855874c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSlot', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Slot/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinitionTest.php index 3de023c45c..e556a6db5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSpecimenDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/SpecimenDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php index 1117cf06e0..c437f9348d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSpecimen', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Specimen/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php index 5a823d2fb9..1408f4d10a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRStructureDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/StructureDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php index f9f4e18e39..1ab6bae966 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRStructureMap', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/StructureMap/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php index 4244a7ab36..527ae251e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSubscription', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Subscription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcidTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcidTest.php index 0a5b0cb19b..d89c4897ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSubstanceNucleicAcid', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceNucleicAcid/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstancePolymerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstancePolymerTest.php index 7f688cbded..3dd2d675ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstancePolymerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstancePolymerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSubstancePolymer', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/SubstancePolymer/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceProteinTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceProteinTest.php index 6bf5d07f24..6042e0a1cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceProteinTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceProteinTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSubstanceProtein', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceProtein/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformationTest.php index 489db6fe6e..b6903b11dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSubstanceReferenceInformation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceReferenceInformation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterialTest.php index a482347c47..02b2663258 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSubstanceSourceMaterial', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceSourceMaterial/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecificationTest.php index 344b2f8214..d09e3a90b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSubstanceSpecification', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceSpecification/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php index 52f7e9e93b..62b9a6da0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSubstance', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Substance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php index 7d704164b5..15e58ed79c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSupplyDelivery', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/SupplyDelivery/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php index 390fee642f..865e0dd894 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRSupplyRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/SupplyRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php index 38b1cefa0d..46dc07db55 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRTask', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/Task/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilitiesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilitiesTest.php index df07fced08..9bb8f0b684 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilitiesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilitiesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRTerminologyCapabilities', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/TerminologyCapabilities/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php index c4c48dd00e..a3b087cfe9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRTestReport', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/TestReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php index 5cad41e126..bcc00d14ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRTestScript', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/TestScript/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php index 79ab5d8b69..30584fa561 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRValueSet', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/ValueSet/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVerificationResultTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVerificationResultTest.php index affb0659cb..888782c60e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVerificationResultTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVerificationResultTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRVerificationResult', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/VerificationResult/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php index 4b3954aa13..a3ca4102b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\R4\FHIRResource\FHIRDomainResource\FHIRVisionPrescription', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseR4/VisionPrescription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php index c58ce0375d..3f31b8beb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRParametersTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRParametersTest.php index 308248c4be..d0697263a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRParametersTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRParametersTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceContainerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceContainerTest.php index be30b6eca7..9041db0d84 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceTest.php index b430b2eeb9..1a14c3d296 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php index 0c281dcd29..3e080d5fde 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRStringPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRStringPrimitiveTest.php index 6837b75d50..775c511246 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRStringPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRStringPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRTimePrimitiveTest.php index 45751d6128..aabe8b4c9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php index a033d4073f..b31591c0f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUriPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUriPrimitiveTest.php index e15f9950af..558b91877b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUriPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUriPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUrlPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUrlPrimitiveTest.php index 1b4b5fc192..c2c41723f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUrlPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUrlPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUuidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUuidPrimitiveTest.php index 3f2aa81655..f5334ae6bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUuidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUuidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRConstantsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRConstantsTest.php index d711fb8fd6..3d2eb8d56f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRConstantsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRConstantsTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRTypeMapTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRTypeMapTest.php index 05a736c40d..db7c28655c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRTypeMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRTypeMapTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeInterface.php index 052e63aa54..7cca922ae5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -97,12 +97,18 @@ public function _setFHIRXMLNamespace($xmlNamespace); */ public function _getFHIRXMLElementDefinition(); + /** + * Must return an associative array in structure ["field" => ["rule" => {constraint}]] to be used during validation + * @return array + */ + public function _getValidationRules(); + /** * Must return associative array where, if there are validation errors, the keys are the names of fields within the * type that failed validation. The value must be a string message describing the manner of error * @return array */ - public function _validationErrors(); + public function _getValidationErrors(); /** * @param \SimpleXMLElement|string|null $sxe diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeMap.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeMap.php index 707236ac54..d18e6556b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeMap.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRValidationAssertionsTrait.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRValidationAssertionsTrait.php new file mode 100644 index 0000000000..ba95ddef5b --- /dev/null +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRValidationAssertionsTrait.php @@ -0,0 +1,219 @@ += $expected) { + return null; + } + if (null === $value || !is_array($value) || [] === $value) { + return sprintf('Field "%s" on type "%s" must have at least %d elements, but it is empty', $fieldName, $typeName, $expected); + } + if ($expected > ($cnt = count($value))) { + return sprintf('Field "%s" on type "%s" must have at least %d elements, %d seen.', $fieldName, $typeName, $expected, $cnt); + } + return null; + } + + /** + * Asserts that a given collection field has no more than the specified number of elements + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|array $value + * @return null|string + */ + protected function _assertMaxOccurs($typeName, $fieldName, $expected, $value) + { + if (PHPFHIRConstants::UNLIMITED === $expected || null === $value || !is_array($value) || [] === $value || $expected >= ($cnt = count($value))) { + return null; + } + return sprintf('Field "%s" on type "%s" must have no more than %d elements, %d seen', $fieldName, $typeName, $expected, $cnt); + } + + /** + * Asserts that a given string value is at least x characters long + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|string $value + * @return null|string + */ + protected function _assertMinLength($typeName, $fieldName, $expected, $value) + { + if (0 === $expected) { + return null; + } + if (null === $value || !is_string($value) || '' === $value) { + return sprintf('Field "%s" on type "%s" must be at least %d characters long, but it is empty', $fieldName, $typeName, $expected); + } + if ($expected > ($cnt = strlen($value))) { + return sprintf('Field "%s" on type "%s" must be at least %d characters long, %d seen.', $fieldName, $typeName, $expected, $cnt); + } + return null; + } + + /** + * Asserts that a given string value is no more than x characters long + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|string $value + * @return null|string + */ + protected function _assertMaxLength($typeName, $fieldName, $expected, $value) + { + if (PHPFHIRConstants::UNLIMITED === $expected || null === $value || !is_string($value) || '' === $value || $expected <= ($cnt = strlen($value))) { + return null; + } + return sprintf('Field "%s" on type "%s" must be no more than %d characters long, %d seen', $fieldName, $typeName, $expected, $cnt); + } + + /** + * Asserts that a given value is within the expected list of values + * @param string $typeName + * @param string $fieldName + * @param array $expected + * @param mixed $value + * @return null|string + */ + protected function _assertValueInEnum($typeName, $fieldName, array $expected, $value) + { + if ([] === $expected || in_array($value, $expected, true)) { + return null; + } + return sprintf( + 'Field "%s" on type "%s" value "%s" not in allowed list: [%s]', + $fieldName, + $typeName, + var_export($value, true), + implode( + ', ', + array_map( + function($v) { return var_export($v, true); }, + $expected + ) + ) + ); + } + + /** + * Asserts that a given string value matches the specified pattern + * @param string $typeName + * @param string $fieldName + * @param string $pattern + * @param null|string $value + * @return null|string + */ + protected function _assertPatternMatch($typeName, $fieldName, $pattern, $value) + { + if (null === $value || !is_string($pattern) || '' === $pattern || (bool)preg_match($pattern, $value)) { + return null; + } + return sprintf('Field "%s" on type "%s" value of "%s" does not match pattern: %s', $fieldName, $typeName, $value, $pattern); + } + + /** + * @param string $typeName + * @param string $fieldName + * @param string $ruleName + * @param mixed $constraint + * @param mixed $value + * @return null|string + */ + protected function _performValidation($typeName, $fieldName, $ruleName, $constraint, $value) + { + switch($ruleName) { + case PHPFHIRConstants::VALIDATE_ENUM: + return $this->_assertValueInEnum($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MIN_LENGTH: + return $this->_assertMinLength($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MAX_LENGTH: + return $this->_assertMaxLength($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MIN_OCCURS: + return $this->_assertMinOccurs($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MAX_OCCURS: + return $this->_assertMaxOccurs($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_PATTERN: + return $this->_assertPatternMatch($typeName, $fieldName, $constraint, $value); + + default: + return sprintf('Type "%s" specifies unknown validation for field "%s": Name "%s"; Constraint "%s"', $typeName, $fieldName, $ruleName, var_export($constraint, true)); + } + } +} diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBase64BinaryPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBase64BinaryPrimitive.php index a6a6025348..c6fadd7a47 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBase64BinaryPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBase64BinaryPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BASE_64BINARY_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type base64Binary-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBase64BinaryPrimitive Constructor @@ -178,11 +180,37 @@ public function _writeToFile($fileHandle) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASE_64BINARY_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBooleanPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBooleanPrimitive.php index c98335624a..f6ca0eef57 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBooleanPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBooleanPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BOOLEAN_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type boolean-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBooleanPrimitive Constructor @@ -164,11 +166,37 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BOOLEAN_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive.php index d41c0423e8..82dd1b7a0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRCodePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRCodePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type code-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[^\\s]+([\\s]?[^\\s]+)*$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,11 +171,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAccountStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAccountStatusList.php index b9be10ccfb..7080173c19 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAccountStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAccountStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAccountStatusList extends FHIRCodePrimitive * Validation map for fields in type AccountStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php index 12c7377b8a..b865e48a50 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionCardinalityBehaviorList extends FHIRCodePrimitive * Validation map for fields in type ActionCardinalityBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['single','multiple',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionConditionKindList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionConditionKindList.php index 958706b80e..8944c35ab1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionConditionKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionConditionKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionConditionKindList extends FHIRCodePrimitive * Validation map for fields in type ActionConditionKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['applicability','start','stop',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php index 0950a2da28..94b5074fde 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionGroupingBehaviorList extends FHIRCodePrimitive * Validation map for fields in type ActionGroupingBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['visual-group','logical-group','sentence-group',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionListList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionListList.php index 87b0e24f1e..5db3cbb1a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionListList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionListList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionListList extends FHIRCodePrimitive * Validation map for fields in type ActionList-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['cancel','poll','reprocess','status',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionParticipantTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionParticipantTypeList.php index 916ae1d94f..ef97dc78a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionParticipantTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionParticipantTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionParticipantTypeList extends FHIRCodePrimitive * Validation map for fields in type ActionParticipantType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['patient','practitioner','related-person',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php index e4ce4533a9..02e245852f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionPrecheckBehaviorList extends FHIRCodePrimitive * Validation map for fields in type ActionPrecheckBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['yes','no',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php index 01fa64b2bc..3c4b8cddc4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionRelationshipTypeList extends FHIRCodePrimitive * Validation map for fields in type ActionRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['before-start','before','before-end','concurrent-with-start','concurrent','concurrent-with-end','after-start','after','after-end',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php index e27d89d861..90fdc8efdb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionRequiredBehaviorList extends FHIRCodePrimitive * Validation map for fields in type ActionRequiredBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['must','could','must-unless-documented',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php index 3e7e0d88b0..a525317aa2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRActionSelectionBehaviorList extends FHIRCodePrimitive * Validation map for fields in type ActionSelectionBehavior-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['any','all','all-or-none','exactly-one','at-most-one','one-or-more',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressTypeList.php index a237c52814..5487293fc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAddressTypeList extends FHIRCodePrimitive * Validation map for fields in type AddressType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['postal','physical','both',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressUseList.php index 8a06ad1792..e9fd7fc4f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAddressUseList extends FHIRCodePrimitive * Validation map for fields in type AddressUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['home','work','temp','old',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdministrativeGenderList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdministrativeGenderList.php index 1841cd3c36..e1ea1ef323 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdministrativeGenderList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdministrativeGenderList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAdministrativeGenderList extends FHIRCodePrimitive * Validation map for fields in type AdministrativeGender-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['male','female','other','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCategoryList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCategoryList.php index 6dd77bd947..65e6dca1d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAdverseEventCategoryList extends FHIRCodePrimitive * Validation map for fields in type AdverseEventCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['AE','PAE',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCausalityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCausalityList.php index 65e8b2f5bd..7efa908ee5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCausalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCausalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAdverseEventCausalityList extends FHIRCodePrimitive * Validation map for fields in type AdverseEventCausality-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['causality1','causality2',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAggregationModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAggregationModeList.php index 8c9d22fb4a..fcc6f7de16 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAggregationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAggregationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAggregationModeList extends FHIRCodePrimitive * Validation map for fields in type AggregationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['contained','referenced','bundled',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php index ff37585169..7168277034 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceCategoryList extends FHIRCodePrimitive * Validation map for fields in type AllergyIntoleranceCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['food','medication','environment','biologic',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusList.php index 8076d21096..1f72d339d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceClinicalStatusList extends FHIRCodePrimitive * Validation map for fields in type AllergyIntoleranceClinicalStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','resolved',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php index 11329c38e2..3781da5309 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceCriticalityList extends FHIRCodePrimitive * Validation map for fields in type AllergyIntoleranceCriticality-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['low','high','unable-to-assess',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php index 2069ac6b09..d6e49f4c1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceSeverityList extends FHIRCodePrimitive * Validation map for fields in type AllergyIntoleranceSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['mild','moderate','severe',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php index c490a66bdb..7874ab9d22 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceTypeList extends FHIRCodePrimitive * Validation map for fields in type AllergyIntoleranceType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['allergy','intolerance',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusList.php index e742a12738..2fb1958cd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAllergyIntoleranceVerificationStatusList extends FHIRCodePrimitive * Validation map for fields in type AllergyIntoleranceVerificationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['unconfirmed','confirmed','refuted','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAppointmentStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAppointmentStatusList.php index 56a421fa9d..bf7c200d5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAppointmentStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAppointmentStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAppointmentStatusList extends FHIRCodePrimitive * Validation map for fields in type AppointmentStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','pending','booked','arrived','fulfilled','cancelled','noshow','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php index c9bd823c57..db09497007 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAssertionDirectionTypeList extends FHIRCodePrimitive * Validation map for fields in type AssertionDirectionType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['response','request',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php index e9e049845e..3b3a4813a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAssertionOperatorTypeList extends FHIRCodePrimitive * Validation map for fields in type AssertionOperatorType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['equals','notEquals','in','notIn','greaterThan','lessThan','empty','notEmpty','contains','notContains','eval',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php index 6b4a6eb1b7..4acbdff6ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAssertionResponseTypesList extends FHIRCodePrimitive * Validation map for fields in type AssertionResponseTypes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['okay','created','noContent','notModified','bad','forbidden','notFound','methodNotAllowed','conflict','gone','preconditionFailed','unprocessable',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventActionList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventActionList.php index 11d3c38276..261b92fcd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAuditEventActionList extends FHIRCodePrimitive * Validation map for fields in type AuditEventAction-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['C','R','U','D','E',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php index 9db4de7214..b95f66b1d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAuditEventAgentNetworkTypeList extends FHIRCodePrimitive * Validation map for fields in type AuditEventAgentNetworkType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['1','2','3','4','5',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php index a437e01bba..e9a1130130 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRAuditEventOutcomeList extends FHIRCodePrimitive * Validation map for fields in type AuditEventOutcome-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['0','4','8','12',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBindingStrengthList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBindingStrengthList.php index 8b2fb0ab98..7c90860970 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBindingStrengthList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBindingStrengthList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBindingStrengthList extends FHIRCodePrimitive * Validation map for fields in type BindingStrength-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['required','extensible','preferred','example',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBundleTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBundleTypeList.php index 1475034b81..b42f9db6d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBundleTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBundleTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBundleTypeList extends FHIRCodePrimitive * Validation map for fields in type BundleType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['document','message','transaction','transaction-response','batch','batch-response','history','searchset','collection',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php index 6c221b40de..56739943d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCapabilityStatementKindList extends FHIRCodePrimitive * Validation map for fields in type CapabilityStatementKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['instance','capability','requirements',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php index f8e519fa9a..2f05de6093 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCarePlanActivityStatusList extends FHIRCodePrimitive * Validation map for fields in type CarePlanActivityStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-started','scheduled','in-progress','on-hold','completed','cancelled','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanIntentList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanIntentList.php index 60c16b3ba5..9048a01c8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCarePlanIntentList extends FHIRCodePrimitive * Validation map for fields in type CarePlanIntent-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposal','plan','order','option',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanStatusList.php index 6b28ac1082..ab7923711b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCarePlanStatusList extends FHIRCodePrimitive * Validation map for fields in type CarePlanStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','suspended','completed','entered-in-error','cancelled','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCareTeamStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCareTeamStatusList.php index 6c28f8c5af..8380268672 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCareTeamStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCareTeamStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCareTeamStatusList extends FHIRCodePrimitive * Validation map for fields in type CareTeamStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','active','suspended','inactive','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRChargeItemStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRChargeItemStatusList.php index bea69e1ead..d858e07e62 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRChargeItemStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRChargeItemStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRChargeItemStatusList extends FHIRCodePrimitive * Validation map for fields in type ChargeItemStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','billable','not-billable','aborted','billed','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php index 3f9e5c705c..e14ea430dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRClinicalImpressionStatusList extends FHIRCodePrimitive * Validation map for fields in type ClinicalImpressionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','completed','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php index c3614a76d9..ccfe85cf10 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCodeSystemContentModeList extends FHIRCodePrimitive * Validation map for fields in type CodeSystemContentMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-present','example','fragment','complete',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php index 8734fd247e..ac2a356b04 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCodeSystemHierarchyMeaningList extends FHIRCodePrimitive * Validation map for fields in type CodeSystemHierarchyMeaning-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['grouped-by','is-a','part-of','classified-with',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompartmentTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompartmentTypeList.php index cfb219989c..14782968c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompartmentTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompartmentTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCompartmentTypeList extends FHIRCodePrimitive * Validation map for fields in type CompartmentType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Patient','Encounter','RelatedPerson','Practitioner','Device',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php index 94cd141785..94dfbc6483 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCompositionAttestationModeList extends FHIRCodePrimitive * Validation map for fields in type CompositionAttestationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['personal','professional','legal','official',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionStatusList.php index 685490db45..2647c19ea2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCompositionStatusList extends FHIRCodePrimitive * Validation map for fields in type CompositionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['preliminary','final','amended','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php index bd827e18df..d9f69da3c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConceptMapEquivalenceList extends FHIRCodePrimitive * Validation map for fields in type ConceptMapEquivalence-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['relatedto','equivalent','equal','wider','subsumes','narrower','specializes','inexact','unmatched','disjoint',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php index 7c3508777d..3a3dd31209 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConceptMapGroupUnmappedModeList extends FHIRCodePrimitive * Validation map for fields in type ConceptMapGroupUnmappedMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['provided','fixed','other-map',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesList.php index 6b83b4bd1d..2d702e7c11 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConditionClinicalStatusCodesList extends FHIRCodePrimitive * Validation map for fields in type ConditionClinicalStatusCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','recurrence','inactive','remission','resolved',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionVerificationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionVerificationStatusList.php index 4c817f1b30..3b92f06681 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionVerificationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionVerificationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConditionVerificationStatusList extends FHIRCodePrimitive * Validation map for fields in type ConditionVerificationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['provisional','differential','confirmed','refuted','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php index ea1a5a6366..19ea129f15 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConditionalDeleteStatusList extends FHIRCodePrimitive * Validation map for fields in type ConditionalDeleteStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-supported','single','multiple',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalReadStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalReadStatusList.php index e5381d0d99..3806f15816 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalReadStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalReadStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConditionalReadStatusList extends FHIRCodePrimitive * Validation map for fields in type ConditionalReadStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-supported','modified-since','not-match','full-support',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConfidentialityClassificationList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConfidentialityClassificationList.php index 907a19e9a4..e68d0bc0a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConfidentialityClassificationList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConfidentialityClassificationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConfidentialityClassificationList extends FHIRCodePrimitive * Validation map for fields in type ConfidentialityClassification-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['U','L','M','N','R','V',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentDataMeaningList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentDataMeaningList.php index 7096af2a88..2036899c79 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentDataMeaningList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentDataMeaningList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConsentDataMeaningList extends FHIRCodePrimitive * Validation map for fields in type ConsentDataMeaning-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['instance','related','dependents','authoredby',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentExceptTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentExceptTypeList.php index d2d9f85390..0e3322f943 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentExceptTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentExceptTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConsentExceptTypeList extends FHIRCodePrimitive * Validation map for fields in type ConsentExceptType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['deny','permit',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentStateList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentStateList.php index 43d51d6841..821439fe23 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConsentStateList extends FHIRCodePrimitive * Validation map for fields in type ConsentState-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','proposed','active','rejected','inactive','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConstraintSeverityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConstraintSeverityList.php index 37749f07ce..ef9e703500 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConstraintSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConstraintSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConstraintSeverityList extends FHIRCodePrimitive * Validation map for fields in type ConstraintSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['error','warning',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointSystemList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointSystemList.php index afae958015..62a46ce306 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointSystemList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointSystemList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContactPointSystemList extends FHIRCodePrimitive * Validation map for fields in type ContactPointSystem-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['phone','fax','email','pager','url','sms','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointUseList.php index 12e06006fd..8a58923ed9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContactPointUseList extends FHIRCodePrimitive * Validation map for fields in type ContactPointUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['home','work','temp','old','mobile',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContentTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContentTypeList.php index 66ea8a660b..dfca9912eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContentTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContentTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContentTypeList extends FHIRCodePrimitive * Validation map for fields in type ContentType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['xml','json','ttl','none',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php index c5c709a737..4f5f9ea9e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContractResourceStatusCodesList extends FHIRCodePrimitive * Validation map for fields in type ContractResourceStatusCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['amended','appended','cancelled','disputed','entered-in-error','executable','executed','negotiable','offered','policy','rejected','renewed','revoked','resolved','terminated',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContributorTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContributorTypeList.php index 08b515cd60..1b53ed9369 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContributorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContributorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRContributorTypeList extends FHIRCodePrimitive * Validation map for fields in type ContributorType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['author','editor','reviewer','endorser',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDataElementStringencyList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDataElementStringencyList.php index 02ceeb67ec..4760fca649 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDataElementStringencyList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDataElementStringencyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDataElementStringencyList extends FHIRCodePrimitive * Validation map for fields in type DataElementStringency-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['comparable','fully-specified','equivalent','convertable','scaleable','flexible',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDaysOfWeekList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDaysOfWeekList.php index 2c45e179d6..ab832a4e14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDaysOfWeekList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDaysOfWeekList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDaysOfWeekList extends FHIRCodePrimitive * Validation map for fields in type DaysOfWeek-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['mon','tue','wed','thu','fri','sat','sun',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php index a0b13c5cd7..9323ae013f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDetectedIssueSeverityList extends FHIRCodePrimitive * Validation map for fields in type DetectedIssueSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['high','moderate','low',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php index e43388ea52..adbfaea691 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricCalibrationStateList extends FHIRCodePrimitive * Validation map for fields in type DeviceMetricCalibrationState-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['not-calibrated','calibration-required','calibrated','unspecified',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php index 172dd405d7..54664ddd87 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricCalibrationTypeList extends FHIRCodePrimitive * Validation map for fields in type DeviceMetricCalibrationType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['unspecified','offset','gain','two-point',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php index 6a9c139ab7..3693fdc2b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricCategoryList extends FHIRCodePrimitive * Validation map for fields in type DeviceMetricCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['measurement','setting','calculation','unspecified',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricColorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricColorList.php index 3a414fe024..4552bc7107 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricColorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricColorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricColorList extends FHIRCodePrimitive * Validation map for fields in type DeviceMetricColor-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['black','red','green','yellow','blue','magenta','cyan','white',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php index 4c37991cd5..01358fa52f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceMetricOperationalStatusList extends FHIRCodePrimitive * Validation map for fields in type DeviceMetricOperationalStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['on','off','standby','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php index 8b0c7083cc..e2088a24d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceUseStatementStatusList extends FHIRCodePrimitive * Validation map for fields in type DeviceUseStatementStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','completed','entered-in-error','intended','stopped','on-hold',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php index 5c2892cb58..98ba878e7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDiagnosticReportStatusList extends FHIRCodePrimitive * Validation map for fields in type DiagnosticReportStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['registered','partial','preliminary','final','amended','corrected','appended','cancelled','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDigitalMediaTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDigitalMediaTypeList.php index 28c7fed74f..1e8d81d2d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDigitalMediaTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDigitalMediaTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDigitalMediaTypeList extends FHIRCodePrimitive * Validation map for fields in type DigitalMediaType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['photo','video','audio',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php index 7ad0267f72..fbda6f63ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDiscriminatorTypeList extends FHIRCodePrimitive * Validation map for fields in type DiscriminatorType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['value','exists','pattern','type','profile',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentModeList.php index 0aae50fe82..50cee24643 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentModeList extends FHIRCodePrimitive * Validation map for fields in type DocumentMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['producer','consumer',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php index 5b93aa2d5a..138991d330 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentReferenceStatusList extends FHIRCodePrimitive * Validation map for fields in type DocumentReferenceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['current','superseded','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php index dcb4baa687..d4ead7714e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentRelationshipTypeList extends FHIRCodePrimitive * Validation map for fields in type DocumentRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['replaces','transforms','signs','appends',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterLocationStatusList.php index 9b158e79e8..2782392f18 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREncounterLocationStatusList extends FHIRCodePrimitive * Validation map for fields in type EncounterLocationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','active','reserved','completed',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterStatusList.php index 7d02d79da5..7739eb9801 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREncounterStatusList extends FHIRCodePrimitive * Validation map for fields in type EncounterStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','arrived','triaged','in-progress','onleave','finished','cancelled','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREndpointStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREndpointStatusList.php index 801ea1ce21..18df3a62aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREndpointStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREndpointStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREndpointStatusList extends FHIRCodePrimitive * Validation map for fields in type EndpointStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','suspended','error','off','entered-in-error','test',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php index f72be0542d..9ea543786e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREpisodeOfCareStatusList extends FHIRCodePrimitive * Validation map for fields in type EpisodeOfCareStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['planned','waitlist','active','onhold','finished','cancelled','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventCapabilityModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventCapabilityModeList.php index f3d29ae1cf..fa11a58b4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventCapabilityModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventCapabilityModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREventCapabilityModeList extends FHIRCodePrimitive * Validation map for fields in type EventCapabilityMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['sender','receiver',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventStatusList.php index f87f72aa8d..938e93adb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREventStatusList extends FHIRCodePrimitive * Validation map for fields in type EventStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['preparation','in-progress','suspended','aborted','completed','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventTimingList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventTimingList.php index 521f01d65d..31283ba83a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventTimingList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventTimingList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIREventTimingList extends FHIRCodePrimitive * Validation map for fields in type EventTiming-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['MORN','AFT','EVE','NIGHT','PHS','HS','WAKE','C','CM','CD','CV','AC','ACM','ACD','ACV','PC','PCM','PCD','PCV',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php index f1c468bf91..4f91ca9b82 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRExplanationOfBenefitStatusList extends FHIRCodePrimitive * Validation map for fields in type ExplanationOfBenefitStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','cancelled','draft','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExtensionContextList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExtensionContextList.php index 2090f64a92..361165a355 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExtensionContextList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExtensionContextList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRExtensionContextList extends FHIRCodePrimitive * Validation map for fields in type ExtensionContext-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['resource','datatype','extension',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRAllTypesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRAllTypesList.php index deab90aa8f..e887d5093a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRAllTypesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRAllTypesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFHIRAllTypesList extends FHIRCodePrimitive * Validation map for fields in type FHIRAllTypes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Address','Age','Annotation','Attachment','BackboneElement','CodeableConcept','Coding','ContactDetail','ContactPoint','Contributor','Count','DataRequirement','Distance','Dosage','Duration','Element','ElementDefinition','Extension','HumanName','Identifier','Meta','Money','Narrative','ParameterDefinition','Period','Quantity','Range','Ratio','Reference','RelatedArtifact','SampledData','Signature','SimpleQuantity','Timing','TriggerDefinition','UsageContext','base64Binary','boolean','code','date','dateTime','decimal','id','instant','integer','markdown','oid','positiveInt','string','time','unsignedInt','uri','uuid','xhtml','Account','ActivityDefinition','AdverseEvent','AllergyIntolerance','Appointment','AppointmentResponse','AuditEvent','Basic','Binary','BodySite','Bundle','CapabilityStatement','CarePlan','CareTeam','ChargeItem','Claim','ClaimResponse','ClinicalImpression','CodeSystem','Communication','CommunicationRequest','CompartmentDefinition','Composition','ConceptMap','Condition','Consent','Contract','Coverage','DataElement','DetectedIssue','Device','DeviceComponent','DeviceMetric','DeviceRequest','DeviceUseStatement','DiagnosticReport','DocumentManifest','DocumentReference','DomainResource','EligibilityRequest','EligibilityResponse','Encounter','Endpoint','EnrollmentRequest','EnrollmentResponse','EpisodeOfCare','ExpansionProfile','ExplanationOfBenefit','FamilyMemberHistory','Flag','Goal','GraphDefinition','Group','GuidanceResponse','HealthcareService','ImagingManifest','ImagingStudy','Immunization','ImmunizationRecommendation','ImplementationGuide','Library','Linkage','List','Location','Measure','MeasureReport','Media','Medication','MedicationAdministration','MedicationDispense','MedicationRequest','MedicationStatement','MessageDefinition','MessageHeader','NamingSystem','NutritionOrder','Observation','OperationDefinition','OperationOutcome','Organization','Parameters','Patient','PaymentNotice','PaymentReconciliation','Person','PlanDefinition','Practitioner','PractitionerRole','Procedure','ProcedureRequest','ProcessRequest','ProcessResponse','Provenance','Questionnaire','QuestionnaireResponse','ReferralRequest','RelatedPerson','RequestGroup','ResearchStudy','ResearchSubject','Resource','RiskAssessment','Schedule','SearchParameter','Sequence','ServiceDefinition','Slot','Specimen','StructureDefinition','StructureMap','Subscription','Substance','SupplyDelivery','SupplyRequest','Task','TestReport','TestScript','ValueSet','VisionPrescription','Type','Any',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDefinedTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDefinedTypeList.php index 445339bd7a..48a08f6f14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDefinedTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDefinedTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFHIRDefinedTypeList extends FHIRCodePrimitive * Validation map for fields in type FHIRDefinedType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Address','Age','Annotation','Attachment','BackboneElement','CodeableConcept','Coding','ContactDetail','ContactPoint','Contributor','Count','DataRequirement','Distance','Dosage','Duration','Element','ElementDefinition','Extension','HumanName','Identifier','Meta','Money','Narrative','ParameterDefinition','Period','Quantity','Range','Ratio','Reference','RelatedArtifact','SampledData','Signature','SimpleQuantity','Timing','TriggerDefinition','UsageContext','base64Binary','boolean','code','date','dateTime','decimal','id','instant','integer','markdown','oid','positiveInt','string','time','unsignedInt','uri','uuid','xhtml','Account','ActivityDefinition','AdverseEvent','AllergyIntolerance','Appointment','AppointmentResponse','AuditEvent','Basic','Binary','BodySite','Bundle','CapabilityStatement','CarePlan','CareTeam','ChargeItem','Claim','ClaimResponse','ClinicalImpression','CodeSystem','Communication','CommunicationRequest','CompartmentDefinition','Composition','ConceptMap','Condition','Consent','Contract','Coverage','DataElement','DetectedIssue','Device','DeviceComponent','DeviceMetric','DeviceRequest','DeviceUseStatement','DiagnosticReport','DocumentManifest','DocumentReference','DomainResource','EligibilityRequest','EligibilityResponse','Encounter','Endpoint','EnrollmentRequest','EnrollmentResponse','EpisodeOfCare','ExpansionProfile','ExplanationOfBenefit','FamilyMemberHistory','Flag','Goal','GraphDefinition','Group','GuidanceResponse','HealthcareService','ImagingManifest','ImagingStudy','Immunization','ImmunizationRecommendation','ImplementationGuide','Library','Linkage','List','Location','Measure','MeasureReport','Media','Medication','MedicationAdministration','MedicationDispense','MedicationRequest','MedicationStatement','MessageDefinition','MessageHeader','NamingSystem','NutritionOrder','Observation','OperationDefinition','OperationOutcome','Organization','Parameters','Patient','PaymentNotice','PaymentReconciliation','Person','PlanDefinition','Practitioner','PractitionerRole','Procedure','ProcedureRequest','ProcessRequest','ProcessResponse','Provenance','Questionnaire','QuestionnaireResponse','ReferralRequest','RelatedPerson','RequestGroup','ResearchStudy','ResearchSubject','Resource','RiskAssessment','Schedule','SearchParameter','Sequence','ServiceDefinition','Slot','Specimen','StructureDefinition','StructureMap','Subscription','Substance','SupplyDelivery','SupplyRequest','Task','TestReport','TestScript','ValueSet','VisionPrescription',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php index 14000dff32..31dda82ea5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFHIRDeviceStatusList extends FHIRCodePrimitive * Validation map for fields in type FHIRDeviceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php index 3bc824f5c1..a6a574037c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFHIRSubstanceStatusList extends FHIRCodePrimitive * Validation map for fields in type FHIRSubstanceStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php index 602cfd8b10..bdaef23fbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFamilyHistoryStatusList extends FHIRCodePrimitive * Validation map for fields in type FamilyHistoryStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['partial','completed','entered-in-error','health-unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFilterOperatorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFilterOperatorList.php index d3f773e48c..3aee8cc919 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFilterOperatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFilterOperatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFilterOperatorList extends FHIRCodePrimitive * Validation map for fields in type FilterOperator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['=','is-a','descendent-of','is-not-a','regex','in','not-in','generalizes','exists',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php index 8756b26f1b..49e437487f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFinancialResourceStatusCodesList extends FHIRCodePrimitive * Validation map for fields in type FinancialResourceStatusCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','cancelled','draft','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFlagStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFlagStatusList.php index a7a2e851d2..7aabeb6974 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFlagStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFlagStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRFlagStatusList extends FHIRCodePrimitive * Validation map for fields in type FlagStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGoalStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGoalStatusList.php index e23f70301d..691f1c374b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGoalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGoalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGoalStatusList extends FHIRCodePrimitive * Validation map for fields in type GoalStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','accepted','planned','in-progress','on-target','ahead-of-target','behind-target','sustaining','achieved','on-hold','cancelled','entered-in-error','rejected',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php index 15151340ba..fafea0565f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGraphCompartmentRuleList extends FHIRCodePrimitive * Validation map for fields in type GraphCompartmentRule-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['identical','matching','different','custom',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGroupTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGroupTypeList.php index da69ed0c7e..e5a0afdde3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGroupTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGroupTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGroupTypeList extends FHIRCodePrimitive * Validation map for fields in type GroupType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['person','animal','practitioner','device','medication','substance',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php index 0a8dd107b8..d0506618d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGuidanceResponseStatusList extends FHIRCodePrimitive * Validation map for fields in type GuidanceResponseStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['success','data-requested','data-required','in-progress','failure','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuideDependencyTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuideDependencyTypeList.php index 6f66cc7662..41b3519dfb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuideDependencyTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuideDependencyTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGuideDependencyTypeList extends FHIRCodePrimitive * Validation map for fields in type GuideDependencyType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['reference','inclusion',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidePageKindList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidePageKindList.php index ce385ea14a..7280857bfe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidePageKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidePageKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRGuidePageKindList extends FHIRCodePrimitive * Validation map for fields in type GuidePageKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['page','example','list','include','directory','dictionary','toc','resource',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRHTTPVerbList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRHTTPVerbList.php index 9924dc702a..72e801a5b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRHTTPVerbList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRHTTPVerbList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRHTTPVerbList extends FHIRCodePrimitive * Validation map for fields in type HTTPVerb-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['GET','POST','PUT','DELETE',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentifierUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentifierUseList.php index caf255d4b9..f0cecf4807 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentifierUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentifierUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIdentifierUseList extends FHIRCodePrimitive * Validation map for fields in type IdentifierUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['usual','official','temp','secondary',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php index ede1ab2deb..2006ceaf44 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIdentityAssuranceLevelList extends FHIRCodePrimitive * Validation map for fields in type IdentityAssuranceLevel-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['level1','level2','level3','level4',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php index 0df2d8b075..a640c71bc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRImmunizationStatusCodesList extends FHIRCodePrimitive * Validation map for fields in type ImmunizationStatusCodes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['completed','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRInstanceAvailabilityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRInstanceAvailabilityList.php index fbfede3e81..358035a3da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRInstanceAvailabilityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRInstanceAvailabilityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRInstanceAvailabilityList extends FHIRCodePrimitive * Validation map for fields in type InstanceAvailability-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['ONLINE','OFFLINE','NEARLINE','UNAVAILABLE',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueSeverityList.php index 9e870653cf..f075d4135d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIssueSeverityList extends FHIRCodePrimitive * Validation map for fields in type IssueSeverity-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['fatal','error','warning','information',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueTypeList.php index c3c5246ed9..44b8ef6893 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRIssueTypeList extends FHIRCodePrimitive * Validation map for fields in type IssueType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['invalid','structure','required','value','invariant','security','login','unknown','expired','forbidden','suppressed','processing','not-supported','duplicate','not-found','too-long','code-invalid','extension','too-costly','business-rule','conflict','incomplete','transient','lock-error','no-store','exception','timeout','throttled','informational',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkTypeList.php index 9e7386ab7b..7f716cdcd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLinkTypeList extends FHIRCodePrimitive * Validation map for fields in type LinkType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['replaced-by','replaces','refer','seealso',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkageTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkageTypeList.php index 72a782f947..1260c0fd6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkageTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkageTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLinkageTypeList extends FHIRCodePrimitive * Validation map for fields in type LinkageType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['source','alternate','historical',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListModeList.php index 8beb97dfbb..412dfda12f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRListModeList extends FHIRCodePrimitive * Validation map for fields in type ListMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['working','snapshot','changes',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListStatusList.php index 2cb8c73417..453e4f7306 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRListStatusList extends FHIRCodePrimitive * Validation map for fields in type ListStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['current','retired','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationModeList.php index f8c44e1875..24cc200519 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLocationModeList extends FHIRCodePrimitive * Validation map for fields in type LocationMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['instance','kind',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationStatusList.php index d2f3f0af8d..d047f06b9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLocationStatusList extends FHIRCodePrimitive * Validation map for fields in type LocationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','suspended','inactive',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasmntPrincipleList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasmntPrincipleList.php index 14b62414d0..fa29a2840c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasmntPrincipleList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasmntPrincipleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMeasmntPrincipleList extends FHIRCodePrimitive * Validation map for fields in type MeasmntPrinciple-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['other','chemical','electrical','impedance','nuclear','optical','thermal','biological','mechanical','acoustical','manual',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportStatusList.php index c747e5b369..bb533de42a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMeasureReportStatusList extends FHIRCodePrimitive * Validation map for fields in type MeasureReportStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['complete','pending','error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportTypeList.php index 761a773a2d..af51446b04 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMeasureReportTypeList extends FHIRCodePrimitive * Validation map for fields in type MeasureReportType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['individual','patient-list','summary',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationAdministrationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationAdministrationStatusList.php index bcea3d14a2..718f26abb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationAdministrationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationAdministrationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationAdministrationStatusList extends FHIRCodePrimitive * Validation map for fields in type MedicationAdministrationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','on-hold','completed','entered-in-error','stopped','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationDispenseStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationDispenseStatusList.php index 9fc7619729..1050755926 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationDispenseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationDispenseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationDispenseStatusList extends FHIRCodePrimitive * Validation map for fields in type MedicationDispenseStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['preparation','in-progress','on-hold','completed','entered-in-error','stopped',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php index f1081436f9..12e3a2d193 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationRequestIntentList extends FHIRCodePrimitive * Validation map for fields in type MedicationRequestIntent-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposal','plan','order','instance-order',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestPriorityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestPriorityList.php index dd8fb3d8f1..f36094428d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationRequestPriorityList extends FHIRCodePrimitive * Validation map for fields in type MedicationRequestPriority-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['routine','urgent','stat','asap',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestStatusList.php index 069f0748b3..24a1a2d81b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationRequestStatusList extends FHIRCodePrimitive * Validation map for fields in type MedicationRequestStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','on-hold','cancelled','completed','entered-in-error','stopped','draft','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementStatusList.php index f2ece9c282..4d496cb280 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationStatementStatusList extends FHIRCodePrimitive * Validation map for fields in type MedicationStatementStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','completed','entered-in-error','intended','stopped','on-hold',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementTakenList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementTakenList.php index 959480e43f..02c4243eb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementTakenList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementTakenList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationStatementTakenList extends FHIRCodePrimitive * Validation map for fields in type MedicationStatementTaken-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['y','n','unk','na',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatusList.php index e6ce764d1a..57ec65ae52 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationStatusList extends FHIRCodePrimitive * Validation map for fields in type MedicationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['active','inactive','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php index ff0fe51a64..a22d616c44 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMessageSignificanceCategoryList extends FHIRCodePrimitive * Validation map for fields in type MessageSignificanceCategory-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Consequence','Currency','Notification',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNameUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNameUseList.php index adc1f9d9f4..e70ad6462d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNameUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNameUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNameUseList extends FHIRCodePrimitive * Validation map for fields in type NameUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['usual','official','temp','nickname','anonymous','old','maiden',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php index d9d089079a..4a82d4b6f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNamingSystemIdentifierTypeList extends FHIRCodePrimitive * Validation map for fields in type NamingSystemIdentifierType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['oid','uuid','uri','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemTypeList.php index e5fba07736..53b32a626c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNamingSystemTypeList extends FHIRCodePrimitive * Validation map for fields in type NamingSystemType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['codesystem','identifier','root',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNarrativeStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNarrativeStatusList.php index 23b11288cb..e01efb533e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNarrativeStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNarrativeStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNarrativeStatusList extends FHIRCodePrimitive * Validation map for fields in type NarrativeStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['generated','extensions','additional','empty',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNoteTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNoteTypeList.php index dddd30663e..244a2c81c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNoteTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNoteTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNoteTypeList extends FHIRCodePrimitive * Validation map for fields in type NoteType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['display','print','printoper',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNutritionOrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNutritionOrderStatusList.php index b0c9156402..4fa17e2f98 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNutritionOrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNutritionOrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNutritionOrderStatusList extends FHIRCodePrimitive * Validation map for fields in type NutritionOrderStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposed','draft','planned','requested','active','on-hold','completed','cancelled','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationRelationshipTypeList.php index b4d4654182..349a15d5de 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRObservationRelationshipTypeList extends FHIRCodePrimitive * Validation map for fields in type ObservationRelationshipType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['has-member','derived-from','sequel-to','replaces','qualified-by','interfered-by',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationStatusList.php index 00183c06e3..2e0e74cb74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRObservationStatusList extends FHIRCodePrimitive * Validation map for fields in type ObservationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['registered','preliminary','final','amended','corrected','cancelled','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationKindList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationKindList.php index fb8ec88763..573255ee97 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIROperationKindList extends FHIRCodePrimitive * Validation map for fields in type OperationKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['operation','query',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationParameterUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationParameterUseList.php index b5e36106ae..3c85c0a07d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationParameterUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationParameterUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIROperationParameterUseList extends FHIRCodePrimitive * Validation map for fields in type OperationParameterUse-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in','out',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipantRequiredList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipantRequiredList.php index 133b6a5efb..edc0f958fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipantRequiredList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipantRequiredList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRParticipantRequiredList extends FHIRCodePrimitive * Validation map for fields in type ParticipantRequired-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['required','optional','information-only',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipationStatusList.php index d0d3da436f..eb5d33f27e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRParticipationStatusList extends FHIRCodePrimitive * Validation map for fields in type ParticipationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['accepted','declined','tentative','needs-action',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyRepresentationList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyRepresentationList.php index 3d70701df5..9cf9101537 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyRepresentationList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyRepresentationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRPropertyRepresentationList extends FHIRCodePrimitive * Validation map for fields in type PropertyRepresentation-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['xmlAttr','xmlText','typeAttr','cdaText','xhtml',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyTypeList.php index bfb1d13fa9..4fde88e707 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRPropertyTypeList extends FHIRCodePrimitive * Validation map for fields in type PropertyType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['code','Coding','string','integer','boolean','dateTime',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php index 39842c6f6a..3db784236d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRProvenanceEntityRoleList extends FHIRCodePrimitive * Validation map for fields in type ProvenanceEntityRole-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['derivation','revision','quotation','source','removal',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPublicationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPublicationStatusList.php index f849c995f2..ba219d4906 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPublicationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPublicationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRPublicationStatusList extends FHIRCodePrimitive * Validation map for fields in type PublicationStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','retired','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQualityTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQualityTypeList.php index f9b9f20f6d..a9d0d853ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQualityTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQualityTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQualityTypeList extends FHIRCodePrimitive * Validation map for fields in type qualityType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['indel','snp','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuantityComparatorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuantityComparatorList.php index e20992642c..fc794fe778 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuantityComparatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuantityComparatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuantityComparatorList extends FHIRCodePrimitive * Validation map for fields in type QuantityComparator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['<','<=','>=','>',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php index 73fc411498..9fbce20854 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuestionnaireItemTypeList extends FHIRCodePrimitive * Validation map for fields in type QuestionnaireItemType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['group','display','boolean','decimal','integer','date','dateTime','time','string','text','url','choice','open-choice','attachment','reference','quantity',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php index 54d2338f3c..d2da734248 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuestionnaireResponseStatusList extends FHIRCodePrimitive * Validation map for fields in type QuestionnaireResponseStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','completed','amended','entered-in-error','stopped',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php index 9e1d2e2ff0..2663c11fc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRReferenceHandlingPolicyList extends FHIRCodePrimitive * Validation map for fields in type ReferenceHandlingPolicy-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['literal','logical','resolves','enforced','local',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php index edef9ec9d3..449881365a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRReferenceVersionRulesList extends FHIRCodePrimitive * Validation map for fields in type ReferenceVersionRules-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['either','independent','specific',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php index 9235236a68..0c45291ae0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRelatedArtifactTypeList extends FHIRCodePrimitive * Validation map for fields in type RelatedArtifactType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['documentation','justification','citation','predecessor','successor','derived-from','depends-on','composed-of',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php index 176e372d6f..bceeae3aff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRemittanceOutcomeList extends FHIRCodePrimitive * Validation map for fields in type RemittanceOutcome-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['complete','error','partial',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRepositoryTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRepositoryTypeList.php index 0658574a57..9374559b2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRepositoryTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRepositoryTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRepositoryTypeList extends FHIRCodePrimitive * Validation map for fields in type repositoryType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['directlink','openapi','login','oauth','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestIntentList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestIntentList.php index cdf66e8989..c1f21a6b8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRequestIntentList extends FHIRCodePrimitive * Validation map for fields in type RequestIntent-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['proposal','plan','order','original-order','reflex-order','filler-order','instance-order','option',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestPriorityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestPriorityList.php index f15ab20a46..e359fa02ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRequestPriorityList extends FHIRCodePrimitive * Validation map for fields in type RequestPriority-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['routine','urgent','asap','stat',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestStatusList.php index c2dad4861c..bf8252a2e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRequestStatusList extends FHIRCodePrimitive * Validation map for fields in type RequestStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','suspended','cancelled','completed','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchStudyStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchStudyStatusList.php index 60f58b5a55..5199cb5a63 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchStudyStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchStudyStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResearchStudyStatusList extends FHIRCodePrimitive * Validation map for fields in type ResearchStudyStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','in-progress','suspended','stopped','completed','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php index aa6f6fff12..8fd75b7f58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResearchSubjectStatusList extends FHIRCodePrimitive * Validation map for fields in type ResearchSubjectStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['candidate','enrolled','active','suspended','withdrawn','completed',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceTypeList.php index 2ed3f08f57..dfdebb6660 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResourceTypeList extends FHIRCodePrimitive * Validation map for fields in type ResourceType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['Account','ActivityDefinition','AdverseEvent','AllergyIntolerance','Appointment','AppointmentResponse','AuditEvent','Basic','Binary','BodySite','Bundle','CapabilityStatement','CarePlan','CareTeam','ChargeItem','Claim','ClaimResponse','ClinicalImpression','CodeSystem','Communication','CommunicationRequest','CompartmentDefinition','Composition','ConceptMap','Condition','Consent','Contract','Coverage','DataElement','DetectedIssue','Device','DeviceComponent','DeviceMetric','DeviceRequest','DeviceUseStatement','DiagnosticReport','DocumentManifest','DocumentReference','DomainResource','EligibilityRequest','EligibilityResponse','Encounter','Endpoint','EnrollmentRequest','EnrollmentResponse','EpisodeOfCare','ExpansionProfile','ExplanationOfBenefit','FamilyMemberHistory','Flag','Goal','GraphDefinition','Group','GuidanceResponse','HealthcareService','ImagingManifest','ImagingStudy','Immunization','ImmunizationRecommendation','ImplementationGuide','Library','Linkage','List','Location','Measure','MeasureReport','Media','Medication','MedicationAdministration','MedicationDispense','MedicationRequest','MedicationStatement','MessageDefinition','MessageHeader','NamingSystem','NutritionOrder','Observation','OperationDefinition','OperationOutcome','Organization','Parameters','Patient','PaymentNotice','PaymentReconciliation','Person','PlanDefinition','Practitioner','PractitionerRole','Procedure','ProcedureRequest','ProcessRequest','ProcessResponse','Provenance','Questionnaire','QuestionnaireResponse','ReferralRequest','RelatedPerson','RequestGroup','ResearchStudy','ResearchSubject','Resource','RiskAssessment','Schedule','SearchParameter','Sequence','ServiceDefinition','Slot','Specimen','StructureDefinition','StructureMap','Subscription','Substance','SupplyDelivery','SupplyRequest','Task','TestReport','TestScript','ValueSet','VisionPrescription',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php index e5933719f0..97544b52ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResourceVersionPolicyList extends FHIRCodePrimitive * Validation map for fields in type ResourceVersionPolicy-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['no-version','versioned','versioned-update',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResponseTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResponseTypeList.php index bc8e08ef52..53ff97d990 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResponseTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResponseTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResponseTypeList extends FHIRCodePrimitive * Validation map for fields in type ResponseType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['ok','transient-error','fatal-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php index 86745fdb73..434a27c038 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRestfulCapabilityModeList extends FHIRCodePrimitive * Validation map for fields in type RestfulCapabilityMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['client','server',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchComparatorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchComparatorList.php index 6e718e2bca..d35d0729cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchComparatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchComparatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchComparatorList extends FHIRCodePrimitive * Validation map for fields in type SearchComparator-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['eq','ne','gt','lt','ge','le','sa','eb','ap',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchEntryModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchEntryModeList.php index cf6cb2feb3..41035c01e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchEntryModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchEntryModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchEntryModeList extends FHIRCodePrimitive * Validation map for fields in type SearchEntryMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['match','include','outcome',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchModifierCodeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchModifierCodeList.php index 6d877c0275..702ae6fcc2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchModifierCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchModifierCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchModifierCodeList extends FHIRCodePrimitive * Validation map for fields in type SearchModifierCode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['missing','exact','contains','not','text','in','not-in','below','above','type',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchParamTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchParamTypeList.php index 8d5ae372b5..7aeeb23eb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchParamTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchParamTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSearchParamTypeList extends FHIRCodePrimitive * Validation map for fields in type SearchParamType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['number','date','string','token','reference','composite','quantity','uri',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlicingRulesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlicingRulesList.php index f14ba5a04a..053258662d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlicingRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlicingRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSlicingRulesList extends FHIRCodePrimitive * Validation map for fields in type SlicingRules-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['closed','open','openAtEnd',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlotStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlotStatusList.php index e3f9c42bae..9e7c47e0c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlotStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlotStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSlotStatusList extends FHIRCodePrimitive * Validation map for fields in type SlotStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['busy','free','busy-unavailable','busy-tentative','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSpecimenStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSpecimenStatusList.php index 29ceab57b2..5e5d684fa4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSpecimenStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSpecimenStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSpecimenStatusList extends FHIRCodePrimitive * Validation map for fields in type SpecimenStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['available','unavailable','unsatisfactory','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php index c94f29d7e8..f3432ebe00 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureDefinitionKindList extends FHIRCodePrimitive * Validation map for fields in type StructureDefinitionKind-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['primitive-type','complex-type','resource','logical',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php index 643533c614..b7ec4033fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapContextTypeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapContextType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['type','variable',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php index 4bd7baa67f..b514f9e171 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapGroupTypeModeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapGroupTypeMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['none','types','type-and-types',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapInputModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapInputModeList.php index 9901ca4ffc..7c5fb70e94 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapInputModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapInputModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapInputModeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapInputMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['source','target',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapModelModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapModelModeList.php index e50e6eddd4..d91500fea8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapModelModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapModelModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapModelModeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapModelMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['source','queried','target','produced',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php index a5ac6a42bb..b3b26b2b0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapSourceListModeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapSourceListMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['first','not_first','last','not_last','only_one',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php index d3921b494f..e9331ab5f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapTargetListModeList extends FHIRCodePrimitive * Validation map for fields in type StructureMapTargetListMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['first','share','last','collate',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTransformList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTransformList.php index 72624c1635..684dea7333 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTransformList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTransformList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureMapTransformList extends FHIRCodePrimitive * Validation map for fields in type StructureMapTransform-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['create','copy','truncate','escape','cast','append','translate','reference','dateOp','uuid','pointer','evaluate','cc','c','qty','id','cp',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php index 7bb509c41a..a59bf6a58b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSubscriptionChannelTypeList extends FHIRCodePrimitive * Validation map for fields in type SubscriptionChannelType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['rest-hook','websocket','email','sms','message',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionStatusList.php index 98051f4a08..c268d15670 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSubscriptionStatusList extends FHIRCodePrimitive * Validation map for fields in type SubscriptionStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['requested','active','error','off',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php index 1cb87c725e..4685c0f9a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSupplyDeliveryStatusList extends FHIRCodePrimitive * Validation map for fields in type SupplyDeliveryStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['in-progress','completed','abandoned','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php index dac1844d7f..baa5d35ee1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSupplyRequestStatusList extends FHIRCodePrimitive * Validation map for fields in type SupplyRequestStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','active','suspended','cancelled','completed','entered-in-error','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php index cb2327f199..fffaa2f73b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSystemRestfulInteractionList extends FHIRCodePrimitive * Validation map for fields in type SystemRestfulInteraction-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['transaction','batch','search-system','history-system',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemVersionProcessingModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemVersionProcessingModeList.php index 7102ef1f14..9c752fdddd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemVersionProcessingModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemVersionProcessingModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSystemVersionProcessingModeList extends FHIRCodePrimitive * Validation map for fields in type SystemVersionProcessingMode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['default','check','override',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTaskStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTaskStatusList.php index ebfe6b8d40..e810641437 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTaskStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTaskStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTaskStatusList extends FHIRCodePrimitive * Validation map for fields in type TaskStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['draft','requested','received','accepted','rejected','ready','cancelled','in-progress','on-hold','failed','completed','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportActionResultList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportActionResultList.php index 4c0eed800a..bb0f898dee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportActionResultList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportActionResultList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestReportActionResultList extends FHIRCodePrimitive * Validation map for fields in type TestReportActionResult-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['pass','skip','fail','warning','error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php index eeea5bc0ae..6a4c4636e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestReportParticipantTypeList extends FHIRCodePrimitive * Validation map for fields in type TestReportParticipantType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['test-engine','client','server',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportResultList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportResultList.php index 9de3971fea..bdf5a63699 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportResultList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportResultList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestReportResultList extends FHIRCodePrimitive * Validation map for fields in type TestReportResult-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['pass','fail','pending',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportStatusList.php index c39081cd74..d389017537 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestReportStatusList extends FHIRCodePrimitive * Validation map for fields in type TestReportStatus-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['completed','in-progress','waiting','stopped','entered-in-error',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php index 7f5f590a78..401b54e709 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestScriptRequestMethodCodeList extends FHIRCodePrimitive * Validation map for fields in type TestScriptRequestMethodCode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['delete','get','options','patch','post','put',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTriggerTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTriggerTypeList.php index 6148da3936..8b237d5130 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTriggerTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTriggerTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTriggerTypeList extends FHIRCodePrimitive * Validation map for fields in type TriggerType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['named-event','periodic','data-added','data-modified','data-removed','data-accessed','data-access-ended',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php index 61e2771b3b..959e6035cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTypeDerivationRuleList extends FHIRCodePrimitive * Validation map for fields in type TypeDerivationRule-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['specialization','constraint',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php index fb614ba20c..4ce4dbffb1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTypeRestfulInteractionList extends FHIRCodePrimitive * Validation map for fields in type TypeRestfulInteraction-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['read','vread','update','patch','delete','history-instance','history-type','create','search-type',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUDIEntryTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUDIEntryTypeList.php index 0c069133b2..59813166bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUDIEntryTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUDIEntryTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRUDIEntryTypeList extends FHIRCodePrimitive * Validation map for fields in type UDIEntryType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['barcode','rfid','manual','card','self-reported','unknown',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnitsOfTimeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnitsOfTimeList.php index 755a088145..6a71352e50 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnitsOfTimeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnitsOfTimeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRUnitsOfTimeList extends FHIRCodePrimitive * Validation map for fields in type UnitsOfTime-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['s','min','h','d','wk','mo','a',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnknownContentCodeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnknownContentCodeList.php index e59c5c5eaf..7f740a8079 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnknownContentCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnknownContentCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRUnknownContentCodeList extends FHIRCodePrimitive * Validation map for fields in type UnknownContentCode-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['no','extensions','elements','both',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUseList.php index aef8410a18..bfd6e36244 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRUseList extends FHIRCodePrimitive * Validation map for fields in type Use-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['complete','proposed','exploratory','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionBaseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionBaseList.php index fa0891c2ac..d27dc1573b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionBaseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionBaseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRVisionBaseList extends FHIRCodePrimitive * Validation map for fields in type VisionBase-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['up','down','in','out',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionEyesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionEyesList.php index 5e684a3f17..c56b9284db 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionEyesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionEyesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRVisionEyesList extends FHIRCodePrimitive * Validation map for fields in type VisionEyes-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['right','left',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRXPathUsageTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRXPathUsageTypeList.php index 242dd33cdc..1f5578a1a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRXPathUsageTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRXPathUsageTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRXPathUsageTypeList extends FHIRCodePrimitive * Validation map for fields in type XPathUsageType-list * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_ENUM => ['normal','phonetic','nearby','distance','other',], ], @@ -118,11 +118,38 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDatePrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDatePrimitive.php index 4f7181ae72..6271490c47 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDatePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDatePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRDatePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRDatePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type date-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?$/', ], @@ -177,7 +179,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -197,11 +199,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDateTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDateTimePrimitive.php index 6a0de4291b..6090157f52 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDateTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDateTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_TIME_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type dateTime-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?$/', ], @@ -177,7 +179,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -198,11 +200,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_TIME_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDecimalPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDecimalPrimitive.php index b0d81bb5d3..c90f76edda 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDecimalPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDecimalPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DECIMAL_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type decimal-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^-?([0]|([1-9][0-9]*))(\\.[0-9]+)?$/', ], @@ -168,11 +170,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DECIMAL_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement.php index 131ab13fad..8a0f5dac2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -75,6 +75,7 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ELEMENT; @@ -110,7 +111,7 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterf * Validation map for fields in type Element * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElement Constructor @@ -299,11 +300,38 @@ public function setId($id = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ID] = $fieldErrs; + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAccountStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAccountStatus.php index 68bca2c23b..a4633d835d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAccountStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAccountStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAccountStatus extends FHIRElement * Validation map for fields in type AccountStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAccountStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionCardinalityBehavior.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionCardinalityBehavior.php index 449e828105..fa581fe95d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionCardinalityBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionCardinalityBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRActionCardinalityBehavior extends FHIRElement * Validation map for fields in type ActionCardinalityBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionCardinalityBehavior Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_CARDINALITY_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionConditionKind.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionConditionKind.php index 0cb10fb2ea..2cc4ea6925 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionConditionKind.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionConditionKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionConditionKind extends FHIRElement * Validation map for fields in type ActionConditionKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionConditionKind Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_CONDITION_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionGroupingBehavior.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionGroupingBehavior.php index d19b2e14f5..8448409caa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionGroupingBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionGroupingBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionGroupingBehavior extends FHIRElement * Validation map for fields in type ActionGroupingBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionGroupingBehavior Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_GROUPING_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionList.php index bb938d722f..a1dcbaec0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionList extends FHIRElement * Validation map for fields in type ActionList * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionList Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_LIST, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionParticipantType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionParticipantType.php index c4b639e3cc..87b4fb6881 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionParticipantType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionParticipantType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionParticipantType extends FHIRElement * Validation map for fields in type ActionParticipantType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionParticipantType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_PARTICIPANT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionPrecheckBehavior.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionPrecheckBehavior.php index 99646e5a64..78b6d70b66 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionPrecheckBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionPrecheckBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionPrecheckBehavior extends FHIRElement * Validation map for fields in type ActionPrecheckBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionPrecheckBehavior Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_PRECHECK_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRelationshipType.php index cf90ba02cb..81b9daa585 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionRelationshipType extends FHIRElement * Validation map for fields in type ActionRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionRelationshipType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRequiredBehavior.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRequiredBehavior.php index fe85e7e239..b31864c6fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRequiredBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRequiredBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionRequiredBehavior extends FHIRElement * Validation map for fields in type ActionRequiredBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionRequiredBehavior Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_REQUIRED_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionSelectionBehavior.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionSelectionBehavior.php index f326bd6e18..b67e833476 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionSelectionBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionSelectionBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRActionSelectionBehavior extends FHIRElement * Validation map for fields in type ActionSelectionBehavior * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActionSelectionBehavior Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTION_SELECTION_BEHAVIOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddress.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddress.php index 78ff948c47..56d279ac2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddress.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddress.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -220,7 +220,7 @@ class FHIRAddress extends FHIRElement * Validation map for fields in type Address * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddress Constructor @@ -875,11 +875,222 @@ public function setUse(FHIRAddressUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCountry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNTRY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDistrict())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISTRICT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLine())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPostalCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POSTAL_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CITY])) { + $v = $this->getCity(); + foreach($validationRules[self::FIELD_CITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_CITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CITY])) { + $errs[self::FIELD_CITY] = []; + } + $errs[self::FIELD_CITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNTRY])) { + $v = $this->getCountry(); + foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_COUNTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNTRY])) { + $errs[self::FIELD_COUNTRY] = []; + } + $errs[self::FIELD_COUNTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISTRICT])) { + $v = $this->getDistrict(); + foreach($validationRules[self::FIELD_DISTRICT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_DISTRICT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISTRICT])) { + $errs[self::FIELD_DISTRICT] = []; + } + $errs[self::FIELD_DISTRICT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINE])) { + $v = $this->getLine(); + foreach($validationRules[self::FIELD_LINE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_LINE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINE])) { + $errs[self::FIELD_LINE] = []; + } + $errs[self::FIELD_LINE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POSTAL_CODE])) { + $v = $this->getPostalCode(); + foreach($validationRules[self::FIELD_POSTAL_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_POSTAL_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POSTAL_CODE])) { + $errs[self::FIELD_POSTAL_CODE] = []; + } + $errs[self::FIELD_POSTAL_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATE])) { + $v = $this->getState(); + foreach($validationRules[self::FIELD_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATE])) { + $errs[self::FIELD_STATE] = []; + } + $errs[self::FIELD_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressType.php index f45b8b603d..fb4d5b934c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAddressType extends FHIRElement * Validation map for fields in type AddressType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddressType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressUse.php index 8c21bc60f2..84177718ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAddressUse extends FHIRElement * Validation map for fields in type AddressUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAddressUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdministrativeGender.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdministrativeGender.php index b84770d658..09becf8129 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdministrativeGender.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdministrativeGender.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRAdministrativeGender extends FHIRElement * Validation map for fields in type AdministrativeGender * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdministrativeGender Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADMINISTRATIVE_GENDER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCategory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCategory.php index d49bfa1506..d1f5525ba9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAdverseEventCategory extends FHIRElement * Validation map for fields in type AdverseEventCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseEventCategory Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCausality.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCausality.php index 49d0ef397b..6479ce5617 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCausality.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCausality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAdverseEventCausality extends FHIRElement * Validation map for fields in type AdverseEventCausality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseEventCausality Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_CAUSALITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAggregationMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAggregationMode.php index 9149c8dd49..8f64f345cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAggregationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAggregationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAggregationMode extends FHIRElement * Validation map for fields in type AggregationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAggregationMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCategory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCategory.php index 0c0e264638..b25e931e2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAllergyIntoleranceCategory extends FHIRElement * Validation map for fields in type AllergyIntoleranceCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceCategory Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceClinicalStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceClinicalStatus.php index bd5e1e4bbe..26afe6b924 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceClinicalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceClinicalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAllergyIntoleranceClinicalStatus extends FHIRElement * Validation map for fields in type AllergyIntoleranceClinicalStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceClinicalStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CLINICAL_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCriticality.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCriticality.php index f6f0918ae4..fe36216992 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCriticality.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCriticality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAllergyIntoleranceCriticality extends FHIRElement * Validation map for fields in type AllergyIntoleranceCriticality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceCriticality Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CRITICALITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceSeverity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceSeverity.php index 1a80de6bac..25c70371c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAllergyIntoleranceSeverity extends FHIRElement * Validation map for fields in type AllergyIntoleranceSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceSeverity Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceType.php index 5803091799..ef2bd282dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAllergyIntoleranceType extends FHIRElement * Validation map for fields in type AllergyIntoleranceType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceVerificationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceVerificationStatus.php index 0b17a573d1..c3acd97f4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceVerificationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceVerificationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRAllergyIntoleranceVerificationStatus extends FHIRElement * Validation map for fields in type AllergyIntoleranceVerificationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntoleranceVerificationStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_VERIFICATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAnnotation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAnnotation.php index 653f7900bb..55d6afc6b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAnnotation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAnnotation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRAnnotation extends FHIRElement * Validation map for fields in type Annotation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAnnotation Constructor @@ -408,11 +408,118 @@ public function setTime($time = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthorReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthorString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR_REFERENCE])) { + $v = $this->getAuthorReference(); + foreach($validationRules[self::FIELD_AUTHOR_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_AUTHOR_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR_REFERENCE])) { + $errs[self::FIELD_AUTHOR_REFERENCE] = []; + } + $errs[self::FIELD_AUTHOR_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR_STRING])) { + $v = $this->getAuthorString(); + foreach($validationRules[self::FIELD_AUTHOR_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_AUTHOR_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR_STRING])) { + $errs[self::FIELD_AUTHOR_STRING] = []; + } + $errs[self::FIELD_AUTHOR_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ANNOTATION, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAppointmentStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAppointmentStatus.php index def88358df..848ebecadd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAppointmentStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAppointmentStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAppointmentStatus extends FHIRElement * Validation map for fields in type AppointmentStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAppointmentStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionDirectionType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionDirectionType.php index cd5d3d4205..395c6916f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionDirectionType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionDirectionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAssertionDirectionType extends FHIRElement * Validation map for fields in type AssertionDirectionType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAssertionDirectionType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ASSERTION_DIRECTION_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionOperatorType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionOperatorType.php index bb109912f3..d16985aac8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionOperatorType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionOperatorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAssertionOperatorType extends FHIRElement * Validation map for fields in type AssertionOperatorType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAssertionOperatorType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ASSERTION_OPERATOR_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionResponseTypes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionResponseTypes.php index b327a8516f..cecab473ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionResponseTypes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionResponseTypes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAssertionResponseTypes extends FHIRElement * Validation map for fields in type AssertionResponseTypes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAssertionResponseTypes Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ASSERTION_RESPONSE_TYPES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAttachment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAttachment.php index 4f6c4f06c7..f9fece0c7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAttachment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAttachment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -200,7 +200,7 @@ class FHIRAttachment extends FHIRElement * Validation map for fields in type Attachment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAttachment Constructor @@ -749,11 +749,186 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getHash())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HASH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSize())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIZE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATION])) { + $v = $this->getCreation(); + foreach($validationRules[self::FIELD_CREATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_CREATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATION])) { + $errs[self::FIELD_CREATION] = []; + } + $errs[self::FIELD_CREATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HASH])) { + $v = $this->getHash(); + foreach($validationRules[self::FIELD_HASH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_HASH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HASH])) { + $errs[self::FIELD_HASH] = []; + } + $errs[self::FIELD_HASH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIZE])) { + $v = $this->getSize(); + foreach($validationRules[self::FIELD_SIZE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_SIZE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIZE])) { + $errs[self::FIELD_SIZE] = []; + } + $errs[self::FIELD_SIZE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ATTACHMENT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAction.php index 738b8e76fc..6630b64985 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAuditEventAction extends FHIRElement * Validation map for fields in type AuditEventAction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventAction Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_ACTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAgentNetworkType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAgentNetworkType.php index 4fbae17047..b3b346d526 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAgentNetworkType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAgentNetworkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAuditEventAgentNetworkType extends FHIRElement * Validation map for fields in type AuditEventAgentNetworkType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventAgentNetworkType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_AGENT_NETWORK_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventOutcome.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventOutcome.php index 68887131dc..b40fc29edf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAuditEventOutcome extends FHIRElement * Validation map for fields in type AuditEventOutcome * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventOutcome Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_OUTCOME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement.php index cbafcf7469..b33ceb8622 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRBackboneElement extends FHIRElement * Validation map for fields in type BackboneElement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBackboneElement Constructor @@ -242,11 +242,69 @@ public function setModifierExtension(array $modifierExtension = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getModifierExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php index 6941bd3d10..bfd497aae0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRAccountCoverage extends FHIRBackboneElement * Validation map for fields in type Account.Coverage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAccountCoverage Constructor @@ -260,11 +260,96 @@ public function setPriority($priority = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_DOT_COVERAGE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_DOT_COVERAGE, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php index 10c362203d..7fc4aa4296 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRAccountGuarantor extends FHIRBackboneElement * Validation map for fields in type Account.Guarantor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAccountGuarantor Constructor @@ -301,11 +301,113 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOnHold())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_HOLD] = $fieldErrs; + } + } + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ON_HOLD])) { + $v = $this->getOnHold(); + foreach($validationRules[self::FIELD_ON_HOLD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_DOT_GUARANTOR, self::FIELD_ON_HOLD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_HOLD])) { + $errs[self::FIELD_ON_HOLD] = []; + } + $errs[self::FIELD_ON_HOLD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_DOT_GUARANTOR, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT_DOT_GUARANTOR, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php index 41c23f0829..3111c2aa6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRActivityDefinitionDynamicValue extends FHIRBackboneElement * Validation map for fields in type ActivityDefinition.DynamicValue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActivityDefinitionDynamicValue Constructor @@ -429,11 +429,130 @@ public function setPath($path = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php index 7005f89fe9..14927cc95f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRActivityDefinitionParticipant extends FHIRBackboneElement * Validation map for fields in type ActivityDefinition.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActivityDefinitionParticipant Constructor @@ -243,11 +243,96 @@ public function setType(FHIRActionParticipantType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php index 5d9d0c2112..bec077e917 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -181,7 +181,7 @@ class FHIRAdverseEventSuspectEntity extends FHIRBackboneElement * Validation map for fields in type AdverseEvent.SuspectEntity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseEventSuspectEntity Constructor @@ -529,11 +529,181 @@ public function setInstance(FHIRReference $instance = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCausality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAUSALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCausalityAssessment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAUSALITY_ASSESSMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCausalityAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAUSALITY_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCausalityMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAUSALITY_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getCausalityProductRelatedness())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getCausalityResult())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAUSALITY_RESULT] = $fieldErrs; + } + } + if (null !== ($v = $this->getInstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CAUSALITY])) { + $v = $this->getCausality(); + foreach($validationRules[self::FIELD_CAUSALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_SUSPECT_ENTITY, self::FIELD_CAUSALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAUSALITY])) { + $errs[self::FIELD_CAUSALITY] = []; + } + $errs[self::FIELD_CAUSALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAUSALITY_ASSESSMENT])) { + $v = $this->getCausalityAssessment(); + foreach($validationRules[self::FIELD_CAUSALITY_ASSESSMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_SUSPECT_ENTITY, self::FIELD_CAUSALITY_ASSESSMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAUSALITY_ASSESSMENT])) { + $errs[self::FIELD_CAUSALITY_ASSESSMENT] = []; + } + $errs[self::FIELD_CAUSALITY_ASSESSMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAUSALITY_AUTHOR])) { + $v = $this->getCausalityAuthor(); + foreach($validationRules[self::FIELD_CAUSALITY_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_SUSPECT_ENTITY, self::FIELD_CAUSALITY_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAUSALITY_AUTHOR])) { + $errs[self::FIELD_CAUSALITY_AUTHOR] = []; + } + $errs[self::FIELD_CAUSALITY_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAUSALITY_METHOD])) { + $v = $this->getCausalityMethod(); + foreach($validationRules[self::FIELD_CAUSALITY_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_SUSPECT_ENTITY, self::FIELD_CAUSALITY_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAUSALITY_METHOD])) { + $errs[self::FIELD_CAUSALITY_METHOD] = []; + } + $errs[self::FIELD_CAUSALITY_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS])) { + $v = $this->getCausalityProductRelatedness(); + foreach($validationRules[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_SUSPECT_ENTITY, self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS])) { + $errs[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS] = []; + } + $errs[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAUSALITY_RESULT])) { + $v = $this->getCausalityResult(); + foreach($validationRules[self::FIELD_CAUSALITY_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_SUSPECT_ENTITY, self::FIELD_CAUSALITY_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAUSALITY_RESULT])) { + $errs[self::FIELD_CAUSALITY_RESULT] = []; + } + $errs[self::FIELD_CAUSALITY_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_DOT_SUSPECT_ENTITY, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php index 9e0a2b8b60..548b39ae31 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -193,7 +193,7 @@ class FHIRAllergyIntoleranceReaction extends FHIRBackboneElement * Validation map for fields in type AllergyIntolerance.Reaction * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_MANIFESTATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -670,11 +670,185 @@ public function setSubstance(FHIRCodeableConcept $substance = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExposureRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPOSURE_ROUTE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getManifestation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANIFESTATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOnset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPOSURE_ROUTE])) { + $v = $this->getExposureRoute(); + foreach($validationRules[self::FIELD_EXPOSURE_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_EXPOSURE_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPOSURE_ROUTE])) { + $errs[self::FIELD_EXPOSURE_ROUTE] = []; + } + $errs[self::FIELD_EXPOSURE_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANIFESTATION])) { + $v = $this->getManifestation(); + foreach($validationRules[self::FIELD_MANIFESTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_MANIFESTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANIFESTATION])) { + $errs[self::FIELD_MANIFESTATION] = []; + } + $errs[self::FIELD_MANIFESTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET])) { + $v = $this->getOnset(); + foreach($validationRules[self::FIELD_ONSET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_ONSET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET])) { + $errs[self::FIELD_ONSET] = []; + } + $errs[self::FIELD_ONSET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE])) { + $v = $this->getSubstance(); + foreach($validationRules[self::FIELD_SUBSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_DOT_REACTION, self::FIELD_SUBSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE])) { + $errs[self::FIELD_SUBSTANCE] = []; + } + $errs[self::FIELD_SUBSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php index 2ed6296d04..884902d8d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRAppointmentParticipant extends FHIRBackboneElement * Validation map for fields in type Appointment.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAppointmentParticipant Constructor @@ -405,11 +405,132 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED])) { + $v = $this->getRequired(); + foreach($validationRules[self::FIELD_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED])) { + $errs[self::FIELD_REQUIRED] = []; + } + $errs[self::FIELD_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php index 9060e9d2e6..9542827d71 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -240,7 +240,7 @@ class FHIRAuditEventAgent extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Agent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventAgent Constructor @@ -928,11 +928,255 @@ public function setUserId(FHIRIdentifier $userId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAltId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALT_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedia())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POLICY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPurposeOfUse())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE_OF_USE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUserId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USER_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALT_ID])) { + $v = $this->getAltId(); + foreach($validationRules[self::FIELD_ALT_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_ALT_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALT_ID])) { + $errs[self::FIELD_ALT_ID] = []; + } + $errs[self::FIELD_ALT_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIA])) { + $v = $this->getMedia(); + foreach($validationRules[self::FIELD_MEDIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_MEDIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIA])) { + $errs[self::FIELD_MEDIA] = []; + } + $errs[self::FIELD_MEDIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY])) { + $v = $this->getPolicy(); + foreach($validationRules[self::FIELD_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY])) { + $errs[self::FIELD_POLICY] = []; + } + $errs[self::FIELD_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE_OF_USE])) { + $v = $this->getPurposeOfUse(); + foreach($validationRules[self::FIELD_PURPOSE_OF_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_PURPOSE_OF_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE_OF_USE])) { + $errs[self::FIELD_PURPOSE_OF_USE] = []; + } + $errs[self::FIELD_PURPOSE_OF_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTOR])) { + $v = $this->getRequestor(); + foreach($validationRules[self::FIELD_REQUESTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_REQUESTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTOR])) { + $errs[self::FIELD_REQUESTOR] = []; + } + $errs[self::FIELD_REQUESTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USER_ID])) { + $v = $this->getUserId(); + foreach($validationRules[self::FIELD_USER_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_AGENT, self::FIELD_USER_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USER_ID])) { + $errs[self::FIELD_USER_ID] = []; + } + $errs[self::FIELD_USER_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php index cbb86e66f6..dd931bf8a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRAuditEventDetail extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventDetail Constructor @@ -277,11 +277,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_DETAIL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php index a8d2350aa6..e259a97bc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -216,7 +216,7 @@ class FHIRAuditEventEntity extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Entity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventEntity Constructor @@ -777,11 +777,236 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getLifecycle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIFECYCLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuery())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUERY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIFECYCLE])) { + $v = $this->getLifecycle(); + foreach($validationRules[self::FIELD_LIFECYCLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_LIFECYCLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIFECYCLE])) { + $errs[self::FIELD_LIFECYCLE] = []; + } + $errs[self::FIELD_LIFECYCLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUERY])) { + $v = $this->getQuery(); + foreach($validationRules[self::FIELD_QUERY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_QUERY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUERY])) { + $errs[self::FIELD_QUERY] = []; + } + $errs[self::FIELD_QUERY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_ENTITY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php index 2490743527..d216c1aedb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRAuditEventNetwork extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Network * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventNetwork Constructor @@ -272,11 +272,96 @@ public function setType(FHIRAuditEventAgentNetworkType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_NETWORK, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_NETWORK, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php index 68020f5b35..5d528c9133 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRAuditEventSource extends FHIRBackboneElement * Validation map for fields in type AuditEvent.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAuditEventSource Constructor @@ -342,11 +342,115 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_SOURCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_SOURCE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_DOT_SOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php index c06938dbb4..40693d8629 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRBundleEntry extends FHIRBackboneElement * Validation map for fields in type Bundle.Entry * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleEntry Constructor @@ -486,11 +486,166 @@ public function setSearch(FHIRBundleSearch $search = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFullUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FULL_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSearch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FULL_URL])) { + $v = $this->getFullUrl(); + foreach($validationRules[self::FIELD_FULL_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_FULL_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FULL_URL])) { + $errs[self::FIELD_FULL_URL] = []; + } + $errs[self::FIELD_FULL_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH])) { + $v = $this->getSearch(); + foreach($validationRules[self::FIELD_SEARCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_ENTRY, self::FIELD_SEARCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH])) { + $errs[self::FIELD_SEARCH] = []; + } + $errs[self::FIELD_SEARCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php index bfa7bd9754..0cf414096d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRBundleLink extends FHIRBackboneElement * Validation map for fields in type Bundle.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleLink Constructor @@ -278,11 +278,96 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getRelation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_RELATION])) { + $v = $this->getRelation(); + foreach($validationRules[self::FIELD_RELATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_LINK, self::FIELD_RELATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATION])) { + $errs[self::FIELD_RELATION] = []; + } + $errs[self::FIELD_RELATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_LINK, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php index f516423312..69ee5d94be 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -175,7 +175,7 @@ class FHIRBundleRequest extends FHIRBackboneElement * Validation map for fields in type Bundle.Request * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleRequest Constructor @@ -592,11 +592,164 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIfMatch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_MATCH] = $fieldErrs; + } + } + if (null !== ($v = $this->getIfModifiedSince())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_MODIFIED_SINCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIfNoneExist())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_NONE_EXIST] = $fieldErrs; + } + } + if (null !== ($v = $this->getIfNoneMatch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IF_NONE_MATCH] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IF_MATCH])) { + $v = $this->getIfMatch(); + foreach($validationRules[self::FIELD_IF_MATCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_MATCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_MATCH])) { + $errs[self::FIELD_IF_MATCH] = []; + } + $errs[self::FIELD_IF_MATCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IF_MODIFIED_SINCE])) { + $v = $this->getIfModifiedSince(); + foreach($validationRules[self::FIELD_IF_MODIFIED_SINCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_MODIFIED_SINCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_MODIFIED_SINCE])) { + $errs[self::FIELD_IF_MODIFIED_SINCE] = []; + } + $errs[self::FIELD_IF_MODIFIED_SINCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IF_NONE_EXIST])) { + $v = $this->getIfNoneExist(); + foreach($validationRules[self::FIELD_IF_NONE_EXIST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_NONE_EXIST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_NONE_EXIST])) { + $errs[self::FIELD_IF_NONE_EXIST] = []; + } + $errs[self::FIELD_IF_NONE_EXIST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IF_NONE_MATCH])) { + $v = $this->getIfNoneMatch(); + foreach($validationRules[self::FIELD_IF_NONE_MATCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_IF_NONE_MATCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IF_NONE_MATCH])) { + $errs[self::FIELD_IF_NONE_MATCH] = []; + } + $errs[self::FIELD_IF_NONE_MATCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_REQUEST, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php index 6ae8722b16..3886c55dfa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -156,7 +156,7 @@ class FHIRBundleResponse extends FHIRBackboneElement * Validation map for fields in type Bundle.Response * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleResponse Constructor @@ -503,11 +503,147 @@ public function setStatus($status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEtag())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ETAG] = $fieldErrs; + } + } + if (null !== ($v = $this->getLastModified())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_MODIFIED] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ETAG])) { + $v = $this->getEtag(); + foreach($validationRules[self::FIELD_ETAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_ETAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ETAG])) { + $errs[self::FIELD_ETAG] = []; + } + $errs[self::FIELD_ETAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_MODIFIED])) { + $v = $this->getLastModified(); + foreach($validationRules[self::FIELD_LAST_MODIFIED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_LAST_MODIFIED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_MODIFIED])) { + $errs[self::FIELD_LAST_MODIFIED] = []; + } + $errs[self::FIELD_LAST_MODIFIED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php index c90669c489..cb4fe00ce3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRBundleSearch extends FHIRBackboneElement * Validation map for fields in type Bundle.Search * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleSearch Constructor @@ -273,11 +273,96 @@ public function setScore($score = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCORE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_SEARCH, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORE])) { + $v = $this->getScore(); + foreach($validationRules[self::FIELD_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_DOT_SEARCH, self::FIELD_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORE])) { + $errs[self::FIELD_SCORE] = []; + } + $errs[self::FIELD_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificate.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificate.php index eb211821d7..8d8216046d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificate.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRCapabilityStatementCertificate extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Certificate * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementCertificate Constructor @@ -280,11 +280,96 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBlob())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BLOB] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BLOB])) { + $v = $this->getBlob(); + foreach($validationRules[self::FIELD_BLOB] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_CERTIFICATE, self::FIELD_BLOB, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BLOB])) { + $errs[self::FIELD_BLOB] = []; + } + $errs[self::FIELD_BLOB][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_CERTIFICATE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php index c007507354..80ad79361f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRCapabilityStatementDocument extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Document * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementDocument Constructor @@ -325,11 +325,113 @@ public function setProfile(FHIRReference $profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_DOCUMENT, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_DOCUMENT, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_DOCUMENT, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php index a9586c0c0a..d200ebc62d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRCapabilityStatementEndpoint extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Endpoint * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementEndpoint Constructor @@ -258,11 +258,96 @@ public function setProtocol(FHIRCoding $protocol = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProtocol())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROTOCOL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_ENDPOINT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_ENDPOINT, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEvent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEvent.php index 2ccfc40658..bce7de8ae3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -180,7 +180,7 @@ class FHIRCapabilityStatementEvent extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementEvent Constructor @@ -552,11 +552,181 @@ public function setResponse(FHIRReference $response = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_EVENT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_EVENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_EVENT, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_EVENT, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_EVENT, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_EVENT, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_EVENT, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php index cfa9e7ed56..67e49d3817 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRCapabilityStatementImplementation extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Implementation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementImplementation Constructor @@ -283,11 +283,96 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_IMPLEMENTATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_IMPLEMENTATION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php index b5d5be5208..e02ed5f6fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRCapabilityStatementInteraction extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Interaction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementInteraction Constructor @@ -272,11 +272,96 @@ public function setDocumentation($documentation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_INTERACTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_INTERACTION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php index 910aa503eb..b18aa4aef5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRCapabilityStatementInteraction1 extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Interaction1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementInteraction1 Constructor @@ -272,11 +272,96 @@ public function setDocumentation($documentation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_INTERACTION_1, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_INTERACTION_1, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php index 1d66c7e246..f4e21d579e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -154,7 +154,7 @@ class FHIRCapabilityStatementMessaging extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Messaging * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementMessaging Constructor @@ -548,11 +548,153 @@ public function setSupportedMessage(array $supportedMessage = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReliableCache())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELIABLE_CACHE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportedMessage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTED_MESSAGE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_MESSAGING, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_MESSAGING, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_MESSAGING, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELIABLE_CACHE])) { + $v = $this->getReliableCache(); + foreach($validationRules[self::FIELD_RELIABLE_CACHE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_MESSAGING, self::FIELD_RELIABLE_CACHE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELIABLE_CACHE])) { + $errs[self::FIELD_RELIABLE_CACHE] = []; + } + $errs[self::FIELD_RELIABLE_CACHE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTED_MESSAGE])) { + $v = $this->getSupportedMessage(); + foreach($validationRules[self::FIELD_SUPPORTED_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_MESSAGING, self::FIELD_SUPPORTED_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTED_MESSAGE])) { + $errs[self::FIELD_SUPPORTED_MESSAGE] = []; + } + $errs[self::FIELD_SUPPORTED_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php index 47dbf636df..535b5a5ffb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRCapabilityStatementOperation extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Operation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementOperation Constructor @@ -258,11 +258,96 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_OPERATION, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_OPERATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php index ac2f148462..9747bc3e86 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -298,7 +298,7 @@ class FHIRCapabilityStatementResource extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Resource * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INTERACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1366,11 +1366,327 @@ public function setVersioning(FHIRResourceVersionPolicy $versioning = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getConditionalCreate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_CREATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getConditionalDelete())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_DELETE] = $fieldErrs; + } + } + if (null !== ($v = $this->getConditionalRead())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_READ] = $fieldErrs; + } + } + if (null !== ($v = $this->getConditionalUpdate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITIONAL_UPDATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInteraction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReadHistory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_READ_HISTORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferencePolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_POLICY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_INCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_PARAM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchRevInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_REV_INCLUDE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUpdateCreate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UPDATE_CREATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersioning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSIONING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_CREATE])) { + $v = $this->getConditionalCreate(); + foreach($validationRules[self::FIELD_CONDITIONAL_CREATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_CONDITIONAL_CREATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_CREATE])) { + $errs[self::FIELD_CONDITIONAL_CREATE] = []; + } + $errs[self::FIELD_CONDITIONAL_CREATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_DELETE])) { + $v = $this->getConditionalDelete(); + foreach($validationRules[self::FIELD_CONDITIONAL_DELETE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_CONDITIONAL_DELETE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_DELETE])) { + $errs[self::FIELD_CONDITIONAL_DELETE] = []; + } + $errs[self::FIELD_CONDITIONAL_DELETE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_READ])) { + $v = $this->getConditionalRead(); + foreach($validationRules[self::FIELD_CONDITIONAL_READ] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_CONDITIONAL_READ, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_READ])) { + $errs[self::FIELD_CONDITIONAL_READ] = []; + } + $errs[self::FIELD_CONDITIONAL_READ][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITIONAL_UPDATE])) { + $v = $this->getConditionalUpdate(); + foreach($validationRules[self::FIELD_CONDITIONAL_UPDATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_CONDITIONAL_UPDATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITIONAL_UPDATE])) { + $errs[self::FIELD_CONDITIONAL_UPDATE] = []; + } + $errs[self::FIELD_CONDITIONAL_UPDATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERACTION])) { + $v = $this->getInteraction(); + foreach($validationRules[self::FIELD_INTERACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_INTERACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERACTION])) { + $errs[self::FIELD_INTERACTION] = []; + } + $errs[self::FIELD_INTERACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_READ_HISTORY])) { + $v = $this->getReadHistory(); + foreach($validationRules[self::FIELD_READ_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_READ_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_READ_HISTORY])) { + $errs[self::FIELD_READ_HISTORY] = []; + } + $errs[self::FIELD_READ_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_POLICY])) { + $v = $this->getReferencePolicy(); + foreach($validationRules[self::FIELD_REFERENCE_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_REFERENCE_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_POLICY])) { + $errs[self::FIELD_REFERENCE_POLICY] = []; + } + $errs[self::FIELD_REFERENCE_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_INCLUDE])) { + $v = $this->getSearchInclude(); + foreach($validationRules[self::FIELD_SEARCH_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_SEARCH_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_INCLUDE])) { + $errs[self::FIELD_SEARCH_INCLUDE] = []; + } + $errs[self::FIELD_SEARCH_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_PARAM])) { + $v = $this->getSearchParam(); + foreach($validationRules[self::FIELD_SEARCH_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_SEARCH_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_PARAM])) { + $errs[self::FIELD_SEARCH_PARAM] = []; + } + $errs[self::FIELD_SEARCH_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_REV_INCLUDE])) { + $v = $this->getSearchRevInclude(); + foreach($validationRules[self::FIELD_SEARCH_REV_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_SEARCH_REV_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_REV_INCLUDE])) { + $errs[self::FIELD_SEARCH_REV_INCLUDE] = []; + } + $errs[self::FIELD_SEARCH_REV_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UPDATE_CREATE])) { + $v = $this->getUpdateCreate(); + foreach($validationRules[self::FIELD_UPDATE_CREATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_UPDATE_CREATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UPDATE_CREATE])) { + $errs[self::FIELD_UPDATE_CREATE] = []; + } + $errs[self::FIELD_UPDATE_CREATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSIONING])) { + $v = $this->getVersioning(); + foreach($validationRules[self::FIELD_VERSIONING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_RESOURCE, self::FIELD_VERSIONING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSIONING])) { + $errs[self::FIELD_VERSIONING] = []; + } + $errs[self::FIELD_VERSIONING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php index 0a8fb029d2..d3613b2ea1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -197,7 +197,7 @@ class FHIRCapabilityStatementRest extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Rest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementRest Constructor @@ -812,11 +812,208 @@ public function setSecurity(FHIRCapabilityStatementSecurity $security = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCompartment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPARTMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInteraction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOperation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPERATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSearchParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEARCH_PARAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSecurity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SECURITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPARTMENT])) { + $v = $this->getCompartment(); + foreach($validationRules[self::FIELD_COMPARTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_COMPARTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARTMENT])) { + $errs[self::FIELD_COMPARTMENT] = []; + } + $errs[self::FIELD_COMPARTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERACTION])) { + $v = $this->getInteraction(); + foreach($validationRules[self::FIELD_INTERACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_INTERACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERACTION])) { + $errs[self::FIELD_INTERACTION] = []; + } + $errs[self::FIELD_INTERACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_PARAM])) { + $v = $this->getSearchParam(); + foreach($validationRules[self::FIELD_SEARCH_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_SEARCH_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_PARAM])) { + $errs[self::FIELD_SEARCH_PARAM] = []; + } + $errs[self::FIELD_SEARCH_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY])) { + $v = $this->getSecurity(); + foreach($validationRules[self::FIELD_SECURITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_REST, self::FIELD_SECURITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY])) { + $errs[self::FIELD_SECURITY] = []; + } + $errs[self::FIELD_SECURITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php index 3d31a3c995..15b3b6ca8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRCapabilityStatementSearchParam extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.SearchParam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementSearchParam Constructor @@ -424,11 +424,130 @@ public function setType(FHIRSearchParamType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SEARCH_PARAM, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SEARCH_PARAM, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SEARCH_PARAM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SEARCH_PARAM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php index fa452588cc..2e84fd3b43 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRCapabilityStatementSecurity extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Security * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementSecurity Constructor @@ -454,11 +454,134 @@ public function setService(array $service = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCertificate())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CERTIFICATE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCors())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CORS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getService())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CERTIFICATE])) { + $v = $this->getCertificate(); + foreach($validationRules[self::FIELD_CERTIFICATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SECURITY, self::FIELD_CERTIFICATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CERTIFICATE])) { + $errs[self::FIELD_CERTIFICATE] = []; + } + $errs[self::FIELD_CERTIFICATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CORS])) { + $v = $this->getCors(); + foreach($validationRules[self::FIELD_CORS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SECURITY, self::FIELD_CORS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CORS])) { + $errs[self::FIELD_CORS] = []; + } + $errs[self::FIELD_CORS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SECURITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SECURITY, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php index ece1dde5b3..88b3a902ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRCapabilityStatementSoftware extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.Software * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementSoftware Constructor @@ -360,11 +360,113 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getReleaseDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELEASE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SOFTWARE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEASE_DATE])) { + $v = $this->getReleaseDate(); + foreach($validationRules[self::FIELD_RELEASE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SOFTWARE, self::FIELD_RELEASE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEASE_DATE])) { + $errs[self::FIELD_RELEASE_DATE] = []; + } + $errs[self::FIELD_RELEASE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SOFTWARE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php index 874456c2c2..99c5f03bcf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRCapabilityStatementSupportedMessage extends FHIRBackboneElement * Validation map for fields in type CapabilityStatement.SupportedMessage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementSupportedMessage Constructor @@ -244,11 +244,96 @@ public function setMode(FHIREventCapabilityMode $mode = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SUPPORTED_MESSAGE, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_DOT_SUPPORTED_MESSAGE, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php index 56d6aef9ed..e42cb569c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -159,7 +159,7 @@ class FHIRCarePlanActivity extends FHIRBackboneElement * Validation map for fields in type CarePlan.Activity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanActivity Constructor @@ -524,11 +524,153 @@ public function setReference(FHIRReference $reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOutcomeCodeableConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTCOME_CODEABLE_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutcomeReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTCOME_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProgress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_CODEABLE_CONCEPT])) { + $v = $this->getOutcomeCodeableConcept(); + foreach($validationRules[self::FIELD_OUTCOME_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_OUTCOME_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_CODEABLE_CONCEPT])) { + $errs[self::FIELD_OUTCOME_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_OUTCOME_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_REFERENCE])) { + $v = $this->getOutcomeReference(); + foreach($validationRules[self::FIELD_OUTCOME_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_OUTCOME_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_REFERENCE])) { + $errs[self::FIELD_OUTCOME_REFERENCE] = []; + } + $errs[self::FIELD_OUTCOME_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRESS])) { + $v = $this->getProgress(); + foreach($validationRules[self::FIELD_PROGRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_PROGRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRESS])) { + $errs[self::FIELD_PROGRESS] = []; + } + $errs[self::FIELD_PROGRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_ACTIVITY, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php index 7bc69b74ab..6d374992c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -352,7 +352,7 @@ class FHIRCarePlanDetail extends FHIRBackboneElement * Validation map for fields in type CarePlan.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanDetail Constructor @@ -1410,11 +1410,393 @@ public function setStatusReason($statusReason = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDailyAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DAILY_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGoal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProhibited())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROHIBITED] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getScheduledPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getScheduledTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULED_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAILY_AMOUNT])) { + $v = $this->getDailyAmount(); + foreach($validationRules[self::FIELD_DAILY_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_DAILY_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAILY_AMOUNT])) { + $errs[self::FIELD_DAILY_AMOUNT] = []; + } + $errs[self::FIELD_DAILY_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL])) { + $v = $this->getGoal(); + foreach($validationRules[self::FIELD_GOAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_GOAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL])) { + $errs[self::FIELD_GOAL] = []; + } + $errs[self::FIELD_GOAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $v = $this->getProductCodeableConcept(); + foreach($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PRODUCT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_REFERENCE])) { + $v = $this->getProductReference(); + foreach($validationRules[self::FIELD_PRODUCT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PRODUCT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_REFERENCE])) { + $errs[self::FIELD_PRODUCT_REFERENCE] = []; + } + $errs[self::FIELD_PRODUCT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROHIBITED])) { + $v = $this->getProhibited(); + foreach($validationRules[self::FIELD_PROHIBITED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_PROHIBITED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROHIBITED])) { + $errs[self::FIELD_PROHIBITED] = []; + } + $errs[self::FIELD_PROHIBITED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_PERIOD])) { + $v = $this->getScheduledPeriod(); + foreach($validationRules[self::FIELD_SCHEDULED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_SCHEDULED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_PERIOD])) { + $errs[self::FIELD_SCHEDULED_PERIOD] = []; + } + $errs[self::FIELD_SCHEDULED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_STRING])) { + $v = $this->getScheduledString(); + foreach($validationRules[self::FIELD_SCHEDULED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_SCHEDULED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_STRING])) { + $errs[self::FIELD_SCHEDULED_STRING] = []; + } + $errs[self::FIELD_SCHEDULED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULED_TIMING])) { + $v = $this->getScheduledTiming(); + foreach($validationRules[self::FIELD_SCHEDULED_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_SCHEDULED_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULED_TIMING])) { + $errs[self::FIELD_SCHEDULED_TIMING] = []; + } + $errs[self::FIELD_SCHEDULED_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_DOT_DETAIL, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php index cb64942eb1..ef018ac60a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRCareTeamParticipant extends FHIRBackboneElement * Validation map for fields in type CareTeam.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCareTeamParticipant Constructor @@ -337,11 +337,130 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMember())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MEMBER])) { + $v = $this->getMember(); + foreach($validationRules[self::FIELD_MEMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM_DOT_PARTICIPANT, self::FIELD_MEMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEMBER])) { + $errs[self::FIELD_MEMBER] = []; + } + $errs[self::FIELD_MEMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM_DOT_PARTICIPANT, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM_DOT_PARTICIPANT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipant.php index 4032f19ab3..354b040715 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRChargeItemParticipant extends FHIRBackboneElement * Validation map for fields in type ChargeItem.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRChargeItemParticipant Constructor @@ -235,11 +235,96 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DOT_PARTICIPANT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php index 899bcaaa81..b3219808fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRClaimAccident extends FHIRBackboneElement * Validation map for fields in type Claim.Accident * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimAccident Constructor @@ -369,11 +369,130 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ACCIDENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_ADDRESS])) { + $v = $this->getLocationAddress(); + foreach($validationRules[self::FIELD_LOCATION_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ACCIDENT, self::FIELD_LOCATION_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_ADDRESS])) { + $errs[self::FIELD_LOCATION_ADDRESS] = []; + } + $errs[self::FIELD_LOCATION_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ACCIDENT, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ACCIDENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php index 3dfc5801ae..6548b48724 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -154,7 +154,7 @@ class FHIRClaimCareTeam extends FHIRBackboneElement * Validation map for fields in type Claim.CareTeam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimCareTeam Constructor @@ -434,11 +434,147 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQualification())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUALIFICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_CARE_TEAM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFICATION])) { + $v = $this->getQualification(); + foreach($validationRules[self::FIELD_QUALIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_CARE_TEAM, self::FIELD_QUALIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFICATION])) { + $errs[self::FIELD_QUALIFICATION] = []; + } + $errs[self::FIELD_QUALIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_CARE_TEAM, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_CARE_TEAM, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_CARE_TEAM, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php index d51bc9bbfd..402f81ddd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -257,7 +257,7 @@ class FHIRClaimDetail extends FHIRBackboneElement * Validation map for fields in type Claim.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimDetail Constructor @@ -982,11 +982,274 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL])) { + $v = $this->getSubDetail(); + foreach($validationRules[self::FIELD_SUB_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_SUB_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL])) { + $errs[self::FIELD_SUB_DETAIL] = []; + } + $errs[self::FIELD_SUB_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DETAIL, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php index ddedf2ff64..b5fffddc26 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -154,7 +154,7 @@ class FHIRClaimDiagnosis extends FHIRBackboneElement * Validation map for fields in type Claim.Diagnosis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimDiagnosis Constructor @@ -453,11 +453,149 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiagnosisCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosisReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPackageCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PACKAGE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT])) { + $v = $this->getDiagnosisCodeableConcept(); + foreach($validationRules[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_REFERENCE])) { + $v = $this->getDiagnosisReference(); + foreach($validationRules[self::FIELD_DIAGNOSIS_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_REFERENCE])) { + $errs[self::FIELD_DIAGNOSIS_REFERENCE] = []; + } + $errs[self::FIELD_DIAGNOSIS_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE_CODE])) { + $v = $this->getPackageCode(); + foreach($validationRules[self::FIELD_PACKAGE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_PACKAGE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE_CODE])) { + $errs[self::FIELD_PACKAGE_CODE] = []; + } + $errs[self::FIELD_PACKAGE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_DIAGNOSIS, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformation.php index e4b80591ad..a69427c6c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -230,7 +230,7 @@ class FHIRClaimInformation extends FHIRBackboneElement * Validation map for fields in type Claim.Information * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimInformation Constructor @@ -741,11 +741,232 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INFORMATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INFORMATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INFORMATION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INFORMATION, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE])) { + $v = $this->getTimingDate(); + foreach($validationRules[self::FIELD_TIMING_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INFORMATION, self::FIELD_TIMING_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE])) { + $errs[self::FIELD_TIMING_DATE] = []; + } + $errs[self::FIELD_TIMING_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INFORMATION, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INFORMATION, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INFORMATION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INFORMATION, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INFORMATION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php index 51f7de9b62..7011c9b080 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -167,7 +167,7 @@ class FHIRClaimInsurance extends FHIRBackboneElement * Validation map for fields in type Claim.Insurance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimInsurance Constructor @@ -571,11 +571,166 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBusinessArrangement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPreAuthRef())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRE_AUTH_REF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BUSINESS_ARRANGEMENT])) { + $v = $this->getBusinessArrangement(); + foreach($validationRules[self::FIELD_BUSINESS_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_BUSINESS_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BUSINESS_ARRANGEMENT])) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = []; + } + $errs[self::FIELD_BUSINESS_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLAIM_RESPONSE])) { + $v = $this->getClaimResponse(); + foreach($validationRules[self::FIELD_CLAIM_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_CLAIM_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM_RESPONSE])) { + $errs[self::FIELD_CLAIM_RESPONSE] = []; + } + $errs[self::FIELD_CLAIM_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL])) { + $v = $this->getFocal(); + foreach($validationRules[self::FIELD_FOCAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_FOCAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL])) { + $errs[self::FIELD_FOCAL] = []; + } + $errs[self::FIELD_FOCAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF])) { + $v = $this->getPreAuthRef(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_PRE_AUTH_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF])) { + $errs[self::FIELD_PRE_AUTH_REF] = []; + } + $errs[self::FIELD_PRE_AUTH_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_INSURANCE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php index 8fe1a06250..6ef0f35ee4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -421,7 +421,7 @@ class FHIRClaimItem extends FHIRBackboneElement * Validation map for fields in type Claim.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimItem Constructor @@ -1974,11 +1974,490 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareTeamLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDiagnosisLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS_LINK_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEncounter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENCOUNTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInformationLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INFORMATION_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocationAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcedureLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE_LINK_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubSite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_SITE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM_LINK_ID])) { + $v = $this->getCareTeamLinkId(); + foreach($validationRules[self::FIELD_CARE_TEAM_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_CARE_TEAM_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM_LINK_ID])) { + $errs[self::FIELD_CARE_TEAM_LINK_ID] = []; + } + $errs[self::FIELD_CARE_TEAM_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_LINK_ID])) { + $v = $this->getDiagnosisLinkId(); + foreach($validationRules[self::FIELD_DIAGNOSIS_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_DIAGNOSIS_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_LINK_ID])) { + $errs[self::FIELD_DIAGNOSIS_LINK_ID] = []; + } + $errs[self::FIELD_DIAGNOSIS_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORMATION_LINK_ID])) { + $v = $this->getInformationLinkId(); + foreach($validationRules[self::FIELD_INFORMATION_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_INFORMATION_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORMATION_LINK_ID])) { + $errs[self::FIELD_INFORMATION_LINK_ID] = []; + } + $errs[self::FIELD_INFORMATION_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_ADDRESS])) { + $v = $this->getLocationAddress(); + foreach($validationRules[self::FIELD_LOCATION_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_LOCATION_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_ADDRESS])) { + $errs[self::FIELD_LOCATION_ADDRESS] = []; + } + $errs[self::FIELD_LOCATION_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $v = $this->getLocationCodeableConcept(); + foreach($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_LOCATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_LINK_ID])) { + $v = $this->getProcedureLinkId(); + foreach($validationRules[self::FIELD_PROCEDURE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_PROCEDURE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_LINK_ID])) { + $errs[self::FIELD_PROCEDURE_LINK_ID] = []; + } + $errs[self::FIELD_PROCEDURE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_DATE])) { + $v = $this->getServicedDate(); + foreach($validationRules[self::FIELD_SERVICED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SERVICED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_DATE])) { + $errs[self::FIELD_SERVICED_DATE] = []; + } + $errs[self::FIELD_SERVICED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_PERIOD])) { + $v = $this->getServicedPeriod(); + foreach($validationRules[self::FIELD_SERVICED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SERVICED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_PERIOD])) { + $errs[self::FIELD_SERVICED_PERIOD] = []; + } + $errs[self::FIELD_SERVICED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_SITE])) { + $v = $this->getSubSite(); + foreach($validationRules[self::FIELD_SUB_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_SUB_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_SITE])) { + $errs[self::FIELD_SUB_SITE] = []; + } + $errs[self::FIELD_SUB_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php index c7b914d1df..b2fa4d2e51 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRClaimPayee extends FHIRBackboneElement * Validation map for fields in type Claim.Payee * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimPayee Constructor @@ -279,11 +279,113 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getResourceType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PAYEE, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE_TYPE])) { + $v = $this->getResourceType(); + foreach($validationRules[self::FIELD_RESOURCE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PAYEE, self::FIELD_RESOURCE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE_TYPE])) { + $errs[self::FIELD_RESOURCE_TYPE] = []; + } + $errs[self::FIELD_RESOURCE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PAYEE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php index f2318eafa3..18f6fe8e0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRClaimProcedure extends FHIRBackboneElement * Validation map for fields in type Claim.Procedure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimProcedure Constructor @@ -388,11 +388,130 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedureCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedureReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROCEDURE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { + $v = $this->getProcedureCodeableConcept(); + foreach($validationRules[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROCEDURE, self::FIELD_PROCEDURE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_REFERENCE])) { + $v = $this->getProcedureReference(); + foreach($validationRules[self::FIELD_PROCEDURE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROCEDURE, self::FIELD_PROCEDURE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_REFERENCE])) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = []; + } + $errs[self::FIELD_PROCEDURE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_PROCEDURE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php index 1ea0b014e5..b9fc2a8941 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRClaimRelated extends FHIRBackboneElement * Validation map for fields in type Claim.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimRelated Constructor @@ -288,11 +288,113 @@ public function setRelationship(FHIRCodeableConcept $relationship = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClaim())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLAIM])) { + $v = $this->getClaim(); + foreach($validationRules[self::FIELD_CLAIM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_RELATED, self::FIELD_CLAIM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM])) { + $errs[self::FIELD_CLAIM] = []; + } + $errs[self::FIELD_CLAIM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_RELATED, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_RELATED, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php index c068506c3b..fc9b3d8b43 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -243,7 +243,7 @@ class FHIRClaimSubDetail extends FHIRBackboneElement * Validation map for fields in type Claim.SubDetail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimSubDetail Constructor @@ -891,11 +891,255 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_DOT_SUB_DETAIL, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php index 90fa2286eb..9a5afdf850 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -203,7 +203,7 @@ class FHIRClaimResponseAddItem extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.AddItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseAddItem Constructor @@ -829,11 +829,225 @@ public function setService(FHIRCodeableConcept $service = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FEE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSequenceLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEQUENCE_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FEE])) { + $v = $this->getFee(); + foreach($validationRules[self::FIELD_FEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_FEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FEE])) { + $errs[self::FIELD_FEE] = []; + } + $errs[self::FIELD_FEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADD_ITEM, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php index 098c4c739e..77b3d0ef5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRClaimResponseAdjudication extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Adjudication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseAdjudication Constructor @@ -362,11 +362,130 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ADJUDICATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php index b413f97e27..d43371e6d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRClaimResponseDetail extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseDetail Constructor @@ -480,11 +480,136 @@ public function setSubDetail(array $subDetail = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL])) { + $v = $this->getSubDetail(); + foreach($validationRules[self::FIELD_SUB_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL, self::FIELD_SUB_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL])) { + $errs[self::FIELD_SUB_DETAIL] = []; + } + $errs[self::FIELD_SUB_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php index 284b88bf91..265e57ced8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -179,7 +179,7 @@ class FHIRClaimResponseDetail1 extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Detail1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseDetail1 Constructor @@ -632,11 +632,187 @@ public function setService(FHIRCodeableConcept $service = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FEE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FEE])) { + $v = $this->getFee(); + foreach($validationRules[self::FIELD_FEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_FEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FEE])) { + $errs[self::FIELD_FEE] = []; + } + $errs[self::FIELD_FEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_DETAIL_1, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php index 5f02f272df..8c5712103c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRClaimResponseError extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Error * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseError Constructor @@ -420,11 +420,130 @@ public function setSubdetailSequenceLinkId($subdetailSequenceLinkId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubdetailSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { + $v = $this->getDetailSequenceLinkId(); + foreach($validationRules[self::FIELD_DETAIL_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_DETAIL_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_DETAIL_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_DETAIL_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { + $v = $this->getSubdetailSequenceLinkId(); + foreach($validationRules[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ERROR, self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php index 308802f138..cc1f236b93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -166,7 +166,7 @@ class FHIRClaimResponseInsurance extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Insurance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseInsurance Constructor @@ -568,11 +568,166 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBusinessArrangement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPreAuthRef())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRE_AUTH_REF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BUSINESS_ARRANGEMENT])) { + $v = $this->getBusinessArrangement(); + foreach($validationRules[self::FIELD_BUSINESS_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_BUSINESS_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BUSINESS_ARRANGEMENT])) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = []; + } + $errs[self::FIELD_BUSINESS_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLAIM_RESPONSE])) { + $v = $this->getClaimResponse(); + foreach($validationRules[self::FIELD_CLAIM_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_CLAIM_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM_RESPONSE])) { + $errs[self::FIELD_CLAIM_RESPONSE] = []; + } + $errs[self::FIELD_CLAIM_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL])) { + $v = $this->getFocal(); + foreach($validationRules[self::FIELD_FOCAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_FOCAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL])) { + $errs[self::FIELD_FOCAL] = []; + } + $errs[self::FIELD_FOCAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF])) { + $v = $this->getPreAuthRef(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_PRE_AUTH_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF])) { + $errs[self::FIELD_PRE_AUTH_REF] = []; + } + $errs[self::FIELD_PRE_AUTH_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_INSURANCE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php index 308ba3d456..71d173569d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRClaimResponseItem extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseItem Constructor @@ -480,11 +480,136 @@ public function setSequenceLinkId($sequenceLinkId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_ITEM, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php index 5c65d37b68..d357a3c113 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -166,7 +166,7 @@ class FHIRClaimResponsePayment extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.Payment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponsePayment Constructor @@ -461,11 +461,164 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdjustment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADJUSTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdjustmentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADJUSTMENT_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUSTMENT])) { + $v = $this->getAdjustment(); + foreach($validationRules[self::FIELD_ADJUSTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_ADJUSTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUSTMENT])) { + $errs[self::FIELD_ADJUSTMENT] = []; + } + $errs[self::FIELD_ADJUSTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADJUSTMENT_REASON])) { + $v = $this->getAdjustmentReason(); + foreach($validationRules[self::FIELD_ADJUSTMENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_ADJUSTMENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUSTMENT_REASON])) { + $errs[self::FIELD_ADJUSTMENT_REASON] = []; + } + $errs[self::FIELD_ADJUSTMENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PAYMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php index 432ef9a123..236084b15e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRClaimResponseProcessNote extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.ProcessNote * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseProcessNote Constructor @@ -393,11 +393,130 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PROCESS_NOTE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PROCESS_NOTE, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PROCESS_NOTE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_PROCESS_NOTE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php index b4e630b918..6869ecdd2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRClaimResponseSubDetail extends FHIRBackboneElement * Validation map for fields in type ClaimResponse.SubDetail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponseSubDetail Constructor @@ -398,11 +398,117 @@ public function setSequenceLinkId($sequenceLinkId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE_DOT_SUB_DETAIL, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php index d42c1b5cc9..43fd121d93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRClinicalImpressionFinding extends FHIRBackboneElement * Validation map for fields in type ClinicalImpression.Finding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpressionFinding Constructor @@ -315,11 +315,113 @@ public function setItemReference(FHIRReference $itemReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBasis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASIS])) { + $v = $this->getBasis(); + foreach($validationRules[self::FIELD_BASIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_FINDING, self::FIELD_BASIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASIS])) { + $errs[self::FIELD_BASIS] = []; + } + $errs[self::FIELD_BASIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_FINDING, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_FINDING, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php index e48b14781a..47fe97f18d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRClinicalImpressionInvestigation extends FHIRBackboneElement * Validation map for fields in type ClinicalImpression.Investigation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpressionInvestigation Constructor @@ -280,11 +280,98 @@ public function setItem(array $item = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_INVESTIGATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_DOT_INVESTIGATION, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php index e642773c88..2f0b8988d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRCodeSystemConcept extends FHIRBackboneElement * Validation map for fields in type CodeSystem.Concept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemConcept Constructor @@ -626,11 +626,170 @@ public function setProperty(array $property = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProperty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROPERTY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_CONCEPT, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php index 9a8f7b1c7c..50d521ab3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRCodeSystemDesignation extends FHIRBackboneElement * Validation map for fields in type CodeSystem.Designation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemDesignation Constructor @@ -329,11 +329,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_DESIGNATION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_DESIGNATION, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_DESIGNATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php index 01d05069bc..d8b62bb3e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRCodeSystemFilter extends FHIRBackboneElement * Validation map for fields in type CodeSystem.Filter * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_OPERATOR => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -461,11 +461,132 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOperator())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPERATOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_FILTER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_FILTER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATOR])) { + $v = $this->getOperator(); + foreach($validationRules[self::FIELD_OPERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_FILTER, self::FIELD_OPERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATOR])) { + $errs[self::FIELD_OPERATOR] = []; + } + $errs[self::FIELD_OPERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_FILTER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php index ac57e1e859..bd35f88927 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRCodeSystemProperty extends FHIRBackboneElement * Validation map for fields in type CodeSystem.Property * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemProperty Constructor @@ -433,11 +433,130 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php index fcb62ff0d4..1db1f67ebb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -185,7 +185,7 @@ class FHIRCodeSystemProperty1 extends FHIRBackboneElement * Validation map for fields in type CodeSystem.Property1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemProperty1 Constructor @@ -637,11 +637,181 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_DOT_PROPERTY_1, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php index 9d070bf957..5e52ba8349 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRCommunicationPayload extends FHIRBackboneElement * Validation map for fields in type Communication.Payload * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationPayload Constructor @@ -311,11 +311,113 @@ public function setContentString($contentString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_DOT_PAYLOAD, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_DOT_PAYLOAD, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_STRING])) { + $v = $this->getContentString(); + foreach($validationRules[self::FIELD_CONTENT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_DOT_PAYLOAD, self::FIELD_CONTENT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_STRING])) { + $errs[self::FIELD_CONTENT_STRING] = []; + } + $errs[self::FIELD_CONTENT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php index a277861056..e0ac707c10 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRCommunicationRequestPayload extends FHIRBackboneElement * Validation map for fields in type CommunicationRequest.Payload * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationRequestPayload Constructor @@ -311,11 +311,113 @@ public function setContentString($contentString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_PAYLOAD, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_PAYLOAD, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_STRING])) { + $v = $this->getContentString(); + foreach($validationRules[self::FIELD_CONTENT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_PAYLOAD, self::FIELD_CONTENT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_STRING])) { + $errs[self::FIELD_CONTENT_STRING] = []; + } + $errs[self::FIELD_CONTENT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequester.php index b820fd353d..3f30b60817 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRCommunicationRequestRequester extends FHIRBackboneElement * Validation map for fields in type CommunicationRequest.Requester * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationRequestRequester Constructor @@ -226,11 +226,96 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_REQUESTER, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_DOT_REQUESTER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php index a16e90b5b1..9f641f2106 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRCompartmentDefinitionResource extends FHIRBackboneElement * Validation map for fields in type CompartmentDefinition.Resource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompartmentDefinitionResource Constructor @@ -387,11 +387,115 @@ public function setParam(array $param = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION_DOT_RESOURCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION_DOT_RESOURCE, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAM])) { + $v = $this->getParam(); + foreach($validationRules[self::FIELD_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION_DOT_RESOURCE, self::FIELD_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAM])) { + $errs[self::FIELD_PARAM] = []; + } + $errs[self::FIELD_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php index 7f8a17f7f3..7492760e81 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRCompositionAttester extends FHIRBackboneElement * Validation map for fields in type Composition.Attester * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_MODE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -372,11 +372,115 @@ public function setTime($time = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getMode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_ATTESTER, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php index 47eb87fda6..b87bc4e64e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRCompositionEvent extends FHIRBackboneElement * Validation map for fields in type Composition.Event * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionEvent Constructor @@ -380,11 +380,117 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_EVENT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php index 257e5102a2..83b431e53a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRCompositionRelatesTo extends FHIRBackboneElement * Validation map for fields in type Composition.RelatesTo * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionRelatesTo Constructor @@ -297,11 +297,113 @@ public function setTargetReference(FHIRReference $targetReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_RELATES_TO, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_IDENTIFIER])) { + $v = $this->getTargetIdentifier(); + foreach($validationRules[self::FIELD_TARGET_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_RELATES_TO, self::FIELD_TARGET_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_IDENTIFIER])) { + $errs[self::FIELD_TARGET_IDENTIFIER] = []; + } + $errs[self::FIELD_TARGET_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_REFERENCE])) { + $v = $this->getTargetReference(); + foreach($validationRules[self::FIELD_TARGET_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_RELATES_TO, self::FIELD_TARGET_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_REFERENCE])) { + $errs[self::FIELD_TARGET_REFERENCE] = []; + } + $errs[self::FIELD_TARGET_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php index fe22728d79..6b207f2ba9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -207,7 +207,7 @@ class FHIRCompositionSection extends FHIRBackboneElement * Validation map for fields in type Composition.Section * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionSection Constructor @@ -692,11 +692,202 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEmptyReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EMPTY_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTRY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_BY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSection())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EMPTY_REASON])) { + $v = $this->getEmptyReason(); + foreach($validationRules[self::FIELD_EMPTY_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_EMPTY_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EMPTY_REASON])) { + $errs[self::FIELD_EMPTY_REASON] = []; + } + $errs[self::FIELD_EMPTY_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTRY])) { + $v = $this->getEntry(); + foreach($validationRules[self::FIELD_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY])) { + $errs[self::FIELD_ENTRY] = []; + } + $errs[self::FIELD_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_BY])) { + $v = $this->getOrderedBy(); + foreach($validationRules[self::FIELD_ORDERED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_ORDERED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_BY])) { + $errs[self::FIELD_ORDERED_BY] = []; + } + $errs[self::FIELD_ORDERED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECTION])) { + $v = $this->getSection(); + foreach($validationRules[self::FIELD_SECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_SECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECTION])) { + $errs[self::FIELD_SECTION] = []; + } + $errs[self::FIELD_SECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_DOT_SECTION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php index cc99de1492..51f1703dd8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRConceptMapDependsOn extends FHIRBackboneElement * Validation map for fields in type ConceptMap.DependsOn * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapDependsOn Constructor @@ -439,11 +439,130 @@ public function setSystem($system = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getProperty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROPERTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_DEPENDS_ON, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php index bb81bc4e49..ab9d575f75 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRConceptMapElement extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Element * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapElement Constructor @@ -364,11 +364,115 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_ELEMENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_ELEMENT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_ELEMENT, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php index 477104bfdf..cf17cca8b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -166,7 +166,7 @@ class FHIRConceptMapGroup extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Group * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ELEMENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -572,11 +572,166 @@ public function setUnmapped(FHIRConceptMapUnmapped $unmapped = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_VERSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_VERSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnmapped())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNMAPPED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_VERSION])) { + $v = $this->getSourceVersion(); + foreach($validationRules[self::FIELD_SOURCE_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_SOURCE_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_VERSION])) { + $errs[self::FIELD_SOURCE_VERSION] = []; + } + $errs[self::FIELD_SOURCE_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_VERSION])) { + $v = $this->getTargetVersion(); + foreach($validationRules[self::FIELD_TARGET_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_TARGET_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_VERSION])) { + $errs[self::FIELD_TARGET_VERSION] = []; + } + $errs[self::FIELD_TARGET_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNMAPPED])) { + $v = $this->getUnmapped(); + foreach($validationRules[self::FIELD_UNMAPPED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_GROUP, self::FIELD_UNMAPPED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNMAPPED])) { + $errs[self::FIELD_UNMAPPED] = []; + } + $errs[self::FIELD_UNMAPPED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php index ed82335a18..7410200ef3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -170,7 +170,7 @@ class FHIRConceptMapTarget extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapTarget Constructor @@ -610,11 +610,168 @@ public function setProduct(array $product = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDependsOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEPENDS_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getEquivalence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EQUIVALENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProduct())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRODUCT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDS_ON])) { + $v = $this->getDependsOn(); + foreach($validationRules[self::FIELD_DEPENDS_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_DEPENDS_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDS_ON])) { + $errs[self::FIELD_DEPENDS_ON] = []; + } + $errs[self::FIELD_DEPENDS_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EQUIVALENCE])) { + $v = $this->getEquivalence(); + foreach($validationRules[self::FIELD_EQUIVALENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_EQUIVALENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EQUIVALENCE])) { + $errs[self::FIELD_EQUIVALENCE] = []; + } + $errs[self::FIELD_EQUIVALENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT])) { + $v = $this->getProduct(); + foreach($validationRules[self::FIELD_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_TARGET, self::FIELD_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT])) { + $errs[self::FIELD_PRODUCT] = []; + } + $errs[self::FIELD_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php index 482f0e8518..bfda087542 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRConceptMapUnmapped extends FHIRBackboneElement * Validation map for fields in type ConceptMap.Unmapped * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapUnmapped Constructor @@ -436,11 +436,130 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_UNMAPPED, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_UNMAPPED, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_UNMAPPED, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_DOT_UNMAPPED, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php index 3024440452..17c342aee8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRConditionEvidence extends FHIRBackboneElement * Validation map for fields in type Condition.Evidence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionEvidence Constructor @@ -304,11 +304,100 @@ public function setDetail(array $detail = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_EVIDENCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_EVIDENCE, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php index 826668c6ba..357ec47c1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRConditionStage extends FHIRBackboneElement * Validation map for fields in type Condition.Stage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionStage Constructor @@ -273,11 +273,98 @@ public function setSummary(FHIRCodeableConcept $summary = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAssessment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ASSESSMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSummary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUMMARY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSESSMENT])) { + $v = $this->getAssessment(); + foreach($validationRules[self::FIELD_ASSESSMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_STAGE, self::FIELD_ASSESSMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSESSMENT])) { + $errs[self::FIELD_ASSESSMENT] = []; + } + $errs[self::FIELD_ASSESSMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUMMARY])) { + $v = $this->getSummary(); + foreach($validationRules[self::FIELD_SUMMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_DOT_STAGE, self::FIELD_SUMMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUMMARY])) { + $errs[self::FIELD_SUMMARY] = []; + } + $errs[self::FIELD_SUMMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php index 82719a27ed..a8af92598c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRConsentActor extends FHIRBackboneElement * Validation map for fields in type Consent.Actor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentActor Constructor @@ -239,11 +239,96 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_ACTOR, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_ACTOR, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1.php index f7585ace0c..c993f49dcb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRConsentActor1 extends FHIRBackboneElement * Validation map for fields in type Consent.Actor1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentActor1 Constructor @@ -239,11 +239,96 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_ACTOR_1, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_ACTOR_1, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php index d0b38ac46b..f444f76571 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRConsentData extends FHIRBackboneElement * Validation map for fields in type Consent.Data * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentData Constructor @@ -244,11 +244,96 @@ public function setReference(FHIRReference $reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMeaning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEANING] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MEANING])) { + $v = $this->getMeaning(); + foreach($validationRules[self::FIELD_MEANING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_DATA, self::FIELD_MEANING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEANING])) { + $errs[self::FIELD_MEANING] = []; + } + $errs[self::FIELD_MEANING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_DATA, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1.php index 2351e27240..da1e5e640f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRConsentData1 extends FHIRBackboneElement * Validation map for fields in type Consent.Data1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentData1 Constructor @@ -244,11 +244,96 @@ public function setReference(FHIRReference $reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMeaning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEANING] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MEANING])) { + $v = $this->getMeaning(); + foreach($validationRules[self::FIELD_MEANING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_DATA_1, self::FIELD_MEANING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEANING])) { + $errs[self::FIELD_MEANING] = []; + } + $errs[self::FIELD_MEANING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_DATA_1, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExcept.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExcept.php index a30858b111..8edf3fbdd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExcept.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -220,7 +220,7 @@ class FHIRConsentExcept extends FHIRBackboneElement * Validation map for fields in type Consent.Except * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentExcept Constructor @@ -932,11 +932,246 @@ public function setType(FHIRConsentExceptType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getActor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getClass())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CLASS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getData())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDataPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPurpose())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_EXCEPT, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_EXCEPT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_EXCEPT, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_EXCEPT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_EXCEPT, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_PERIOD])) { + $v = $this->getDataPeriod(); + foreach($validationRules[self::FIELD_DATA_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_EXCEPT, self::FIELD_DATA_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_PERIOD])) { + $errs[self::FIELD_DATA_PERIOD] = []; + } + $errs[self::FIELD_DATA_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_EXCEPT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_EXCEPT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_EXCEPT, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_EXCEPT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php index 75cee857f8..fa6cea2609 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRConsentPolicy extends FHIRBackboneElement * Validation map for fields in type Consent.Policy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentPolicy Constructor @@ -282,11 +282,96 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_POLICY, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DOT_POLICY, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent.php index 4b9bdc489c..23ea171153 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRContractAgent extends FHIRBackboneElement * Validation map for fields in type Contract.Agent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractAgent Constructor @@ -267,11 +267,98 @@ public function setRole(array $role = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_AGENT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_AGENT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1.php index 2274b7962e..0cfba87a5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRContractAgent1 extends FHIRBackboneElement * Validation map for fields in type Contract.Agent1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractAgent1 Constructor @@ -271,11 +271,98 @@ public function setRole(array $role = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_AGENT_1, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_AGENT_1, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php index 36d12f5416..11cd0dce98 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRContractFriendly extends FHIRBackboneElement * Validation map for fields in type Contract.Friendly * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractFriendly Constructor @@ -232,11 +232,96 @@ public function setContentReference(FHIRReference $contentReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_FRIENDLY, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_FRIENDLY, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php index 078d44756a..07732bfd6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRContractLegal extends FHIRBackboneElement * Validation map for fields in type Contract.Legal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractLegal Constructor @@ -226,11 +226,96 @@ public function setContentReference(FHIRReference $contentReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_LEGAL, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_LEGAL, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php index 3da2c70d02..945f81f264 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRContractRule extends FHIRBackboneElement * Validation map for fields in type Contract.Rule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractRule Constructor @@ -232,11 +232,96 @@ public function setContentReference(FHIRReference $contentReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContentAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT_ATTACHMENT])) { + $v = $this->getContentAttachment(); + foreach($validationRules[self::FIELD_CONTENT_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_RULE, self::FIELD_CONTENT_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_ATTACHMENT])) { + $errs[self::FIELD_CONTENT_ATTACHMENT] = []; + } + $errs[self::FIELD_CONTENT_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_RULE, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php index f9e08a2d57..60ac021754 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRContractSigner extends FHIRBackboneElement * Validation map for fields in type Contract.Signer * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_SIGNATURE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -329,11 +329,115 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSignature())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SIGNATURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SIGNER, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNATURE])) { + $v = $this->getSignature(); + foreach($validationRules[self::FIELD_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SIGNER, self::FIELD_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNATURE])) { + $errs[self::FIELD_SIGNATURE] = []; + } + $errs[self::FIELD_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_SIGNER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php index 1c53fcaea9..93dac7910f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -258,7 +258,7 @@ class FHIRContractTerm extends FHIRBackboneElement * Validation map for fields in type Contract.Term * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractTerm Constructor @@ -1104,11 +1104,297 @@ public function setValuedItem(array $valuedItem = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getActionReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getApplies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPLIES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValuedItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUED_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTION_REASON])) { + $v = $this->getActionReason(); + foreach($validationRules[self::FIELD_ACTION_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_ACTION_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION_REASON])) { + $errs[self::FIELD_ACTION_REASON] = []; + } + $errs[self::FIELD_ACTION_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPLIES])) { + $v = $this->getApplies(); + foreach($validationRules[self::FIELD_APPLIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_APPLIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES])) { + $errs[self::FIELD_APPLIES] = []; + } + $errs[self::FIELD_APPLIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUED_ITEM])) { + $v = $this->getValuedItem(); + foreach($validationRules[self::FIELD_VALUED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_TERM, self::FIELD_VALUED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUED_ITEM])) { + $errs[self::FIELD_VALUED_ITEM] = []; + } + $errs[self::FIELD_VALUED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php index b43252b261..b662e790d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -221,7 +221,7 @@ class FHIRContractValuedItem extends FHIRBackboneElement * Validation map for fields in type Contract.ValuedItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractValuedItem Constructor @@ -703,11 +703,215 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEffectiveTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntityCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntityReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPoints())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POINTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_TIME])) { + $v = $this->getEffectiveTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_EFFECTIVE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_TIME])) { + $errs[self::FIELD_EFFECTIVE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { + $v = $this->getEntityCodeableConcept(); + foreach($validationRules[self::FIELD_ENTITY_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_ENTITY_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY_REFERENCE])) { + $v = $this->getEntityReference(); + foreach($validationRules[self::FIELD_ENTITY_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_ENTITY_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY_REFERENCE])) { + $errs[self::FIELD_ENTITY_REFERENCE] = []; + } + $errs[self::FIELD_ENTITY_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POINTS])) { + $v = $this->getPoints(); + foreach($validationRules[self::FIELD_POINTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_POINTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POINTS])) { + $errs[self::FIELD_POINTS] = []; + } + $errs[self::FIELD_POINTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php index 1a86ccf501..cb8c9b78b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -223,7 +223,7 @@ class FHIRContractValuedItem1 extends FHIRBackboneElement * Validation map for fields in type Contract.ValuedItem1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractValuedItem1 Constructor @@ -709,11 +709,215 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEffectiveTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntityCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntityReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPoints())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POINTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_TIME])) { + $v = $this->getEffectiveTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_EFFECTIVE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_TIME])) { + $errs[self::FIELD_EFFECTIVE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { + $v = $this->getEntityCodeableConcept(); + foreach($validationRules[self::FIELD_ENTITY_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_ENTITY_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ENTITY_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY_REFERENCE])) { + $v = $this->getEntityReference(); + foreach($validationRules[self::FIELD_ENTITY_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_ENTITY_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY_REFERENCE])) { + $errs[self::FIELD_ENTITY_REFERENCE] = []; + } + $errs[self::FIELD_ENTITY_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POINTS])) { + $v = $this->getPoints(); + foreach($validationRules[self::FIELD_POINTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_POINTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POINTS])) { + $errs[self::FIELD_POINTS] = []; + } + $errs[self::FIELD_POINTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_DOT_VALUED_ITEM_1, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGrouping.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGrouping.php index 16864dcd6e..0c341125d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGrouping.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGrouping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -253,7 +253,7 @@ class FHIRCoverageGrouping extends FHIRBackboneElement * Validation map for fields in type Coverage.Grouping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverageGrouping Constructor @@ -1048,11 +1048,266 @@ public function setSubPlanDisplay($subPlanDisplay = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getClassDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroupDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPlan())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PLAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPlanDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PLAN_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubClassDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_CLASS_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubGroupDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_GROUP_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubPlan())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_PLAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubPlanDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_PLAN_DISPLAY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS_DISPLAY])) { + $v = $this->getClassDisplay(); + foreach($validationRules[self::FIELD_CLASS_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_CLASS_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS_DISPLAY])) { + $errs[self::FIELD_CLASS_DISPLAY] = []; + } + $errs[self::FIELD_CLASS_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_DISPLAY])) { + $v = $this->getGroupDisplay(); + foreach($validationRules[self::FIELD_GROUP_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_GROUP_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_DISPLAY])) { + $errs[self::FIELD_GROUP_DISPLAY] = []; + } + $errs[self::FIELD_GROUP_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PLAN])) { + $v = $this->getPlan(); + foreach($validationRules[self::FIELD_PLAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_PLAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PLAN])) { + $errs[self::FIELD_PLAN] = []; + } + $errs[self::FIELD_PLAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PLAN_DISPLAY])) { + $v = $this->getPlanDisplay(); + foreach($validationRules[self::FIELD_PLAN_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_PLAN_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PLAN_DISPLAY])) { + $errs[self::FIELD_PLAN_DISPLAY] = []; + } + $errs[self::FIELD_PLAN_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_CLASS])) { + $v = $this->getSubClass(); + foreach($validationRules[self::FIELD_SUB_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_SUB_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_CLASS])) { + $errs[self::FIELD_SUB_CLASS] = []; + } + $errs[self::FIELD_SUB_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_CLASS_DISPLAY])) { + $v = $this->getSubClassDisplay(); + foreach($validationRules[self::FIELD_SUB_CLASS_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_SUB_CLASS_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_CLASS_DISPLAY])) { + $errs[self::FIELD_SUB_CLASS_DISPLAY] = []; + } + $errs[self::FIELD_SUB_CLASS_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_GROUP])) { + $v = $this->getSubGroup(); + foreach($validationRules[self::FIELD_SUB_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_SUB_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_GROUP])) { + $errs[self::FIELD_SUB_GROUP] = []; + } + $errs[self::FIELD_SUB_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_GROUP_DISPLAY])) { + $v = $this->getSubGroupDisplay(); + foreach($validationRules[self::FIELD_SUB_GROUP_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_SUB_GROUP_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_GROUP_DISPLAY])) { + $errs[self::FIELD_SUB_GROUP_DISPLAY] = []; + } + $errs[self::FIELD_SUB_GROUP_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_PLAN])) { + $v = $this->getSubPlan(); + foreach($validationRules[self::FIELD_SUB_PLAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_SUB_PLAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_PLAN])) { + $errs[self::FIELD_SUB_PLAN] = []; + } + $errs[self::FIELD_SUB_PLAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_PLAN_DISPLAY])) { + $v = $this->getSubPlanDisplay(); + foreach($validationRules[self::FIELD_SUB_PLAN_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE_DOT_GROUPING, self::FIELD_SUB_PLAN_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_PLAN_DISPLAY])) { + $errs[self::FIELD_SUB_PLAN_DISPLAY] = []; + } + $errs[self::FIELD_SUB_PLAN_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php index 23547432bc..ea24b132b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRDataElementMapping extends FHIRBackboneElement * Validation map for fields in type DataElement.Mapping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataElementMapping Constructor @@ -443,11 +443,130 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_DOT_MAPPING, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTITY])) { + $v = $this->getIdentity(); + foreach($validationRules[self::FIELD_IDENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_DOT_MAPPING, self::FIELD_IDENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY])) { + $errs[self::FIELD_IDENTITY] = []; + } + $errs[self::FIELD_IDENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_DOT_MAPPING, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_DOT_MAPPING, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php index 20524fecff..9df0a60c05 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRDetectedIssueMitigation extends FHIRBackboneElement * Validation map for fields in type DetectedIssue.Mitigation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDetectedIssueMitigation Constructor @@ -320,11 +320,113 @@ public function setDate($date = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_MITIGATION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_MITIGATION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_DOT_MITIGATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdi.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdi.php index 8a0caa8297..31243f4ce0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdi.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdi.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -197,7 +197,7 @@ class FHIRDeviceUdi extends FHIRBackboneElement * Validation map for fields in type Device.Udi * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceUdi Constructor @@ -681,11 +681,181 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCarrierAIDC())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARRIER_AIDC] = $fieldErrs; + } + } + if (null !== ($v = $this->getCarrierHRF())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARRIER_HRF] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEntryType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTRY_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssuer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUER] = $fieldErrs; + } + } + if (null !== ($v = $this->getJurisdiction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_JURISDICTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CARRIER_AIDC])) { + $v = $this->getCarrierAIDC(); + foreach($validationRules[self::FIELD_CARRIER_AIDC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI, self::FIELD_CARRIER_AIDC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARRIER_AIDC])) { + $errs[self::FIELD_CARRIER_AIDC] = []; + } + $errs[self::FIELD_CARRIER_AIDC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARRIER_HRF])) { + $v = $this->getCarrierHRF(); + foreach($validationRules[self::FIELD_CARRIER_HRF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI, self::FIELD_CARRIER_HRF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARRIER_HRF])) { + $errs[self::FIELD_CARRIER_HRF] = []; + } + $errs[self::FIELD_CARRIER_HRF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE_IDENTIFIER])) { + $v = $this->getDeviceIdentifier(); + foreach($validationRules[self::FIELD_DEVICE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI, self::FIELD_DEVICE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE_IDENTIFIER])) { + $errs[self::FIELD_DEVICE_IDENTIFIER] = []; + } + $errs[self::FIELD_DEVICE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTRY_TYPE])) { + $v = $this->getEntryType(); + foreach($validationRules[self::FIELD_ENTRY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI, self::FIELD_ENTRY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY_TYPE])) { + $errs[self::FIELD_ENTRY_TYPE] = []; + } + $errs[self::FIELD_ENTRY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUER])) { + $v = $this->getIssuer(); + foreach($validationRules[self::FIELD_ISSUER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI, self::FIELD_ISSUER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUER])) { + $errs[self::FIELD_ISSUER] = []; + } + $errs[self::FIELD_ISSUER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_DOT_UDI, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php index 2e17b6671b..68763cd159 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRDeviceComponentProductionSpecification extends FHIRBackboneElement * Validation map for fields in type DeviceComponent.ProductionSpecification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceComponentProductionSpecification Constructor @@ -313,11 +313,113 @@ public function setSpecType(FHIRCodeableConcept $specType = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComponentId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPONENT_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductionSpec())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCTION_SPEC] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPEC_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPONENT_ID])) { + $v = $this->getComponentId(); + foreach($validationRules[self::FIELD_COMPONENT_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT_DOT_PRODUCTION_SPECIFICATION, self::FIELD_COMPONENT_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPONENT_ID])) { + $errs[self::FIELD_COMPONENT_ID] = []; + } + $errs[self::FIELD_COMPONENT_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCTION_SPEC])) { + $v = $this->getProductionSpec(); + foreach($validationRules[self::FIELD_PRODUCTION_SPEC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT_DOT_PRODUCTION_SPECIFICATION, self::FIELD_PRODUCTION_SPEC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCTION_SPEC])) { + $errs[self::FIELD_PRODUCTION_SPEC] = []; + } + $errs[self::FIELD_PRODUCTION_SPEC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPEC_TYPE])) { + $v = $this->getSpecType(); + foreach($validationRules[self::FIELD_SPEC_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT_DOT_PRODUCTION_SPECIFICATION, self::FIELD_SPEC_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPEC_TYPE])) { + $errs[self::FIELD_SPEC_TYPE] = []; + } + $errs[self::FIELD_SPEC_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php index 389e1fc5f5..9f86142fd8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRDeviceMetricCalibration extends FHIRBackboneElement * Validation map for fields in type DeviceMetric.Calibration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCalibration Constructor @@ -334,11 +334,113 @@ public function setType(FHIRDeviceMetricCalibrationType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getState())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_STATE])) { + $v = $this->getState(); + foreach($validationRules[self::FIELD_STATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_DOT_CALIBRATION, self::FIELD_STATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATE])) { + $errs[self::FIELD_STATE] = []; + } + $errs[self::FIELD_STATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME])) { + $v = $this->getTime(); + foreach($validationRules[self::FIELD_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_DOT_CALIBRATION, self::FIELD_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME])) { + $errs[self::FIELD_TIME] = []; + } + $errs[self::FIELD_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_DOT_CALIBRATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequester.php index 0e5c3d88c2..5d146ea550 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRDeviceRequestRequester extends FHIRBackboneElement * Validation map for fields in type DeviceRequest.Requester * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceRequestRequester Constructor @@ -225,11 +225,96 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST_DOT_REQUESTER, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST_DOT_REQUESTER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php index e9967ba3b1..a79ffb7c19 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRDiagnosticReportImage extends FHIRBackboneElement * Validation map for fields in type DiagnosticReport.Image * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReportImage Constructor @@ -260,11 +260,96 @@ public function setLink(FHIRReference $link = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLink())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_DOT_IMAGE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_DOT_IMAGE, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformer.php index c6e5155e3c..315be63bcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRDiagnosticReportPerformer extends FHIRBackboneElement * Validation map for fields in type DiagnosticReport.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReportPerformer Constructor @@ -241,11 +241,96 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_DOT_PERFORMER, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php index f2bc6f4e82..d022ba70df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRDocumentManifestContent extends FHIRBackboneElement * Validation map for fields in type DocumentManifest.Content * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentManifestContent Constructor @@ -238,11 +238,96 @@ public function setPReference(FHIRReference $pReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_P_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_P_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_P_ATTACHMENT])) { + $v = $this->getPAttachment(); + foreach($validationRules[self::FIELD_P_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST_DOT_CONTENT, self::FIELD_P_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_P_ATTACHMENT])) { + $errs[self::FIELD_P_ATTACHMENT] = []; + } + $errs[self::FIELD_P_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_P_REFERENCE])) { + $v = $this->getPReference(); + foreach($validationRules[self::FIELD_P_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST_DOT_CONTENT, self::FIELD_P_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_P_REFERENCE])) { + $errs[self::FIELD_P_REFERENCE] = []; + } + $errs[self::FIELD_P_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php index 8109de9ab0..e00a0de9f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRDocumentManifestRelated extends FHIRBackboneElement * Validation map for fields in type DocumentManifest.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentManifestRelated Constructor @@ -232,11 +232,96 @@ public function setRef(FHIRReference $ref = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRef())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST_DOT_RELATED, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REF])) { + $v = $this->getRef(); + foreach($validationRules[self::FIELD_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST_DOT_RELATED, self::FIELD_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REF])) { + $errs[self::FIELD_REF] = []; + } + $errs[self::FIELD_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php index aaa17ded38..08c5ea3872 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRDocumentReferenceContent extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Content * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceContent Constructor @@ -231,11 +231,96 @@ public function setFormat(FHIRCoding $format = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFormat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORMAT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ATTACHMENT])) { + $v = $this->getAttachment(); + foreach($validationRules[self::FIELD_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTENT, self::FIELD_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTACHMENT])) { + $errs[self::FIELD_ATTACHMENT] = []; + } + $errs[self::FIELD_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORMAT])) { + $v = $this->getFormat(); + foreach($validationRules[self::FIELD_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTENT, self::FIELD_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAT])) { + $errs[self::FIELD_FORMAT] = []; + } + $errs[self::FIELD_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php index 97469a9578..8e719051b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -179,7 +179,7 @@ class FHIRDocumentReferenceContext extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Context * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceContext Constructor @@ -571,11 +571,185 @@ public function setSourcePatientInfo(FHIRReference $sourcePatientInfo = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFacilityType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPracticeSetting())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTICE_SETTING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSourcePatientInfo())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_PATIENT_INFO] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY_TYPE])) { + $v = $this->getFacilityType(); + foreach($validationRules[self::FIELD_FACILITY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_FACILITY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY_TYPE])) { + $errs[self::FIELD_FACILITY_TYPE] = []; + } + $errs[self::FIELD_FACILITY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRACTICE_SETTING])) { + $v = $this->getPracticeSetting(); + foreach($validationRules[self::FIELD_PRACTICE_SETTING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_PRACTICE_SETTING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRACTICE_SETTING])) { + $errs[self::FIELD_PRACTICE_SETTING] = []; + } + $errs[self::FIELD_PRACTICE_SETTING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_PATIENT_INFO])) { + $v = $this->getSourcePatientInfo(); + foreach($validationRules[self::FIELD_SOURCE_PATIENT_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_CONTEXT, self::FIELD_SOURCE_PATIENT_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_PATIENT_INFO])) { + $errs[self::FIELD_SOURCE_PATIENT_INFO] = []; + } + $errs[self::FIELD_SOURCE_PATIENT_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php index fc91423d84..fede08ce92 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRDocumentReferenceRelated extends FHIRBackboneElement * Validation map for fields in type DocumentReference.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceRelated Constructor @@ -231,11 +231,96 @@ public function setRef(FHIRReference $ref = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRef())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATED, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REF])) { + $v = $this->getRef(); + foreach($validationRules[self::FIELD_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATED, self::FIELD_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REF])) { + $errs[self::FIELD_REF] = []; + } + $errs[self::FIELD_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php index 4e4e6bfb23..9172c623c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRDocumentReferenceRelatesTo extends FHIRBackboneElement * Validation map for fields in type DocumentReference.RelatesTo * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceRelatesTo Constructor @@ -239,11 +239,96 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATES_TO, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_DOT_RELATES_TO, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalance.php index 53ee6d851c..9686220e94 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -205,7 +205,7 @@ class FHIREligibilityResponseBenefitBalance extends FHIRBackboneElement * Validation map for fields in type EligibilityResponse.BenefitBalance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREligibilityResponseBenefitBalance Constructor @@ -699,11 +699,217 @@ public function setUnit(FHIRCodeableConcept $unit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExcluded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFinancial())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FINANCIAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getTerm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TERM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_BENEFIT_BALANCE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_BENEFIT_BALANCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDED])) { + $v = $this->getExcluded(); + foreach($validationRules[self::FIELD_EXCLUDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_BENEFIT_BALANCE, self::FIELD_EXCLUDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDED])) { + $errs[self::FIELD_EXCLUDED] = []; + } + $errs[self::FIELD_EXCLUDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FINANCIAL])) { + $v = $this->getFinancial(); + foreach($validationRules[self::FIELD_FINANCIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_BENEFIT_BALANCE, self::FIELD_FINANCIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FINANCIAL])) { + $errs[self::FIELD_FINANCIAL] = []; + } + $errs[self::FIELD_FINANCIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_BENEFIT_BALANCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_BENEFIT_BALANCE, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_CATEGORY])) { + $v = $this->getSubCategory(); + foreach($validationRules[self::FIELD_SUB_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_BENEFIT_BALANCE, self::FIELD_SUB_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_CATEGORY])) { + $errs[self::FIELD_SUB_CATEGORY] = []; + } + $errs[self::FIELD_SUB_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TERM])) { + $v = $this->getTerm(); + foreach($validationRules[self::FIELD_TERM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_BENEFIT_BALANCE, self::FIELD_TERM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TERM])) { + $errs[self::FIELD_TERM] = []; + } + $errs[self::FIELD_TERM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_BENEFIT_BALANCE, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseError.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseError.php index 1c6470bb31..58b8278b27 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseError.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseError.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIREligibilityResponseError extends FHIRBackboneElement * Validation map for fields in type EligibilityResponse.Error * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREligibilityResponseError Constructor @@ -182,11 +182,79 @@ public function setCode(FHIRCodeableConcept $code = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_ERROR, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancial.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancial.php index f84dee90fe..d12bf23002 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancial.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -165,7 +165,7 @@ class FHIREligibilityResponseFinancial extends FHIRBackboneElement * Validation map for fields in type EligibilityResponse.Financial * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREligibilityResponseFinancial Constructor @@ -502,11 +502,164 @@ public function setUsedUnsignedInt($usedUnsignedInt = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllowedMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllowedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllowedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsedMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USED_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USED_UNSIGNED_INT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLOWED_MONEY])) { + $v = $this->getAllowedMoney(); + foreach($validationRules[self::FIELD_ALLOWED_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_FINANCIAL, self::FIELD_ALLOWED_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_MONEY])) { + $errs[self::FIELD_ALLOWED_MONEY] = []; + } + $errs[self::FIELD_ALLOWED_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALLOWED_STRING])) { + $v = $this->getAllowedString(); + foreach($validationRules[self::FIELD_ALLOWED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_FINANCIAL, self::FIELD_ALLOWED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_STRING])) { + $errs[self::FIELD_ALLOWED_STRING] = []; + } + $errs[self::FIELD_ALLOWED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $v = $this->getAllowedUnsignedInt(); + foreach($validationRules[self::FIELD_ALLOWED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_FINANCIAL, self::FIELD_ALLOWED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $errs[self::FIELD_ALLOWED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_ALLOWED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_FINANCIAL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_MONEY])) { + $v = $this->getUsedMoney(); + foreach($validationRules[self::FIELD_USED_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_FINANCIAL, self::FIELD_USED_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_MONEY])) { + $errs[self::FIELD_USED_MONEY] = []; + } + $errs[self::FIELD_USED_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_UNSIGNED_INT])) { + $v = $this->getUsedUnsignedInt(); + foreach($validationRules[self::FIELD_USED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_FINANCIAL, self::FIELD_USED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_UNSIGNED_INT])) { + $errs[self::FIELD_USED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_USED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsurance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsurance.php index 22b1ac4314..a9c15b09ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIREligibilityResponseInsurance extends FHIRBackboneElement * Validation map for fields in type EligibilityResponse.Insurance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREligibilityResponseInsurance Constructor @@ -307,11 +307,115 @@ public function setCoverage(FHIRReference $coverage = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBenefitBalance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BENEFIT_BALANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BENEFIT_BALANCE])) { + $v = $this->getBenefitBalance(); + foreach($validationRules[self::FIELD_BENEFIT_BALANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_INSURANCE, self::FIELD_BENEFIT_BALANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFIT_BALANCE])) { + $errs[self::FIELD_BENEFIT_BALANCE] = []; + } + $errs[self::FIELD_BENEFIT_BALANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRACT])) { + $v = $this->getContract(); + foreach($validationRules[self::FIELD_CONTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_INSURANCE, self::FIELD_CONTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRACT])) { + $errs[self::FIELD_CONTRACT] = []; + } + $errs[self::FIELD_CONTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_DOT_INSURANCE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php index c53a7d1447..81302fb6cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIREncounterClassHistory extends FHIRBackboneElement * Validation map for fields in type Encounter.ClassHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterClassHistory Constructor @@ -226,11 +226,96 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_CLASS_HISTORY, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_CLASS_HISTORY, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php index 765e40f522..101a8e2411 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIREncounterDiagnosis extends FHIRBackboneElement * Validation map for fields in type Encounter.Diagnosis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterDiagnosis Constructor @@ -316,11 +316,113 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRank())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RANK] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_DIAGNOSIS, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RANK])) { + $v = $this->getRank(); + foreach($validationRules[self::FIELD_RANK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_DIAGNOSIS, self::FIELD_RANK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RANK])) { + $errs[self::FIELD_RANK] = []; + } + $errs[self::FIELD_RANK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_DIAGNOSIS, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php index 3c323e5b74..bbf02c2230 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -203,7 +203,7 @@ class FHIREncounterHospitalization extends FHIRBackboneElement * Validation map for fields in type Encounter.Hospitalization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterHospitalization Constructor @@ -706,11 +706,221 @@ public function setSpecialCourtesy(array $specialCourtesy = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdmitSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADMIT_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDietPreference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIET_PREFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDischargeDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISCHARGE_DISPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreAdmissionIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReAdmission())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RE_ADMISSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecialArrangement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_ARRANGEMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialCourtesy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIAL_COURTESY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADMIT_SOURCE])) { + $v = $this->getAdmitSource(); + foreach($validationRules[self::FIELD_ADMIT_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_ADMIT_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMIT_SOURCE])) { + $errs[self::FIELD_ADMIT_SOURCE] = []; + } + $errs[self::FIELD_ADMIT_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIET_PREFERENCE])) { + $v = $this->getDietPreference(); + foreach($validationRules[self::FIELD_DIET_PREFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DIET_PREFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIET_PREFERENCE])) { + $errs[self::FIELD_DIET_PREFERENCE] = []; + } + $errs[self::FIELD_DIET_PREFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCHARGE_DISPOSITION])) { + $v = $this->getDischargeDisposition(); + foreach($validationRules[self::FIELD_DISCHARGE_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_DISCHARGE_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCHARGE_DISPOSITION])) { + $errs[self::FIELD_DISCHARGE_DISPOSITION] = []; + } + $errs[self::FIELD_DISCHARGE_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_ADMISSION_IDENTIFIER])) { + $v = $this->getPreAdmissionIdentifier(); + foreach($validationRules[self::FIELD_PRE_ADMISSION_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_PRE_ADMISSION_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_ADMISSION_IDENTIFIER])) { + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER] = []; + } + $errs[self::FIELD_PRE_ADMISSION_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RE_ADMISSION])) { + $v = $this->getReAdmission(); + foreach($validationRules[self::FIELD_RE_ADMISSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_RE_ADMISSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RE_ADMISSION])) { + $errs[self::FIELD_RE_ADMISSION] = []; + } + $errs[self::FIELD_RE_ADMISSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_ARRANGEMENT])) { + $v = $this->getSpecialArrangement(); + foreach($validationRules[self::FIELD_SPECIAL_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_SPECIAL_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_ARRANGEMENT])) { + $errs[self::FIELD_SPECIAL_ARRANGEMENT] = []; + } + $errs[self::FIELD_SPECIAL_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIAL_COURTESY])) { + $v = $this->getSpecialCourtesy(); + foreach($validationRules[self::FIELD_SPECIAL_COURTESY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_HOSPITALIZATION, self::FIELD_SPECIAL_COURTESY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIAL_COURTESY])) { + $errs[self::FIELD_SPECIAL_COURTESY] = []; + } + $errs[self::FIELD_SPECIAL_COURTESY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php index 8cb72a2cc9..518942378d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIREncounterLocation extends FHIRBackboneElement * Validation map for fields in type Encounter.Location * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterLocation Constructor @@ -296,11 +296,113 @@ public function setStatus(FHIREncounterLocationStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_LOCATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php index 8f15ce6879..b8d0ef0218 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIREncounterParticipant extends FHIRBackboneElement * Validation map for fields in type Encounter.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterParticipant Constructor @@ -320,11 +320,115 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIndividual())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDIVIDUAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_INDIVIDUAL])) { + $v = $this->getIndividual(); + foreach($validationRules[self::FIELD_INDIVIDUAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_INDIVIDUAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDIVIDUAL])) { + $errs[self::FIELD_INDIVIDUAL] = []; + } + $errs[self::FIELD_INDIVIDUAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php index 96eaef7134..8609340037 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIREncounterStatusHistory extends FHIRBackboneElement * Validation map for fields in type Encounter.StatusHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterStatusHistory Constructor @@ -240,11 +240,96 @@ public function setStatus(FHIREncounterStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_STATUS_HISTORY, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_DOT_STATUS_HISTORY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php index f5ee816dba..3fd2d6fef2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIREpisodeOfCareDiagnosis extends FHIRBackboneElement * Validation map for fields in type EpisodeOfCare.Diagnosis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCareDiagnosis Constructor @@ -311,11 +311,113 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRank())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RANK] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_DIAGNOSIS, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RANK])) { + $v = $this->getRank(); + foreach($validationRules[self::FIELD_RANK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_DIAGNOSIS, self::FIELD_RANK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RANK])) { + $errs[self::FIELD_RANK] = []; + } + $errs[self::FIELD_RANK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_DIAGNOSIS, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php index 99d5c1e517..2c4a17c0c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIREpisodeOfCareStatusHistory extends FHIRBackboneElement * Validation map for fields in type EpisodeOfCare.StatusHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCareStatusHistory Constructor @@ -241,11 +241,96 @@ public function setStatus(FHIREpisodeOfCareStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_STATUS_HISTORY, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_DOT_STATUS_HISTORY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation.php index 8af628885b..5edbc0fe50 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRExpansionProfileDesignation extends FHIRBackboneElement * Validation map for fields in type ExpansionProfile.Designation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExpansionProfileDesignation Constructor @@ -211,11 +211,96 @@ public function setInclude(FHIRExpansionProfileInclude $include = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExclude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getInclude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INCLUDE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_DESIGNATION, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCLUDE])) { + $v = $this->getInclude(); + foreach($validationRules[self::FIELD_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_DESIGNATION, self::FIELD_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCLUDE])) { + $errs[self::FIELD_INCLUDE] = []; + } + $errs[self::FIELD_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1.php index 8e28760d1a..d16d76661a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRExpansionProfileDesignation1 extends FHIRBackboneElement * Validation map for fields in type ExpansionProfile.Designation1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExpansionProfileDesignation1 Constructor @@ -253,11 +253,96 @@ public function setUse(FHIRCoding $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_DESIGNATION_1, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_DESIGNATION_1, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2.php index 23f5458cb4..8c34329a70 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRExpansionProfileDesignation2 extends FHIRBackboneElement * Validation map for fields in type ExpansionProfile.Designation2 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExpansionProfileDesignation2 Constructor @@ -253,11 +253,96 @@ public function setUse(FHIRCoding $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_DESIGNATION_2, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_DESIGNATION_2, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExclude.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExclude.php index d02f930458..fdb6d96ea7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExclude.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRExpansionProfileExclude extends FHIRBackboneElement * Validation map for fields in type ExpansionProfile.Exclude * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExpansionProfileExclude Constructor @@ -203,11 +203,81 @@ public function setDesignation(array $designation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_EXCLUDE, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystem.php index fe802d7044..ab07187fc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRExpansionProfileExcludedSystem extends FHIRBackboneElement * Validation map for fields in type ExpansionProfile.ExcludedSystem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExpansionProfileExcludedSystem Constructor @@ -278,11 +278,96 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_EXCLUDED_SYSTEM, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_EXCLUDED_SYSTEM, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersion.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersion.php index c2514f9fa2..a3c8a64366 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersion.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRExpansionProfileFixedVersion extends FHIRBackboneElement * Validation map for fields in type ExpansionProfile.FixedVersion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExpansionProfileFixedVersion Constructor @@ -348,11 +348,113 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_FIXED_VERSION, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_FIXED_VERSION, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_FIXED_VERSION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileInclude.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileInclude.php index 28b9c76326..847001b5ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileInclude.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileInclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRExpansionProfileInclude extends FHIRBackboneElement * Validation map for fields in type ExpansionProfile.Include * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExpansionProfileInclude Constructor @@ -203,11 +203,81 @@ public function setDesignation(array $designation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE_DOT_INCLUDE, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php index 2ea2dda547..536542ed91 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRExplanationOfBenefitAccident extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Accident * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitAccident Constructor @@ -370,11 +370,130 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ACCIDENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_ADDRESS])) { + $v = $this->getLocationAddress(); + foreach($validationRules[self::FIELD_LOCATION_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ACCIDENT, self::FIELD_LOCATION_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_ADDRESS])) { + $errs[self::FIELD_LOCATION_ADDRESS] = []; + } + $errs[self::FIELD_LOCATION_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ACCIDENT, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ACCIDENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php index 73cb77e0ca..7952e00906 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -209,7 +209,7 @@ class FHIRExplanationOfBenefitAddItem extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.AddItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitAddItem Constructor @@ -847,11 +847,225 @@ public function setService(FHIRCodeableConcept $service = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FEE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSequenceLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SEQUENCE_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FEE])) { + $v = $this->getFee(); + foreach($validationRules[self::FIELD_FEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_FEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FEE])) { + $errs[self::FIELD_FEE] = []; + } + $errs[self::FIELD_FEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADD_ITEM, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php index 46baa484f7..691afd1f1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRExplanationOfBenefitAdjudication extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Adjudication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitAdjudication Constructor @@ -363,11 +363,130 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADJUDICATION, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADJUDICATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADJUDICATION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ADJUDICATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php index bc2e1a3f72..aa4af3a6c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -207,7 +207,7 @@ class FHIRExplanationOfBenefitBenefitBalance extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.BenefitBalance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitBenefitBalance Constructor @@ -704,11 +704,217 @@ public function setUnit(FHIRCodeableConcept $unit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExcluded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFinancial())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FINANCIAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUB_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getTerm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TERM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDED])) { + $v = $this->getExcluded(); + foreach($validationRules[self::FIELD_EXCLUDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_EXCLUDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDED])) { + $errs[self::FIELD_EXCLUDED] = []; + } + $errs[self::FIELD_EXCLUDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FINANCIAL])) { + $v = $this->getFinancial(); + foreach($validationRules[self::FIELD_FINANCIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_FINANCIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FINANCIAL])) { + $errs[self::FIELD_FINANCIAL] = []; + } + $errs[self::FIELD_FINANCIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_CATEGORY])) { + $v = $this->getSubCategory(); + foreach($validationRules[self::FIELD_SUB_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_SUB_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_CATEGORY])) { + $errs[self::FIELD_SUB_CATEGORY] = []; + } + $errs[self::FIELD_SUB_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TERM])) { + $v = $this->getTerm(); + foreach($validationRules[self::FIELD_TERM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_TERM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TERM])) { + $errs[self::FIELD_TERM] = []; + } + $errs[self::FIELD_TERM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_BENEFIT_BALANCE, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php index e5fb10ae8c..98d5121b29 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRExplanationOfBenefitCareTeam extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.CareTeam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitCareTeam Constructor @@ -435,11 +435,147 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQualification())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUALIFICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_CARE_TEAM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFICATION])) { + $v = $this->getQualification(); + foreach($validationRules[self::FIELD_QUALIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_CARE_TEAM, self::FIELD_QUALIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFICATION])) { + $errs[self::FIELD_QUALIFICATION] = []; + } + $errs[self::FIELD_QUALIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_CARE_TEAM, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_CARE_TEAM, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_CARE_TEAM, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php index e55ee86cf1..4fa64aafe5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -297,7 +297,7 @@ class FHIRExplanationOfBenefitDetail extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitDetail Constructor @@ -1240,11 +1240,329 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_DETAIL])) { + $v = $this->getSubDetail(); + foreach($validationRules[self::FIELD_SUB_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_SUB_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_DETAIL])) { + $errs[self::FIELD_SUB_DETAIL] = []; + } + $errs[self::FIELD_SUB_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php index 5c158d8f64..30f5976d5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -182,7 +182,7 @@ class FHIRExplanationOfBenefitDetail1 extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Detail1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitDetail1 Constructor @@ -640,11 +640,187 @@ public function setService(FHIRCodeableConcept $service = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FEE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FEE])) { + $v = $this->getFee(); + foreach($validationRules[self::FIELD_FEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_FEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FEE])) { + $errs[self::FIELD_FEE] = []; + } + $errs[self::FIELD_FEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DETAIL_1, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php index 15bdbeb81f..1beac7307f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRExplanationOfBenefitDiagnosis extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Diagnosis * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitDiagnosis Constructor @@ -454,11 +454,149 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiagnosisCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosisReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSIS_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPackageCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PACKAGE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT])) { + $v = $this->getDiagnosisCodeableConcept(); + foreach($validationRules[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DIAGNOSIS_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_REFERENCE])) { + $v = $this->getDiagnosisReference(); + foreach($validationRules[self::FIELD_DIAGNOSIS_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_DIAGNOSIS_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_REFERENCE])) { + $errs[self::FIELD_DIAGNOSIS_REFERENCE] = []; + } + $errs[self::FIELD_DIAGNOSIS_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE_CODE])) { + $v = $this->getPackageCode(); + foreach($validationRules[self::FIELD_PACKAGE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_PACKAGE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE_CODE])) { + $errs[self::FIELD_PACKAGE_CODE] = []; + } + $errs[self::FIELD_PACKAGE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_DIAGNOSIS, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php index d80e35cef0..d4e37bd327 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -166,7 +166,7 @@ class FHIRExplanationOfBenefitFinancial extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Financial * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitFinancial Constructor @@ -503,11 +503,164 @@ public function setUsedUnsignedInt($usedUnsignedInt = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllowedMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllowedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllowedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsedMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USED_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USED_UNSIGNED_INT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLOWED_MONEY])) { + $v = $this->getAllowedMoney(); + foreach($validationRules[self::FIELD_ALLOWED_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_ALLOWED_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_MONEY])) { + $errs[self::FIELD_ALLOWED_MONEY] = []; + } + $errs[self::FIELD_ALLOWED_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALLOWED_STRING])) { + $v = $this->getAllowedString(); + foreach($validationRules[self::FIELD_ALLOWED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_ALLOWED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_STRING])) { + $errs[self::FIELD_ALLOWED_STRING] = []; + } + $errs[self::FIELD_ALLOWED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $v = $this->getAllowedUnsignedInt(); + foreach($validationRules[self::FIELD_ALLOWED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_ALLOWED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $errs[self::FIELD_ALLOWED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_ALLOWED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_MONEY])) { + $v = $this->getUsedMoney(); + foreach($validationRules[self::FIELD_USED_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_USED_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_MONEY])) { + $errs[self::FIELD_USED_MONEY] = []; + } + $errs[self::FIELD_USED_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_UNSIGNED_INT])) { + $v = $this->getUsedUnsignedInt(); + foreach($validationRules[self::FIELD_USED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_FINANCIAL, self::FIELD_USED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_UNSIGNED_INT])) { + $errs[self::FIELD_USED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_USED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformation.php index ba601f08f9..442d7a8185 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -231,7 +231,7 @@ class FHIRExplanationOfBenefitInformation extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Information * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitInformation Constructor @@ -740,11 +740,232 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INFORMATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INFORMATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INFORMATION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INFORMATION, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE])) { + $v = $this->getTimingDate(); + foreach($validationRules[self::FIELD_TIMING_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INFORMATION, self::FIELD_TIMING_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE])) { + $errs[self::FIELD_TIMING_DATE] = []; + } + $errs[self::FIELD_TIMING_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INFORMATION, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INFORMATION, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INFORMATION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INFORMATION, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INFORMATION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php index 6a1b185114..e047bfc2ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRExplanationOfBenefitInsurance extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Insurance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitInsurance Constructor @@ -293,11 +293,98 @@ public function setPreAuthRef(array $preAuthRef = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPreAuthRef())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRE_AUTH_REF, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INSURANCE, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRE_AUTH_REF])) { + $v = $this->getPreAuthRef(); + foreach($validationRules[self::FIELD_PRE_AUTH_REF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_INSURANCE, self::FIELD_PRE_AUTH_REF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRE_AUTH_REF])) { + $errs[self::FIELD_PRE_AUTH_REF] = []; + } + $errs[self::FIELD_PRE_AUTH_REF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php index 7a1baa20f6..5a0d2b8fab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -447,7 +447,7 @@ class FHIRExplanationOfBenefitItem extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitItem Constructor @@ -2177,11 +2177,528 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareTeamLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDiagnosisLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS_LINK_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEncounter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENCOUNTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInformationLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INFORMATION_LINK_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocationAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProcedureLinkId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE_LINK_ID, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubSite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_SITE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM_LINK_ID])) { + $v = $this->getCareTeamLinkId(); + foreach($validationRules[self::FIELD_CARE_TEAM_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_CARE_TEAM_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM_LINK_ID])) { + $errs[self::FIELD_CARE_TEAM_LINK_ID] = []; + } + $errs[self::FIELD_CARE_TEAM_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS_LINK_ID])) { + $v = $this->getDiagnosisLinkId(); + foreach($validationRules[self::FIELD_DIAGNOSIS_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_DIAGNOSIS_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS_LINK_ID])) { + $errs[self::FIELD_DIAGNOSIS_LINK_ID] = []; + } + $errs[self::FIELD_DIAGNOSIS_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORMATION_LINK_ID])) { + $v = $this->getInformationLinkId(); + foreach($validationRules[self::FIELD_INFORMATION_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_INFORMATION_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORMATION_LINK_ID])) { + $errs[self::FIELD_INFORMATION_LINK_ID] = []; + } + $errs[self::FIELD_INFORMATION_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_ADDRESS])) { + $v = $this->getLocationAddress(); + foreach($validationRules[self::FIELD_LOCATION_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_LOCATION_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_ADDRESS])) { + $errs[self::FIELD_LOCATION_ADDRESS] = []; + } + $errs[self::FIELD_LOCATION_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $v = $this->getLocationCodeableConcept(); + foreach($validationRules[self::FIELD_LOCATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_LOCATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_LOCATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION_REFERENCE])) { + $v = $this->getLocationReference(); + foreach($validationRules[self::FIELD_LOCATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_LOCATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION_REFERENCE])) { + $errs[self::FIELD_LOCATION_REFERENCE] = []; + } + $errs[self::FIELD_LOCATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_LINK_ID])) { + $v = $this->getProcedureLinkId(); + foreach($validationRules[self::FIELD_PROCEDURE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_PROCEDURE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_LINK_ID])) { + $errs[self::FIELD_PROCEDURE_LINK_ID] = []; + } + $errs[self::FIELD_PROCEDURE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_DATE])) { + $v = $this->getServicedDate(); + foreach($validationRules[self::FIELD_SERVICED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_SERVICED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_DATE])) { + $errs[self::FIELD_SERVICED_DATE] = []; + } + $errs[self::FIELD_SERVICED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_PERIOD])) { + $v = $this->getServicedPeriod(); + foreach($validationRules[self::FIELD_SERVICED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_SERVICED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_PERIOD])) { + $errs[self::FIELD_SERVICED_PERIOD] = []; + } + $errs[self::FIELD_SERVICED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_SITE])) { + $v = $this->getSubSite(); + foreach($validationRules[self::FIELD_SUB_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_SUB_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_SITE])) { + $errs[self::FIELD_SUB_SITE] = []; + } + $errs[self::FIELD_SUB_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_ITEM, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php index 8baaab629a..b33f71d07c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRExplanationOfBenefitPayee extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Payee * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitPayee Constructor @@ -282,11 +282,113 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getParty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getResourceType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARTY])) { + $v = $this->getParty(); + foreach($validationRules[self::FIELD_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYEE, self::FIELD_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTY])) { + $errs[self::FIELD_PARTY] = []; + } + $errs[self::FIELD_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE_TYPE])) { + $v = $this->getResourceType(); + foreach($validationRules[self::FIELD_RESOURCE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYEE, self::FIELD_RESOURCE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE_TYPE])) { + $errs[self::FIELD_RESOURCE_TYPE] = []; + } + $errs[self::FIELD_RESOURCE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYEE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php index 476e5afa4a..bd2af5d0f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -167,7 +167,7 @@ class FHIRExplanationOfBenefitPayment extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Payment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitPayment Constructor @@ -462,11 +462,164 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdjustment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADJUSTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdjustmentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADJUSTMENT_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUSTMENT])) { + $v = $this->getAdjustment(); + foreach($validationRules[self::FIELD_ADJUSTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_ADJUSTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUSTMENT])) { + $errs[self::FIELD_ADJUSTMENT] = []; + } + $errs[self::FIELD_ADJUSTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADJUSTMENT_REASON])) { + $v = $this->getAdjustmentReason(); + foreach($validationRules[self::FIELD_ADJUSTMENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_ADJUSTMENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUSTMENT_REASON])) { + $errs[self::FIELD_ADJUSTMENT_REASON] = []; + } + $errs[self::FIELD_ADJUSTMENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PAYMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php index 5043a31770..10717bc5c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRExplanationOfBenefitProcedure extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Procedure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitProcedure Constructor @@ -389,11 +389,130 @@ public function setSequence($sequence = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedureCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedureReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCEDURE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { + $v = $this->getProcedureCodeableConcept(); + foreach($validationRules[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCEDURE, self::FIELD_PROCEDURE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PROCEDURE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_REFERENCE])) { + $v = $this->getProcedureReference(); + foreach($validationRules[self::FIELD_PROCEDURE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCEDURE, self::FIELD_PROCEDURE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_REFERENCE])) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = []; + } + $errs[self::FIELD_PROCEDURE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCEDURE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php index 634615611d..87ac335251 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRExplanationOfBenefitProcessNote extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.ProcessNote * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitProcessNote Constructor @@ -394,11 +394,130 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCESS_NOTE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCESS_NOTE, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCESS_NOTE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_PROCESS_NOTE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php index 10ebb4e7fa..0ef0848520 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRExplanationOfBenefitRelated extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitRelated Constructor @@ -289,11 +289,113 @@ public function setRelationship(FHIRCodeableConcept $relationship = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getClaim())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CLAIM])) { + $v = $this->getClaim(); + foreach($validationRules[self::FIELD_CLAIM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_RELATED, self::FIELD_CLAIM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM])) { + $errs[self::FIELD_CLAIM] = []; + } + $errs[self::FIELD_CLAIM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_RELATED, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_RELATED, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php index 5429c43577..ba7fd244dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -282,7 +282,7 @@ class FHIRExplanationOfBenefitSubDetail extends FHIRBackboneElement * Validation map for fields in type ExplanationOfBenefit.SubDetail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitSubDetail Constructor @@ -1145,11 +1145,310 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdjudication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADJUDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNoteNumber())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE_NUMBER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProgramCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRevenue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REVENUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUdi())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UDI, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUnitPrice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT_PRICE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADJUDICATION])) { + $v = $this->getAdjudication(); + foreach($validationRules[self::FIELD_ADJUDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_ADJUDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADJUDICATION])) { + $errs[self::FIELD_ADJUDICATION] = []; + } + $errs[self::FIELD_ADJUDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NET])) { + $v = $this->getNet(); + foreach($validationRules[self::FIELD_NET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_NET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NET])) { + $errs[self::FIELD_NET] = []; + } + $errs[self::FIELD_NET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE_NUMBER])) { + $v = $this->getNoteNumber(); + foreach($validationRules[self::FIELD_NOTE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_NOTE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE_NUMBER])) { + $errs[self::FIELD_NOTE_NUMBER] = []; + } + $errs[self::FIELD_NOTE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_CODE])) { + $v = $this->getProgramCode(); + foreach($validationRules[self::FIELD_PROGRAM_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_PROGRAM_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_CODE])) { + $errs[self::FIELD_PROGRAM_CODE] = []; + } + $errs[self::FIELD_PROGRAM_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REVENUE])) { + $v = $this->getRevenue(); + foreach($validationRules[self::FIELD_REVENUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_REVENUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REVENUE])) { + $errs[self::FIELD_REVENUE] = []; + } + $errs[self::FIELD_REVENUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT_PRICE])) { + $v = $this->getUnitPrice(); + foreach($validationRules[self::FIELD_UNIT_PRICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_DOT_SUB_DETAIL, self::FIELD_UNIT_PRICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT_PRICE])) { + $errs[self::FIELD_UNIT_PRICE] = []; + } + $errs[self::FIELD_UNIT_PRICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php index 118b2abd7b..8bb6b2f9e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -190,7 +190,7 @@ class FHIRFamilyMemberHistoryCondition extends FHIRBackboneElement * Validation map for fields in type FamilyMemberHistory.Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyMemberHistoryCondition Constructor @@ -580,11 +580,183 @@ public function setOutcome(FHIRCodeableConcept $outcome = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOnsetAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_AGE])) { + $v = $this->getOnsetAge(); + foreach($validationRules[self::FIELD_ONSET_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_AGE])) { + $errs[self::FIELD_ONSET_AGE] = []; + } + $errs[self::FIELD_ONSET_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_PERIOD])) { + $v = $this->getOnsetPeriod(); + foreach($validationRules[self::FIELD_ONSET_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_PERIOD])) { + $errs[self::FIELD_ONSET_PERIOD] = []; + } + $errs[self::FIELD_ONSET_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_RANGE])) { + $v = $this->getOnsetRange(); + foreach($validationRules[self::FIELD_ONSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_RANGE])) { + $errs[self::FIELD_ONSET_RANGE] = []; + } + $errs[self::FIELD_ONSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_STRING])) { + $v = $this->getOnsetString(); + foreach($validationRules[self::FIELD_ONSET_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_ONSET_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_STRING])) { + $errs[self::FIELD_ONSET_STRING] = []; + } + $errs[self::FIELD_ONSET_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY_DOT_CONDITION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php index 3ddabef8e5..b1b0607d89 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -187,7 +187,7 @@ class FHIRGoalTarget extends FHIRBackboneElement * Validation map for fields in type Goal.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGoalTarget Constructor @@ -520,11 +520,164 @@ public function setMeasure(FHIRCodeableConcept $measure = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetailCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAIL_CODEABLE_CONCEPT])) { + $v = $this->getDetailCodeableConcept(); + foreach($validationRules[self::FIELD_DETAIL_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DETAIL_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_QUANTITY])) { + $v = $this->getDetailQuantity(); + foreach($validationRules[self::FIELD_DETAIL_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DETAIL_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_QUANTITY])) { + $errs[self::FIELD_DETAIL_QUANTITY] = []; + } + $errs[self::FIELD_DETAIL_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_RANGE])) { + $v = $this->getDetailRange(); + foreach($validationRules[self::FIELD_DETAIL_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DETAIL_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_RANGE])) { + $errs[self::FIELD_DETAIL_RANGE] = []; + } + $errs[self::FIELD_DETAIL_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DUE_DATE])) { + $v = $this->getDueDate(); + foreach($validationRules[self::FIELD_DUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DUE_DATE])) { + $errs[self::FIELD_DUE_DATE] = []; + } + $errs[self::FIELD_DUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DUE_DURATION])) { + $v = $this->getDueDuration(); + foreach($validationRules[self::FIELD_DUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_DUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DUE_DURATION])) { + $errs[self::FIELD_DUE_DURATION] = []; + } + $errs[self::FIELD_DUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASURE])) { + $v = $this->getMeasure(); + foreach($validationRules[self::FIELD_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_DOT_TARGET, self::FIELD_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASURE])) { + $errs[self::FIELD_MEASURE] = []; + } + $errs[self::FIELD_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php index c5a383e5fb..a653b40a3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRGraphDefinitionCompartment extends FHIRBackboneElement * Validation map for fields in type GraphDefinition.Compartment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGraphDefinitionCompartment Constructor @@ -404,11 +404,130 @@ public function setRule(FHIRGraphCompartmentRule $rule = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_COMPARTMENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_COMPARTMENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_COMPARTMENT, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_COMPARTMENT, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php index 410b493b06..ae9dc3cd51 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -165,7 +165,7 @@ class FHIRGraphDefinitionLink extends FHIRBackboneElement * Validation map for fields in type GraphDefinition.Link * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_TARGET => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -589,11 +589,166 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getSliceName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLICE_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLICE_NAME])) { + $v = $this->getSliceName(); + foreach($validationRules[self::FIELD_SLICE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_SLICE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLICE_NAME])) { + $errs[self::FIELD_SLICE_NAME] = []; + } + $errs[self::FIELD_SLICE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_LINK, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php index fcb8ed227d..130a7a4b07 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRGraphDefinitionTarget extends FHIRBackboneElement * Validation map for fields in type GraphDefinition.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGraphDefinitionTarget Constructor @@ -438,11 +438,134 @@ public function setType(FHIRResourceType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCompartment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPARTMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPARTMENT])) { + $v = $this->getCompartment(); + foreach($validationRules[self::FIELD_COMPARTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_TARGET, self::FIELD_COMPARTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARTMENT])) { + $errs[self::FIELD_COMPARTMENT] = []; + } + $errs[self::FIELD_COMPARTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_TARGET, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_TARGET, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION_DOT_TARGET, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php index 7942a8a722..7e7e587ef6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -185,7 +185,7 @@ class FHIRGroupCharacteristic extends FHIRBackboneElement * Validation map for fields in type Group.Characteristic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupCharacteristic Constructor @@ -549,11 +549,181 @@ public function setValueRange(FHIRRange $valueRange = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExclude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_CHARACTERISTIC, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php index 80f90d64f0..be6fc84419 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRGroupMember extends FHIRBackboneElement * Validation map for fields in type Group.Member * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupMember Constructor @@ -305,11 +305,113 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEntity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getInactive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_MEMBER, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INACTIVE])) { + $v = $this->getInactive(); + foreach($validationRules[self::FIELD_INACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_MEMBER, self::FIELD_INACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INACTIVE])) { + $errs[self::FIELD_INACTIVE] = []; + } + $errs[self::FIELD_INACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_DOT_MEMBER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php index ac78917479..01fb5d7a95 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRHealthcareServiceAvailableTime extends FHIRBackboneElement * Validation map for fields in type HealthcareService.AvailableTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareServiceAvailableTime Constructor @@ -450,11 +450,132 @@ public function setDaysOfWeek(array $daysOfWeek = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllDay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALL_DAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailableEndTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABLE_END_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailableStartTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABLE_START_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDaysOfWeek())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DAYS_OF_WEEK, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALL_DAY])) { + $v = $this->getAllDay(); + foreach($validationRules[self::FIELD_ALL_DAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_ALL_DAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALL_DAY])) { + $errs[self::FIELD_ALL_DAY] = []; + } + $errs[self::FIELD_ALL_DAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_END_TIME])) { + $v = $this->getAvailableEndTime(); + foreach($validationRules[self::FIELD_AVAILABLE_END_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_AVAILABLE_END_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_END_TIME])) { + $errs[self::FIELD_AVAILABLE_END_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_END_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_START_TIME])) { + $v = $this->getAvailableStartTime(); + foreach($validationRules[self::FIELD_AVAILABLE_START_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_AVAILABLE_START_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_START_TIME])) { + $errs[self::FIELD_AVAILABLE_START_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_START_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAYS_OF_WEEK])) { + $v = $this->getDaysOfWeek(); + foreach($validationRules[self::FIELD_DAYS_OF_WEEK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_AVAILABLE_TIME, self::FIELD_DAYS_OF_WEEK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAYS_OF_WEEK])) { + $errs[self::FIELD_DAYS_OF_WEEK] = []; + } + $errs[self::FIELD_DAYS_OF_WEEK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php index 31ccd9f304..93245e9c88 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRHealthcareServiceNotAvailable extends FHIRBackboneElement * Validation map for fields in type HealthcareService.NotAvailable * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareServiceNotAvailable Constructor @@ -253,11 +253,96 @@ public function setDuring(FHIRPeriod $during = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuring())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_NOT_AVAILABLE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURING])) { + $v = $this->getDuring(); + foreach($validationRules[self::FIELD_DURING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE_DOT_NOT_AVAILABLE, self::FIELD_DURING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURING])) { + $errs[self::FIELD_DURING] = []; + } + $errs[self::FIELD_DURING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstance.php index 688c5a485f..d0010471c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRImagingManifestInstance extends FHIRBackboneElement * Validation map for fields in type ImagingManifest.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingManifestInstance Constructor @@ -281,11 +281,96 @@ public function setUid($uid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSopClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOP_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SOP_CLASS])) { + $v = $this->getSopClass(); + foreach($validationRules[self::FIELD_SOP_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST_DOT_INSTANCE, self::FIELD_SOP_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOP_CLASS])) { + $errs[self::FIELD_SOP_CLASS] = []; + } + $errs[self::FIELD_SOP_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST_DOT_INSTANCE, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeries.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeries.php index c5313b21f8..8e9efbabf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeries.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRImagingManifestSeries extends FHIRBackboneElement * Validation map for fields in type ImagingManifest.Series * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INSTANCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -389,11 +389,117 @@ public function setUid($uid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST_DOT_SERIES, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST_DOT_SERIES, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST_DOT_SERIES, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudy.php index a11908ff59..900859d3ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRImagingManifestStudy extends FHIRBackboneElement * Validation map for fields in type ImagingManifest.Study * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_SERIES => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -442,11 +442,134 @@ public function setUid($uid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getImagingStudy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMAGING_STUDY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSeries())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERIES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST_DOT_STUDY, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGING_STUDY])) { + $v = $this->getImagingStudy(); + foreach($validationRules[self::FIELD_IMAGING_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST_DOT_STUDY, self::FIELD_IMAGING_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGING_STUDY])) { + $errs[self::FIELD_IMAGING_STUDY] = []; + } + $errs[self::FIELD_IMAGING_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST_DOT_STUDY, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST_DOT_STUDY, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php index 8db36b1601..0fa4983b64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRImagingStudyInstance extends FHIRBackboneElement * Validation map for fields in type ImagingStudy.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudyInstance Constructor @@ -434,11 +434,130 @@ public function setUid($uid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSopClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOP_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOP_CLASS])) { + $v = $this->getSopClass(); + foreach($validationRules[self::FIELD_SOP_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_SOP_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOP_CLASS])) { + $errs[self::FIELD_SOP_CLASS] = []; + } + $errs[self::FIELD_SOP_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_INSTANCE, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php index f42d49a952..4e3b9813a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -265,7 +265,7 @@ class FHIRImagingStudySeries extends FHIRBackboneElement * Validation map for fields in type ImagingStudy.Series * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudySeries Constructor @@ -1045,11 +1045,272 @@ public function setUid($uid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAvailability())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLaterality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LATERALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getModality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfInstances())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStarted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STARTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY])) { + $v = $this->getAvailability(); + foreach($validationRules[self::FIELD_AVAILABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_AVAILABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY])) { + $errs[self::FIELD_AVAILABILITY] = []; + } + $errs[self::FIELD_AVAILABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LATERALITY])) { + $v = $this->getLaterality(); + foreach($validationRules[self::FIELD_LATERALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_LATERALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LATERALITY])) { + $errs[self::FIELD_LATERALITY] = []; + } + $errs[self::FIELD_LATERALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODALITY])) { + $v = $this->getModality(); + foreach($validationRules[self::FIELD_MODALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_MODALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODALITY])) { + $errs[self::FIELD_MODALITY] = []; + } + $errs[self::FIELD_MODALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER])) { + $v = $this->getNumber(); + foreach($validationRules[self::FIELD_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER])) { + $errs[self::FIELD_NUMBER] = []; + } + $errs[self::FIELD_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_INSTANCES])) { + $v = $this->getNumberOfInstances(); + foreach($validationRules[self::FIELD_NUMBER_OF_INSTANCES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_NUMBER_OF_INSTANCES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_INSTANCES])) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = []; + } + $errs[self::FIELD_NUMBER_OF_INSTANCES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STARTED])) { + $v = $this->getStarted(); + foreach($validationRules[self::FIELD_STARTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_STARTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STARTED])) { + $errs[self::FIELD_STARTED] = []; + } + $errs[self::FIELD_STARTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_DOT_SERIES, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php index 680ff486ca..6555c90977 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRImmunizationExplanation extends FHIRBackboneElement * Validation map for fields in type Immunization.Explanation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationExplanation Constructor @@ -308,11 +308,100 @@ public function setReasonNotGiven(array $reasonNotGiven = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonNotGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_NOT_GIVEN, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_EXPLANATION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_NOT_GIVEN])) { + $v = $this->getReasonNotGiven(); + foreach($validationRules[self::FIELD_REASON_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_EXPLANATION, self::FIELD_REASON_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_NOT_GIVEN])) { + $errs[self::FIELD_REASON_NOT_GIVEN] = []; + } + $errs[self::FIELD_REASON_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitioner.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitioner.php index 0ebab69e8e..1bdbe5a8a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitioner.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitioner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRImmunizationPractitioner extends FHIRBackboneElement * Validation map for fields in type Immunization.Practitioner * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationPractitioner Constructor @@ -233,11 +233,96 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PRACTITIONER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_PRACTITIONER, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php index 846d95bae2..e85b26d42b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRImmunizationReaction extends FHIRBackboneElement * Validation map for fields in type Immunization.Reaction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationReaction Constructor @@ -333,11 +333,113 @@ public function setReported($reported = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getReported())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTED])) { + $v = $this->getReported(); + foreach($validationRules[self::FIELD_REPORTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_REACTION, self::FIELD_REPORTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTED])) { + $errs[self::FIELD_REPORTED] = []; + } + $errs[self::FIELD_REPORTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php index 2238158d52..a9a6de09e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -196,7 +196,7 @@ class FHIRImmunizationVaccinationProtocol extends FHIRBackboneElement * Validation map for fields in type Immunization.VaccinationProtocol * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_TARGET_DISEASE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -683,11 +683,200 @@ public function setTargetDisease(array $targetDisease = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeriesDoses())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES_DOSES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTargetDisease())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET_DISEASE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_SEQUENCE])) { + $v = $this->getDoseSequence(); + foreach($validationRules[self::FIELD_DOSE_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DOSE_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_SEQUENCE])) { + $errs[self::FIELD_DOSE_SEQUENCE] = []; + } + $errs[self::FIELD_DOSE_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_STATUS])) { + $v = $this->getDoseStatus(); + foreach($validationRules[self::FIELD_DOSE_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DOSE_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_STATUS])) { + $errs[self::FIELD_DOSE_STATUS] = []; + } + $errs[self::FIELD_DOSE_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_STATUS_REASON])) { + $v = $this->getDoseStatusReason(); + foreach($validationRules[self::FIELD_DOSE_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_DOSE_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_STATUS_REASON])) { + $errs[self::FIELD_DOSE_STATUS_REASON] = []; + } + $errs[self::FIELD_DOSE_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES_DOSES])) { + $v = $this->getSeriesDoses(); + foreach($validationRules[self::FIELD_SERIES_DOSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_SERIES_DOSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES_DOSES])) { + $errs[self::FIELD_SERIES_DOSES] = []; + } + $errs[self::FIELD_SERIES_DOSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_DISEASE])) { + $v = $this->getTargetDisease(); + foreach($validationRules[self::FIELD_TARGET_DISEASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_DOT_VACCINATION_PROTOCOL, self::FIELD_TARGET_DISEASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_DISEASE])) { + $errs[self::FIELD_TARGET_DISEASE] = []; + } + $errs[self::FIELD_TARGET_DISEASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php index 6956cfb49f..03739f3787 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRImmunizationRecommendationDateCriterion extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.DateCriterion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationDateCriterion Constructor @@ -267,11 +267,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_DATE_CRITERION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_DATE_CRITERION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php index 98902675c1..77be0d0ea1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRImmunizationRecommendationProtocol extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.Protocol * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationProtocol Constructor @@ -410,11 +410,130 @@ public function setSeries($series = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_SEQUENCE])) { + $v = $this->getDoseSequence(); + foreach($validationRules[self::FIELD_DOSE_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_DOSE_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_SEQUENCE])) { + $errs[self::FIELD_DOSE_SEQUENCE] = []; + } + $errs[self::FIELD_DOSE_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_PROTOCOL, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php index d1f80b7629..b5fc86a5c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -209,7 +209,7 @@ class FHIRImmunizationRecommendationRecommendation extends FHIRBackboneElement * Validation map for fields in type ImmunizationRecommendation.Recommendation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationRecommendationRecommendation Constructor @@ -762,11 +762,221 @@ public function setVaccineCode(FHIRCodeableConcept $vaccineCode = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDateCriterion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATE_CRITERION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDoseNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getForecastStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORECAST_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProtocol())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROTOCOL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingImmunization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_IMMUNIZATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSupportingPatientInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_PATIENT_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTargetDisease())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_DISEASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVaccineCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VACCINE_CODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_CRITERION])) { + $v = $this->getDateCriterion(); + foreach($validationRules[self::FIELD_DATE_CRITERION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DATE_CRITERION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_CRITERION])) { + $errs[self::FIELD_DATE_CRITERION] = []; + } + $errs[self::FIELD_DATE_CRITERION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_NUMBER])) { + $v = $this->getDoseNumber(); + foreach($validationRules[self::FIELD_DOSE_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_DOSE_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_NUMBER])) { + $errs[self::FIELD_DOSE_NUMBER] = []; + } + $errs[self::FIELD_DOSE_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORECAST_STATUS])) { + $v = $this->getForecastStatus(); + foreach($validationRules[self::FIELD_FORECAST_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_FORECAST_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORECAST_STATUS])) { + $errs[self::FIELD_FORECAST_STATUS] = []; + } + $errs[self::FIELD_FORECAST_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_IMMUNIZATION])) { + $v = $this->getSupportingImmunization(); + foreach($validationRules[self::FIELD_SUPPORTING_IMMUNIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SUPPORTING_IMMUNIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_IMMUNIZATION])) { + $errs[self::FIELD_SUPPORTING_IMMUNIZATION] = []; + } + $errs[self::FIELD_SUPPORTING_IMMUNIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_PATIENT_INFORMATION])) { + $v = $this->getSupportingPatientInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_PATIENT_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_SUPPORTING_PATIENT_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_PATIENT_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_DISEASE])) { + $v = $this->getTargetDisease(); + foreach($validationRules[self::FIELD_TARGET_DISEASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_TARGET_DISEASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_DISEASE])) { + $errs[self::FIELD_TARGET_DISEASE] = []; + } + $errs[self::FIELD_TARGET_DISEASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINE_CODE])) { + $v = $this->getVaccineCode(); + foreach($validationRules[self::FIELD_VACCINE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION_DOT_RECOMMENDATION, self::FIELD_VACCINE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINE_CODE])) { + $errs[self::FIELD_VACCINE_CODE] = []; + } + $errs[self::FIELD_VACCINE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php index 5c2bfd9bf1..5103dfaa72 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRImplementationGuideDependency extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Dependency * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideDependency Constructor @@ -266,11 +266,96 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEPENDENCY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_DEPENDENCY, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php index a76513371e..b075a6bad8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRImplementationGuideGlobal extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Global * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideGlobal Constructor @@ -241,11 +241,96 @@ public function setType(FHIRResourceType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_GLOBAL, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_GLOBAL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php index b08c5904f4..db59fdb491 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRImplementationGuidePackage extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Package * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RESOURCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -378,11 +378,115 @@ public function setResource(array $resource = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PACKAGE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PACKAGE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PACKAGE, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php index 4faa67318d..c1b8cf59d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -184,7 +184,7 @@ class FHIRImplementationGuidePage extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Page * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuidePage Constructor @@ -737,11 +737,187 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFormat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORMAT] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPackage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PACKAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_FORMAT])) { + $v = $this->getFormat(); + foreach($validationRules[self::FIELD_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAT])) { + $errs[self::FIELD_FORMAT] = []; + } + $errs[self::FIELD_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE])) { + $v = $this->getPackage(); + foreach($validationRules[self::FIELD_PACKAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_PACKAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE])) { + $errs[self::FIELD_PACKAGE] = []; + } + $errs[self::FIELD_PACKAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAGE])) { + $v = $this->getPage(); + foreach($validationRules[self::FIELD_PAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_PAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAGE])) { + $errs[self::FIELD_PAGE] = []; + } + $errs[self::FIELD_PAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_PAGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php index e8a3adc121..66085bc7d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -184,7 +184,7 @@ class FHIRImplementationGuideResource extends FHIRBackboneElement * Validation map for fields in type ImplementationGuide.Resource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuideResource Constructor @@ -614,11 +614,181 @@ public function setSourceUri($sourceUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAcronym())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACRONYM] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExample())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExampleFor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXAMPLE_FOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACRONYM])) { + $v = $this->getAcronym(); + foreach($validationRules[self::FIELD_ACRONYM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_ACRONYM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACRONYM])) { + $errs[self::FIELD_ACRONYM] = []; + } + $errs[self::FIELD_ACRONYM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE])) { + $v = $this->getExample(); + foreach($validationRules[self::FIELD_EXAMPLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_EXAMPLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE])) { + $errs[self::FIELD_EXAMPLE] = []; + } + $errs[self::FIELD_EXAMPLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE_FOR])) { + $v = $this->getExampleFor(); + foreach($validationRules[self::FIELD_EXAMPLE_FOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_EXAMPLE_FOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE_FOR])) { + $errs[self::FIELD_EXAMPLE_FOR] = []; + } + $errs[self::FIELD_EXAMPLE_FOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_REFERENCE])) { + $v = $this->getSourceReference(); + foreach($validationRules[self::FIELD_SOURCE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_SOURCE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_REFERENCE])) { + $errs[self::FIELD_SOURCE_REFERENCE] = []; + } + $errs[self::FIELD_SOURCE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_URI])) { + $v = $this->getSourceUri(); + foreach($validationRules[self::FIELD_SOURCE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE_DOT_RESOURCE, self::FIELD_SOURCE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_URI])) { + $errs[self::FIELD_SOURCE_URI] = []; + } + $errs[self::FIELD_SOURCE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php index ae4575ca0b..b0db87cf3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRLinkageItem extends FHIRBackboneElement * Validation map for fields in type Linkage.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLinkageItem Constructor @@ -246,11 +246,96 @@ public function setType(FHIRLinkageType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE_DOT_ITEM, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE_DOT_ITEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php index 8c4fa3d5d2..39fe87f28e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRListEntry extends FHIRBackboneElement * Validation map for fields in type List.Entry * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListEntry Constructor @@ -387,11 +387,130 @@ public function setItem(FHIRReference $item = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeleted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DELETED] = $fieldErrs; + } + } + if (null !== ($v = $this->getFlag())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FLAG] = $fieldErrs; + } + } + if (null !== ($v = $this->getItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DELETED])) { + $v = $this->getDeleted(); + foreach($validationRules[self::FIELD_DELETED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_DELETED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DELETED])) { + $errs[self::FIELD_DELETED] = []; + } + $errs[self::FIELD_DELETED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FLAG])) { + $v = $this->getFlag(); + foreach($validationRules[self::FIELD_FLAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_FLAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FLAG])) { + $errs[self::FIELD_FLAG] = []; + } + $errs[self::FIELD_FLAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_DOT_ENTRY, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php index 8e0221fed4..8f241b764f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRLocationPosition extends FHIRBackboneElement * Validation map for fields in type Location.Position * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationPosition Constructor @@ -368,11 +368,113 @@ public function setLongitude($longitude = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAltitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALTITUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLatitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LATITUDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLongitude())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LONGITUDE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALTITUDE])) { + $v = $this->getAltitude(); + foreach($validationRules[self::FIELD_ALTITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_ALTITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALTITUDE])) { + $errs[self::FIELD_ALTITUDE] = []; + } + $errs[self::FIELD_ALTITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LATITUDE])) { + $v = $this->getLatitude(); + foreach($validationRules[self::FIELD_LATITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_LATITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LATITUDE])) { + $errs[self::FIELD_LATITUDE] = []; + } + $errs[self::FIELD_LATITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LONGITUDE])) { + $v = $this->getLongitude(); + foreach($validationRules[self::FIELD_LONGITUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_DOT_POSITION, self::FIELD_LONGITUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LONGITUDE])) { + $errs[self::FIELD_LONGITUDE] = []; + } + $errs[self::FIELD_LONGITUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php index c2722dde06..b3697eae41 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRMeasureGroup extends FHIRBackboneElement * Validation map for fields in type Measure.Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureGroup Constructor @@ -491,11 +491,151 @@ public function setStratifier(array $stratifier = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPopulation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POPULATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getStratifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRATIFIER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_GROUP, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_GROUP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_GROUP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_GROUP, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRATIFIER])) { + $v = $this->getStratifier(); + foreach($validationRules[self::FIELD_STRATIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_GROUP, self::FIELD_STRATIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRATIFIER])) { + $errs[self::FIELD_STRATIFIER] = []; + } + $errs[self::FIELD_STRATIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php index cfb8b7069c..9a7df9d60c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -153,7 +153,7 @@ class FHIRMeasurePopulation extends FHIRBackboneElement * Validation map for fields in type Measure.Population * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasurePopulation Constructor @@ -457,11 +457,147 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCriteria())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITERIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_POPULATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITERIA])) { + $v = $this->getCriteria(); + foreach($validationRules[self::FIELD_CRITERIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_POPULATION, self::FIELD_CRITERIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITERIA])) { + $errs[self::FIELD_CRITERIA] = []; + } + $errs[self::FIELD_CRITERIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_POPULATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_POPULATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_POPULATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php index 41a0cf106d..5348332c57 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRMeasureStratifier extends FHIRBackboneElement * Validation map for fields in type Measure.Stratifier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureStratifier Constructor @@ -333,11 +333,113 @@ public function setPath($path = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCriteria())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITERIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CRITERIA])) { + $v = $this->getCriteria(); + foreach($validationRules[self::FIELD_CRITERIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_STRATIFIER, self::FIELD_CRITERIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITERIA])) { + $errs[self::FIELD_CRITERIA] = []; + } + $errs[self::FIELD_CRITERIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_STRATIFIER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_STRATIFIER, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php index 4603a80db5..320dfbc7bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRMeasureSupplementalData extends FHIRBackboneElement * Validation map for fields in type Measure.SupplementalData * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureSupplementalData Constructor @@ -440,11 +440,132 @@ public function setUsage(array $usage = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCriteria())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITERIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUsage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USAGE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CRITERIA])) { + $v = $this->getCriteria(); + foreach($validationRules[self::FIELD_CRITERIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_SUPPLEMENTAL_DATA, self::FIELD_CRITERIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITERIA])) { + $errs[self::FIELD_CRITERIA] = []; + } + $errs[self::FIELD_CRITERIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_SUPPLEMENTAL_DATA, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_SUPPLEMENTAL_DATA, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_DOT_SUPPLEMENTAL_DATA, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php index ddee4e08ed..9225c97f78 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -136,7 +136,7 @@ class FHIRMeasureReportGroup extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportGroup Constructor @@ -423,11 +423,134 @@ public function setStratifier(array $stratifier = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasureScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE_SCORE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPopulation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POPULATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getStratifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRATIFIER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_GROUP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASURE_SCORE])) { + $v = $this->getMeasureScore(); + foreach($validationRules[self::FIELD_MEASURE_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_GROUP, self::FIELD_MEASURE_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASURE_SCORE])) { + $errs[self::FIELD_MEASURE_SCORE] = []; + } + $errs[self::FIELD_MEASURE_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_GROUP, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRATIFIER])) { + $v = $this->getStratifier(); + foreach($validationRules[self::FIELD_STRATIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_GROUP, self::FIELD_STRATIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRATIFIER])) { + $errs[self::FIELD_STRATIFIER] = []; + } + $errs[self::FIELD_STRATIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php index 806f91b4d0..c0c4faf7fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRMeasureReportPopulation extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Population * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportPopulation Constructor @@ -359,11 +359,130 @@ public function setPatients(FHIRReference $patients = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatients())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENTS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT])) { + $v = $this->getCount(); + foreach($validationRules[self::FIELD_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION, self::FIELD_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT])) { + $errs[self::FIELD_COUNT] = []; + } + $errs[self::FIELD_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENTS])) { + $v = $this->getPatients(); + foreach($validationRules[self::FIELD_PATIENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION, self::FIELD_PATIENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENTS])) { + $errs[self::FIELD_PATIENTS] = []; + } + $errs[self::FIELD_PATIENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php index e2353e42a5..bfba011137 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRMeasureReportPopulation1 extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Population1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportPopulation1 Constructor @@ -359,11 +359,130 @@ public function setPatients(FHIRReference $patients = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatients())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENTS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION_1, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT])) { + $v = $this->getCount(); + foreach($validationRules[self::FIELD_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION_1, self::FIELD_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT])) { + $errs[self::FIELD_COUNT] = []; + } + $errs[self::FIELD_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION_1, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENTS])) { + $v = $this->getPatients(); + foreach($validationRules[self::FIELD_PATIENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_POPULATION_1, self::FIELD_PATIENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENTS])) { + $errs[self::FIELD_PATIENTS] = []; + } + $errs[self::FIELD_PATIENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php index ca1bbd958a..7122f3ba93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRMeasureReportStratifier extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Stratifier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportStratifier Constructor @@ -261,11 +261,98 @@ public function setStratum(array $stratum = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStratum())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRATUM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATIFIER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRATUM])) { + $v = $this->getStratum(); + foreach($validationRules[self::FIELD_STRATUM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATIFIER, self::FIELD_STRATUM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRATUM])) { + $errs[self::FIELD_STRATUM] = []; + } + $errs[self::FIELD_STRATUM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php index c2a9dd2e8a..5d1aab31ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRMeasureReportStratum extends FHIRBackboneElement * Validation map for fields in type MeasureReport.Stratum * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportStratum Constructor @@ -369,11 +369,115 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMeasureScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE_SCORE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPopulation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POPULATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MEASURE_SCORE])) { + $v = $this->getMeasureScore(); + foreach($validationRules[self::FIELD_MEASURE_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATUM, self::FIELD_MEASURE_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASURE_SCORE])) { + $errs[self::FIELD_MEASURE_SCORE] = []; + } + $errs[self::FIELD_MEASURE_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POPULATION])) { + $v = $this->getPopulation(); + foreach($validationRules[self::FIELD_POPULATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATUM, self::FIELD_POPULATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POPULATION])) { + $errs[self::FIELD_POPULATION] = []; + } + $errs[self::FIELD_POPULATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_DOT_STRATUM, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php index 7c06d75fd5..00c5a17390 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRMedicationBatch extends FHIRBackboneElement * Validation map for fields in type Medication.Batch * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationBatch Constructor @@ -285,11 +285,96 @@ public function setLotNumber($lotNumber = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpirationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPIRATION_DATE])) { + $v = $this->getExpirationDate(); + foreach($validationRules[self::FIELD_EXPIRATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_BATCH, self::FIELD_EXPIRATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRATION_DATE])) { + $errs[self::FIELD_EXPIRATION_DATE] = []; + } + $errs[self::FIELD_EXPIRATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_BATCH, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php index a6f7854a71..bdbf100257 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRMedicationContent extends FHIRBackboneElement * Validation map for fields in type Medication.Content * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationContent Constructor @@ -285,11 +285,113 @@ public function setItemReference(FHIRReference $itemReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_CONTENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_CONTENT, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_CONTENT, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php index 98b5ce557b..b068864b58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRMedicationIngredient extends FHIRBackboneElement * Validation map for fields in type Medication.Ingredient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationIngredient Constructor @@ -369,11 +369,130 @@ public function setItemReference(FHIRReference $itemReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_ACTIVE])) { + $v = $this->getIsActive(); + foreach($validationRules[self::FIELD_IS_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_IS_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_ACTIVE])) { + $errs[self::FIELD_IS_ACTIVE] = []; + } + $errs[self::FIELD_IS_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_INGREDIENT, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php index 5085c25ca1..fc3bd2f006 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRMedicationPackage extends FHIRBackboneElement * Validation map for fields in type Medication.Package * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationPackage Constructor @@ -347,11 +347,117 @@ public function setContent(array $content = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBatch())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BATCH, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContainer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTAINER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_BATCH])) { + $v = $this->getBatch(); + foreach($validationRules[self::FIELD_BATCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PACKAGE, self::FIELD_BATCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BATCH])) { + $errs[self::FIELD_BATCH] = []; + } + $errs[self::FIELD_BATCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINER])) { + $v = $this->getContainer(); + foreach($validationRules[self::FIELD_CONTAINER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PACKAGE, self::FIELD_CONTAINER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINER])) { + $errs[self::FIELD_CONTAINER] = []; + } + $errs[self::FIELD_CONTAINER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DOT_PACKAGE, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php index a75137eb7b..5eedb384de 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -202,7 +202,7 @@ class FHIRMedicationAdministrationDosage extends FHIRBackboneElement * Validation map for fields in type MedicationAdministration.Dosage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministrationDosage Constructor @@ -576,11 +576,181 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOSE])) { + $v = $this->getDose(); + foreach($validationRules[self::FIELD_DOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_DOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE])) { + $errs[self::FIELD_DOSE] = []; + } + $errs[self::FIELD_DOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_QUANTITY])) { + $v = $this->getRateQuantity(); + foreach($validationRules[self::FIELD_RATE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_RATE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_QUANTITY])) { + $errs[self::FIELD_RATE_QUANTITY] = []; + } + $errs[self::FIELD_RATE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_DOSAGE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php index 99c596b519..6f8e29c1bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRMedicationAdministrationPerformer extends FHIRBackboneElement * Validation map for fields in type MedicationAdministration.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministrationPerformer Constructor @@ -228,11 +228,96 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_DOT_PERFORMER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php index ffc441c068..0b6fd864f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRMedicationDispensePerformer extends FHIRBackboneElement * Validation map for fields in type MedicationDispense.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispensePerformer Constructor @@ -230,11 +230,96 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_PERFORMER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php index ca6303896f..bbcf05471e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRMedicationDispenseSubstitution extends FHIRBackboneElement * Validation map for fields in type MedicationDispense.Substitution * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispenseSubstitution Constructor @@ -440,11 +440,134 @@ public function setWasSubstituted($wasSubstituted = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResponsibleParty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESPONSIBLE_PARTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWasSubstituted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WAS_SUBSTITUTED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE_PARTY])) { + $v = $this->getResponsibleParty(); + foreach($validationRules[self::FIELD_RESPONSIBLE_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_RESPONSIBLE_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE_PARTY])) { + $errs[self::FIELD_RESPONSIBLE_PARTY] = []; + } + $errs[self::FIELD_RESPONSIBLE_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WAS_SUBSTITUTED])) { + $v = $this->getWasSubstituted(); + foreach($validationRules[self::FIELD_WAS_SUBSTITUTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_DOT_SUBSTITUTION, self::FIELD_WAS_SUBSTITUTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WAS_SUBSTITUTED])) { + $errs[self::FIELD_WAS_SUBSTITUTED] = []; + } + $errs[self::FIELD_WAS_SUBSTITUTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php index 7890c7b10d..32365a9590 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -163,7 +163,7 @@ class FHIRMedicationRequestDispenseRequest extends FHIRBackboneElement * Validation map for fields in type MedicationRequest.DispenseRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequestDispenseRequest Constructor @@ -431,11 +431,147 @@ public function setValidityPeriod(FHIRPeriod $validityPeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpectedSupplyDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfRepeatsAllowed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidityPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDITY_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPECTED_SUPPLY_DURATION])) { + $v = $this->getExpectedSupplyDuration(); + foreach($validationRules[self::FIELD_EXPECTED_SUPPLY_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_EXPECTED_SUPPLY_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPECTED_SUPPLY_DURATION])) { + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION] = []; + } + $errs[self::FIELD_EXPECTED_SUPPLY_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $v = $this->getNumberOfRepeatsAllowed(); + foreach($validationRules[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_NUMBER_OF_REPEATS_ALLOWED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = []; + } + $errs[self::FIELD_NUMBER_OF_REPEATS_ALLOWED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDITY_PERIOD])) { + $v = $this->getValidityPeriod(); + foreach($validationRules[self::FIELD_VALIDITY_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_DISPENSE_REQUEST, self::FIELD_VALIDITY_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDITY_PERIOD])) { + $errs[self::FIELD_VALIDITY_PERIOD] = []; + } + $errs[self::FIELD_VALIDITY_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequester.php index aa3bcb779d..a72f1d7447 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRMedicationRequestRequester extends FHIRBackboneElement * Validation map for fields in type MedicationRequest.Requester * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequestRequester Constructor @@ -231,11 +231,96 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_REQUESTER, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_REQUESTER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php index 17f67eaf2c..3a7efd6f05 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRMedicationRequestSubstitution extends FHIRBackboneElement * Validation map for fields in type MedicationRequest.Substitution * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequestSubstitution Constructor @@ -260,11 +260,96 @@ public function setReason(FHIRCodeableConcept $reason = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllowed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLOWED] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLOWED])) { + $v = $this->getAllowed(); + foreach($validationRules[self::FIELD_ALLOWED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_SUBSTITUTION, self::FIELD_ALLOWED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED])) { + $errs[self::FIELD_ALLOWED] = []; + } + $errs[self::FIELD_ALLOWED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_DOT_SUBSTITUTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php index 213c442a2e..6c26174b93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRMessageDefinitionAllowedResponse extends FHIRBackboneElement * Validation map for fields in type MessageDefinition.AllowedResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageDefinitionAllowedResponse Constructor @@ -276,11 +276,96 @@ public function setSituation($situation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMessage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSituation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITUATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MESSAGE])) { + $v = $this->getMessage(); + foreach($validationRules[self::FIELD_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_ALLOWED_RESPONSE, self::FIELD_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MESSAGE])) { + $errs[self::FIELD_MESSAGE] = []; + } + $errs[self::FIELD_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITUATION])) { + $v = $this->getSituation(); + foreach($validationRules[self::FIELD_SITUATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_ALLOWED_RESPONSE, self::FIELD_SITUATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITUATION])) { + $errs[self::FIELD_SITUATION] = []; + } + $errs[self::FIELD_SITUATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php index 4d08852bee..b300f363d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRMessageDefinitionFocus extends FHIRBackboneElement * Validation map for fields in type MessageDefinition.Focus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageDefinitionFocus Constructor @@ -400,11 +400,130 @@ public function setProfile(FHIRReference $profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_FOCUS, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_FOCUS, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_FOCUS, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION_DOT_FOCUS, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php index 843b6db1b0..8bae343267 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRMessageHeaderDestination extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Destination * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderDestination Constructor @@ -331,11 +331,113 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_DESTINATION, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php index a8296199e9..470865900c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRMessageHeaderResponse extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Response * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderResponse Constructor @@ -329,11 +329,113 @@ public function setIdentifier($identifier = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAILS] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAILS])) { + $v = $this->getDetails(); + foreach($validationRules[self::FIELD_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAILS])) { + $errs[self::FIELD_DETAILS] = []; + } + $errs[self::FIELD_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php index 42dcf292ed..d0740d1c80 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRMessageHeaderSource extends FHIRBackboneElement * Validation map for fields in type MessageHeader.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeaderSource Constructor @@ -485,11 +485,147 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContact())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getSoftware())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOFTWARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOFTWARE])) { + $v = $this->getSoftware(); + foreach($validationRules[self::FIELD_SOFTWARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_SOFTWARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOFTWARE])) { + $errs[self::FIELD_SOFTWARE] = []; + } + $errs[self::FIELD_SOFTWARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER_DOT_SOURCE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php index 90e63672b7..203668a34d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRNamingSystemUniqueId extends FHIRBackboneElement * Validation map for fields in type NamingSystem.UniqueId * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNamingSystemUniqueId Constructor @@ -471,11 +471,147 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreferred())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFERRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFERRED])) { + $v = $this->getPreferred(); + foreach($validationRules[self::FIELD_PREFERRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_PREFERRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFERRED])) { + $errs[self::FIELD_PREFERRED] = []; + } + $errs[self::FIELD_PREFERRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_DOT_UNIQUE_ID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php index b012342692..b847be2eab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -149,7 +149,7 @@ class FHIRNutritionOrderAdministration extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Administration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderAdministration Constructor @@ -364,11 +364,130 @@ public function setSchedule(FHIRTiming $schedule = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_QUANTITY])) { + $v = $this->getRateQuantity(); + foreach($validationRules[self::FIELD_RATE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_RATE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_QUANTITY])) { + $errs[self::FIELD_RATE_QUANTITY] = []; + } + $errs[self::FIELD_RATE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ADMINISTRATION, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php index 9814aadea3..f11dce9824 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -219,7 +219,7 @@ class FHIRNutritionOrderEnteralFormula extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.EnteralFormula * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderEnteralFormula Constructor @@ -744,11 +744,217 @@ public function setRouteofAdministration(FHIRCodeableConcept $routeofAdministrat } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditiveProductName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_PRODUCT_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdditiveType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAdministration())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADMINISTRATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAdministrationInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADMINISTRATION_INSTRUCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getBaseFormulaProductName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getBaseFormulaType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE_FORMULA_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCaloricDensity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CALORIC_DENSITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxVolumeToDeliver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VOLUME_TO_DELIVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRouteofAdministration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTEOF_ADMINISTRATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_PRODUCT_NAME])) { + $v = $this->getAdditiveProductName(); + foreach($validationRules[self::FIELD_ADDITIVE_PRODUCT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADDITIVE_PRODUCT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_PRODUCT_NAME])) { + $errs[self::FIELD_ADDITIVE_PRODUCT_NAME] = []; + } + $errs[self::FIELD_ADDITIVE_PRODUCT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_TYPE])) { + $v = $this->getAdditiveType(); + foreach($validationRules[self::FIELD_ADDITIVE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADDITIVE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_TYPE])) { + $errs[self::FIELD_ADDITIVE_TYPE] = []; + } + $errs[self::FIELD_ADDITIVE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADMINISTRATION])) { + $v = $this->getAdministration(); + foreach($validationRules[self::FIELD_ADMINISTRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADMINISTRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMINISTRATION])) { + $errs[self::FIELD_ADMINISTRATION] = []; + } + $errs[self::FIELD_ADMINISTRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADMINISTRATION_INSTRUCTION])) { + $v = $this->getAdministrationInstruction(); + foreach($validationRules[self::FIELD_ADMINISTRATION_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ADMINISTRATION_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADMINISTRATION_INSTRUCTION])) { + $errs[self::FIELD_ADMINISTRATION_INSTRUCTION] = []; + } + $errs[self::FIELD_ADMINISTRATION_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { + $v = $this->getBaseFormulaProductName(); + foreach($validationRules[self::FIELD_BASE_FORMULA_PRODUCT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_BASE_FORMULA_PRODUCT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { + $errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME] = []; + } + $errs[self::FIELD_BASE_FORMULA_PRODUCT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE_FORMULA_TYPE])) { + $v = $this->getBaseFormulaType(); + foreach($validationRules[self::FIELD_BASE_FORMULA_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_BASE_FORMULA_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE_FORMULA_TYPE])) { + $errs[self::FIELD_BASE_FORMULA_TYPE] = []; + } + $errs[self::FIELD_BASE_FORMULA_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CALORIC_DENSITY])) { + $v = $this->getCaloricDensity(); + foreach($validationRules[self::FIELD_CALORIC_DENSITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_CALORIC_DENSITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CALORIC_DENSITY])) { + $errs[self::FIELD_CALORIC_DENSITY] = []; + } + $errs[self::FIELD_CALORIC_DENSITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VOLUME_TO_DELIVER])) { + $v = $this->getMaxVolumeToDeliver(); + foreach($validationRules[self::FIELD_MAX_VOLUME_TO_DELIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_MAX_VOLUME_TO_DELIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VOLUME_TO_DELIVER])) { + $errs[self::FIELD_MAX_VOLUME_TO_DELIVER] = []; + } + $errs[self::FIELD_MAX_VOLUME_TO_DELIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTEOF_ADMINISTRATION])) { + $v = $this->getRouteofAdministration(); + foreach($validationRules[self::FIELD_ROUTEOF_ADMINISTRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ENTERAL_FORMULA, self::FIELD_ROUTEOF_ADMINISTRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTEOF_ADMINISTRATION])) { + $errs[self::FIELD_ROUTEOF_ADMINISTRATION] = []; + } + $errs[self::FIELD_ROUTEOF_ADMINISTRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php index 843c95aee0..4c3a906a80 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRNutritionOrderNutrient extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Nutrient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderNutrient Constructor @@ -235,11 +235,96 @@ public function setModifier(FHIRCodeableConcept $modifier = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getModifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODIFIER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_NUTRIENT, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_NUTRIENT, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php index 278263c0e2..f2e7941260 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRNutritionOrderOralDiet extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.OralDiet * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderOralDiet Constructor @@ -673,11 +673,174 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getFluidConsistencyType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FLUID_CONSISTENCY_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTRUCTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNutrient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NUTRIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSchedule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SCHEDULE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTexture())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEXTURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_FLUID_CONSISTENCY_TYPE])) { + $v = $this->getFluidConsistencyType(); + foreach($validationRules[self::FIELD_FLUID_CONSISTENCY_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_FLUID_CONSISTENCY_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FLUID_CONSISTENCY_TYPE])) { + $errs[self::FIELD_FLUID_CONSISTENCY_TYPE] = []; + } + $errs[self::FIELD_FLUID_CONSISTENCY_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTRUCTION])) { + $v = $this->getInstruction(); + foreach($validationRules[self::FIELD_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTRUCTION])) { + $errs[self::FIELD_INSTRUCTION] = []; + } + $errs[self::FIELD_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUTRIENT])) { + $v = $this->getNutrient(); + foreach($validationRules[self::FIELD_NUTRIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_NUTRIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUTRIENT])) { + $errs[self::FIELD_NUTRIENT] = []; + } + $errs[self::FIELD_NUTRIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXTURE])) { + $v = $this->getTexture(); + foreach($validationRules[self::FIELD_TEXTURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_TEXTURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXTURE])) { + $errs[self::FIELD_TEXTURE] = []; + } + $errs[self::FIELD_TEXTURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_ORAL_DIET, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php index 729d64e0ea..9ee273bab6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -163,7 +163,7 @@ class FHIRNutritionOrderSupplement extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Supplement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderSupplement Constructor @@ -504,11 +504,149 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTRUCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSchedule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SCHEDULE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INSTRUCTION])) { + $v = $this->getInstruction(); + foreach($validationRules[self::FIELD_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTRUCTION])) { + $errs[self::FIELD_INSTRUCTION] = []; + } + $errs[self::FIELD_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_NAME])) { + $v = $this->getProductName(); + foreach($validationRules[self::FIELD_PRODUCT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_PRODUCT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_NAME])) { + $errs[self::FIELD_PRODUCT_NAME] = []; + } + $errs[self::FIELD_PRODUCT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_SUPPLEMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php index 54042249b7..0fd54acd6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRNutritionOrderTexture extends FHIRBackboneElement * Validation map for fields in type NutritionOrder.Texture * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderTexture Constructor @@ -237,11 +237,96 @@ public function setModifier(FHIRCodeableConcept $modifier = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFoodType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOOD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getModifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODIFIER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FOOD_TYPE])) { + $v = $this->getFoodType(); + foreach($validationRules[self::FIELD_FOOD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_TEXTURE, self::FIELD_FOOD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOOD_TYPE])) { + $errs[self::FIELD_FOOD_TYPE] = []; + } + $errs[self::FIELD_FOOD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_DOT_TEXTURE, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php index 76cec1a602..6fd332b587 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -290,7 +290,7 @@ class FHIRObservationComponent extends FHIRBackboneElement * Validation map for fields in type Observation.Component * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationComponent Constructor @@ -1006,11 +1006,302 @@ public function setValueTime($valueTime = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataAbsentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ABSENT_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getInterpretation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTERPRETATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferenceRange())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_RANGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_ABSENT_REASON])) { + $v = $this->getDataAbsentReason(); + foreach($validationRules[self::FIELD_DATA_ABSENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_DATA_ABSENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_ABSENT_REASON])) { + $errs[self::FIELD_DATA_ABSENT_REASON] = []; + } + $errs[self::FIELD_DATA_ABSENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERPRETATION])) { + $v = $this->getInterpretation(); + foreach($validationRules[self::FIELD_INTERPRETATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_INTERPRETATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERPRETATION])) { + $errs[self::FIELD_INTERPRETATION] = []; + } + $errs[self::FIELD_INTERPRETATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_RANGE])) { + $v = $this->getReferenceRange(); + foreach($validationRules[self::FIELD_REFERENCE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_REFERENCE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_RANGE])) { + $errs[self::FIELD_REFERENCE_RANGE] = []; + } + $errs[self::FIELD_REFERENCE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_COMPONENT, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php index ae82139a2b..e181fbd7b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -180,7 +180,7 @@ class FHIRObservationReferenceRange extends FHIRBackboneElement * Validation map for fields in type Observation.ReferenceRange * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationReferenceRange Constructor @@ -543,11 +543,166 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAppliesTo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_APPLIES_TO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getHigh())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIGH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLow())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOW] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGE])) { + $v = $this->getAge(); + foreach($validationRules[self::FIELD_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE])) { + $errs[self::FIELD_AGE] = []; + } + $errs[self::FIELD_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPLIES_TO])) { + $v = $this->getAppliesTo(); + foreach($validationRules[self::FIELD_APPLIES_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_APPLIES_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES_TO])) { + $errs[self::FIELD_APPLIES_TO] = []; + } + $errs[self::FIELD_APPLIES_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HIGH])) { + $v = $this->getHigh(); + foreach($validationRules[self::FIELD_HIGH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_HIGH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIGH])) { + $errs[self::FIELD_HIGH] = []; + } + $errs[self::FIELD_HIGH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOW])) { + $v = $this->getLow(); + foreach($validationRules[self::FIELD_LOW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_LOW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOW])) { + $errs[self::FIELD_LOW] = []; + } + $errs[self::FIELD_LOW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_REFERENCE_RANGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php index ce8fcc835b..257d8922b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRObservationRelated extends FHIRBackboneElement * Validation map for fields in type Observation.Related * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationRelated Constructor @@ -243,11 +243,96 @@ public function setType(FHIRObservationRelationshipType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_RELATED, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_DOT_RELATED, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php index e7d499afec..43b2feaa9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIROperationDefinitionBinding extends FHIRBackboneElement * Validation map for fields in type OperationDefinition.Binding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinitionBinding Constructor @@ -327,11 +327,113 @@ public function setValueSetUri($valueSetUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getStrength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSetReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSetUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_BINDING, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET_REFERENCE])) { + $v = $this->getValueSetReference(); + foreach($validationRules[self::FIELD_VALUE_SET_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_BINDING, self::FIELD_VALUE_SET_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET_REFERENCE])) { + $errs[self::FIELD_VALUE_SET_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_SET_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET_URI])) { + $v = $this->getValueSetUri(); + foreach($validationRules[self::FIELD_VALUE_SET_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_BINDING, self::FIELD_VALUE_SET_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET_URI])) { + $errs[self::FIELD_VALUE_SET_URI] = []; + } + $errs[self::FIELD_VALUE_SET_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php index 3522d43aa1..1d382d3e5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIROperationDefinitionOverload extends FHIRBackboneElement * Validation map for fields in type OperationDefinition.Overload * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinitionOverload Constructor @@ -316,11 +316,98 @@ public function setParameterName(array $parameterName = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameterName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER_NAME, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_OVERLOAD, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER_NAME])) { + $v = $this->getParameterName(); + foreach($validationRules[self::FIELD_PARAMETER_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_OVERLOAD, self::FIELD_PARAMETER_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER_NAME])) { + $errs[self::FIELD_PARAMETER_NAME] = []; + } + $errs[self::FIELD_PARAMETER_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php index abc8c9a6f7..3cfbb50548 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -216,7 +216,7 @@ class FHIROperationDefinitionParameter extends FHIRBackboneElement * Validation map for fields in type OperationDefinition.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinitionParameter Constructor @@ -801,11 +801,234 @@ public function setUse(FHIROperationParameterUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBinding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPart())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSearchType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BINDING])) { + $v = $this->getBinding(); + foreach($validationRules[self::FIELD_BINDING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_BINDING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING])) { + $errs[self::FIELD_BINDING] = []; + } + $errs[self::FIELD_BINDING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART])) { + $v = $this->getPart(); + foreach($validationRules[self::FIELD_PART] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_PART, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART])) { + $errs[self::FIELD_PART] = []; + } + $errs[self::FIELD_PART][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH_TYPE])) { + $v = $this->getSearchType(); + foreach($validationRules[self::FIELD_SEARCH_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_SEARCH_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH_TYPE])) { + $errs[self::FIELD_SEARCH_TYPE] = []; + } + $errs[self::FIELD_SEARCH_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION_DOT_PARAMETER, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php index 8cd88e7b1c..a61e7c433a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -175,7 +175,7 @@ class FHIROperationOutcomeIssue extends FHIRBackboneElement * Validation map for fields in type OperationOutcome.Issue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationOutcomeIssue Constructor @@ -647,11 +647,168 @@ public function setSeverity(FHIRIssueSeverity $severity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAILS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnostics())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTICS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExpression())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXPRESSION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAILS])) { + $v = $this->getDetails(); + foreach($validationRules[self::FIELD_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAILS])) { + $errs[self::FIELD_DETAILS] = []; + } + $errs[self::FIELD_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSTICS])) { + $v = $this->getDiagnostics(); + foreach($validationRules[self::FIELD_DIAGNOSTICS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_DIAGNOSTICS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSTICS])) { + $errs[self::FIELD_DIAGNOSTICS] = []; + } + $errs[self::FIELD_DIAGNOSTICS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME_DOT_ISSUE, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php index cccc497ccf..d744e75144 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIROrganizationContact extends FHIRBackboneElement * Validation map for fields in type Organization.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrganizationContact Constructor @@ -388,11 +388,132 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php index e1dd455fc5..5534eaca7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -669,7 +669,7 @@ class FHIRParametersParameter extends FHIRBackboneElement * Validation map for fields in type Parameters.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParametersParameter Constructor @@ -2759,11 +2759,761 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPart())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART])) { + $v = $this->getPart(); + foreach($validationRules[self::FIELD_PART] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_PART, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART])) { + $errs[self::FIELD_PART] = []; + } + $errs[self::FIELD_PART][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_AGE])) { + $v = $this->getValueAge(); + foreach($validationRules[self::FIELD_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_AGE])) { + $errs[self::FIELD_VALUE_AGE] = []; + } + $errs[self::FIELD_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_COUNT])) { + $v = $this->getValueCount(); + foreach($validationRules[self::FIELD_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_COUNT])) { + $errs[self::FIELD_VALUE_COUNT] = []; + } + $errs[self::FIELD_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DISTANCE])) { + $v = $this->getValueDistance(); + foreach($validationRules[self::FIELD_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DISTANCE])) { + $errs[self::FIELD_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS_DOT_PARAMETER, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php index 7a95a437ea..8389e94e33 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRPatientAnimal extends FHIRBackboneElement * Validation map for fields in type Patient.Animal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientAnimal Constructor @@ -283,11 +283,113 @@ public function setSpecies(FHIRCodeableConcept $species = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBreed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BREED] = $fieldErrs; + } + } + if (null !== ($v = $this->getGenderStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BREED])) { + $v = $this->getBreed(); + foreach($validationRules[self::FIELD_BREED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_ANIMAL, self::FIELD_BREED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BREED])) { + $errs[self::FIELD_BREED] = []; + } + $errs[self::FIELD_BREED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER_STATUS])) { + $v = $this->getGenderStatus(); + foreach($validationRules[self::FIELD_GENDER_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_ANIMAL, self::FIELD_GENDER_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER_STATUS])) { + $errs[self::FIELD_GENDER_STATUS] = []; + } + $errs[self::FIELD_GENDER_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIES])) { + $v = $this->getSpecies(); + foreach($validationRules[self::FIELD_SPECIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_ANIMAL, self::FIELD_SPECIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIES])) { + $errs[self::FIELD_SPECIES] = []; + } + $errs[self::FIELD_SPECIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php index 3f3c53286e..2f0639978c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRPatientCommunication extends FHIRBackboneElement * Validation map for fields in type Patient.Communication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientCommunication Constructor @@ -263,11 +263,96 @@ public function setPreferred($preferred = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPreferred())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFERRED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_COMMUNICATION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFERRED])) { + $v = $this->getPreferred(); + foreach($validationRules[self::FIELD_PREFERRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_COMMUNICATION, self::FIELD_PREFERRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFERRED])) { + $errs[self::FIELD_PREFERRED] = []; + } + $errs[self::FIELD_PREFERRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php index e2dcd78fad..2d8866e5dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -184,7 +184,7 @@ class FHIRPatientContact extends FHIRBackboneElement * Validation map for fields in type Patient.Contact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientContact Constructor @@ -590,11 +590,185 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelationship())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATIONSHIP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_CONTACT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php index 60dd69a9a4..b144a1655e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRPatientLink extends FHIRBackboneElement * Validation map for fields in type Patient.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatientLink Constructor @@ -240,11 +240,96 @@ public function setType(FHIRLinkType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOther())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OTHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OTHER])) { + $v = $this->getOther(); + foreach($validationRules[self::FIELD_OTHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_LINK, self::FIELD_OTHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OTHER])) { + $errs[self::FIELD_OTHER] = []; + } + $errs[self::FIELD_OTHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT_DOT_LINK, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php index 49313ced38..3e8e3a9a40 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -176,7 +176,7 @@ class FHIRPaymentReconciliationDetail extends FHIRBackboneElement * Validation map for fields in type PaymentReconciliation.Detail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentReconciliationDetail Constructor @@ -504,11 +504,181 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAmount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AMOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubmitter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBMITTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AMOUNT])) { + $v = $this->getAmount(); + foreach($validationRules[self::FIELD_AMOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_AMOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AMOUNT])) { + $errs[self::FIELD_AMOUNT] = []; + } + $errs[self::FIELD_AMOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE])) { + $v = $this->getPayee(); + foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_PAYEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE])) { + $errs[self::FIELD_PAYEE] = []; + } + $errs[self::FIELD_PAYEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBMITTER])) { + $v = $this->getSubmitter(); + foreach($validationRules[self::FIELD_SUBMITTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_SUBMITTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBMITTER])) { + $errs[self::FIELD_SUBMITTER] = []; + } + $errs[self::FIELD_SUBMITTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_DETAIL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php index 8e2558aa55..a9b91453b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRPaymentReconciliationProcessNote extends FHIRBackboneElement * Validation map for fields in type PaymentReconciliation.ProcessNote * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentReconciliationProcessNote Constructor @@ -254,11 +254,96 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_PROCESS_NOTE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION_DOT_PROCESS_NOTE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php index 51ad52ae0b..ce822590bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRPersonLink extends FHIRBackboneElement * Validation map for fields in type Person.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPersonLink Constructor @@ -246,11 +246,96 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssurance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSURANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSURANCE])) { + $v = $this->getAssurance(); + foreach($validationRules[self::FIELD_ASSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON_DOT_LINK, self::FIELD_ASSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSURANCE])) { + $errs[self::FIELD_ASSURANCE] = []; + } + $errs[self::FIELD_ASSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON_DOT_LINK, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php index 0576c2bdcc..97044c76dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -498,7 +498,7 @@ class FHIRPlanDefinitionAction extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.Action * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionAction Constructor @@ -2377,11 +2377,579 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCardinalityBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARDINALITY_BEHAVIOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDocumentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENTATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDynamicValue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DYNAMIC_VALUE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getGoalId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGroupingBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUPING_BEHAVIOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInput())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INPUT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOutput())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTPUT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrecheckBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRECHECK_BEHAVIOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelatedAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequiredBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getSelectionBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SELECTION_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getTextEquivalent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT_EQUIVALENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTransform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRANSFORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTriggerDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TRIGGER_DEFINITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARDINALITY_BEHAVIOR])) { + $v = $this->getCardinalityBehavior(); + foreach($validationRules[self::FIELD_CARDINALITY_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_CARDINALITY_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARDINALITY_BEHAVIOR])) { + $errs[self::FIELD_CARDINALITY_BEHAVIOR] = []; + } + $errs[self::FIELD_CARDINALITY_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DYNAMIC_VALUE])) { + $v = $this->getDynamicValue(); + foreach($validationRules[self::FIELD_DYNAMIC_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_DYNAMIC_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DYNAMIC_VALUE])) { + $errs[self::FIELD_DYNAMIC_VALUE] = []; + } + $errs[self::FIELD_DYNAMIC_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL_ID])) { + $v = $this->getGoalId(); + foreach($validationRules[self::FIELD_GOAL_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_GOAL_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL_ID])) { + $errs[self::FIELD_GOAL_ID] = []; + } + $errs[self::FIELD_GOAL_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUPING_BEHAVIOR])) { + $v = $this->getGroupingBehavior(); + foreach($validationRules[self::FIELD_GROUPING_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_GROUPING_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUPING_BEHAVIOR])) { + $errs[self::FIELD_GROUPING_BEHAVIOR] = []; + } + $errs[self::FIELD_GROUPING_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INPUT])) { + $v = $this->getInput(); + foreach($validationRules[self::FIELD_INPUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_INPUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INPUT])) { + $errs[self::FIELD_INPUT] = []; + } + $errs[self::FIELD_INPUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTPUT])) { + $v = $this->getOutput(); + foreach($validationRules[self::FIELD_OUTPUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_OUTPUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTPUT])) { + $errs[self::FIELD_OUTPUT] = []; + } + $errs[self::FIELD_OUTPUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECHECK_BEHAVIOR])) { + $v = $this->getPrecheckBehavior(); + foreach($validationRules[self::FIELD_PRECHECK_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_PRECHECK_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECHECK_BEHAVIOR])) { + $errs[self::FIELD_PRECHECK_BEHAVIOR] = []; + } + $errs[self::FIELD_PRECHECK_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ACTION])) { + $v = $this->getRelatedAction(); + foreach($validationRules[self::FIELD_RELATED_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_RELATED_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ACTION])) { + $errs[self::FIELD_RELATED_ACTION] = []; + } + $errs[self::FIELD_RELATED_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED_BEHAVIOR])) { + $v = $this->getRequiredBehavior(); + foreach($validationRules[self::FIELD_REQUIRED_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_REQUIRED_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED_BEHAVIOR])) { + $errs[self::FIELD_REQUIRED_BEHAVIOR] = []; + } + $errs[self::FIELD_REQUIRED_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SELECTION_BEHAVIOR])) { + $v = $this->getSelectionBehavior(); + foreach($validationRules[self::FIELD_SELECTION_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_SELECTION_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SELECTION_BEHAVIOR])) { + $errs[self::FIELD_SELECTION_BEHAVIOR] = []; + } + $errs[self::FIELD_SELECTION_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT_EQUIVALENT])) { + $v = $this->getTextEquivalent(); + foreach($validationRules[self::FIELD_TEXT_EQUIVALENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TEXT_EQUIVALENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT_EQUIVALENT])) { + $errs[self::FIELD_TEXT_EQUIVALENT] = []; + } + $errs[self::FIELD_TEXT_EQUIVALENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DURATION])) { + $v = $this->getTimingDuration(); + foreach($validationRules[self::FIELD_TIMING_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DURATION])) { + $errs[self::FIELD_TIMING_DURATION] = []; + } + $errs[self::FIELD_TIMING_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_RANGE])) { + $v = $this->getTimingRange(); + foreach($validationRules[self::FIELD_TIMING_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_RANGE])) { + $errs[self::FIELD_TIMING_RANGE] = []; + } + $errs[self::FIELD_TIMING_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRANSFORM])) { + $v = $this->getTransform(); + foreach($validationRules[self::FIELD_TRANSFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TRANSFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSFORM])) { + $errs[self::FIELD_TRANSFORM] = []; + } + $errs[self::FIELD_TRANSFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRIGGER_DEFINITION])) { + $v = $this->getTriggerDefinition(); + foreach($validationRules[self::FIELD_TRIGGER_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TRIGGER_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRIGGER_DEFINITION])) { + $errs[self::FIELD_TRIGGER_DEFINITION] = []; + } + $errs[self::FIELD_TRIGGER_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_ACTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php index c6c150d997..f58056bf15 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRPlanDefinitionCondition extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionCondition Constructor @@ -421,11 +421,130 @@ public function setLanguage($language = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_CONDITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_CONDITION, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_CONDITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_CONDITION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php index 58208ffebc..5a3f3e5762 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIRPlanDefinitionDynamicValue extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.DynamicValue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionDynamicValue Constructor @@ -431,11 +431,130 @@ public function setPath($path = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_DYNAMIC_VALUE, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php index e1b4ea1b97..8d92b45d11 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -186,7 +186,7 @@ class FHIRPlanDefinitionGoal extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.Goal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionGoal Constructor @@ -629,11 +629,187 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAddresses())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESSES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDocumentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENTATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESSES])) { + $v = $this->getAddresses(); + foreach($validationRules[self::FIELD_ADDRESSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_ADDRESSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESSES])) { + $errs[self::FIELD_ADDRESSES] = []; + } + $errs[self::FIELD_ADDRESSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_GOAL, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php index b1b226e6cf..11d1063638 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRPlanDefinitionParticipant extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionParticipant Constructor @@ -245,11 +245,96 @@ public function setType(FHIRActionParticipantType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_PARTICIPANT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php index 9a6ca4e502..d59eed0685 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRPlanDefinitionRelatedAction extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.RelatedAction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionRelatedAction Constructor @@ -382,11 +382,130 @@ public function setRelationship(FHIRActionRelationshipType $relationship = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActionId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffsetDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION_ID])) { + $v = $this->getActionId(); + foreach($validationRules[self::FIELD_ACTION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_RELATED_ACTION, self::FIELD_ACTION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION_ID])) { + $errs[self::FIELD_ACTION_ID] = []; + } + $errs[self::FIELD_ACTION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET_DURATION])) { + $v = $this->getOffsetDuration(); + foreach($validationRules[self::FIELD_OFFSET_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_RELATED_ACTION, self::FIELD_OFFSET_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET_DURATION])) { + $errs[self::FIELD_OFFSET_DURATION] = []; + } + $errs[self::FIELD_OFFSET_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET_RANGE])) { + $v = $this->getOffsetRange(); + foreach($validationRules[self::FIELD_OFFSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_RELATED_ACTION, self::FIELD_OFFSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET_RANGE])) { + $errs[self::FIELD_OFFSET_RANGE] = []; + } + $errs[self::FIELD_OFFSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_RELATED_ACTION, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php index dfff28ed90..5427020227 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -172,7 +172,7 @@ class FHIRPlanDefinitionTarget extends FHIRBackboneElement * Validation map for fields in type PlanDefinition.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinitionTarget Constructor @@ -440,11 +440,147 @@ public function setMeasure(FHIRCodeableConcept $measure = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetailCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetailRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAIL_CODEABLE_CONCEPT])) { + $v = $this->getDetailCodeableConcept(); + foreach($validationRules[self::FIELD_DETAIL_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_TARGET, self::FIELD_DETAIL_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DETAIL_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_QUANTITY])) { + $v = $this->getDetailQuantity(); + foreach($validationRules[self::FIELD_DETAIL_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_TARGET, self::FIELD_DETAIL_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_QUANTITY])) { + $errs[self::FIELD_DETAIL_QUANTITY] = []; + } + $errs[self::FIELD_DETAIL_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL_RANGE])) { + $v = $this->getDetailRange(); + foreach($validationRules[self::FIELD_DETAIL_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_TARGET, self::FIELD_DETAIL_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL_RANGE])) { + $errs[self::FIELD_DETAIL_RANGE] = []; + } + $errs[self::FIELD_DETAIL_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DUE])) { + $v = $this->getDue(); + foreach($validationRules[self::FIELD_DUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_TARGET, self::FIELD_DUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DUE])) { + $errs[self::FIELD_DUE] = []; + } + $errs[self::FIELD_DUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASURE])) { + $v = $this->getMeasure(); + foreach($validationRules[self::FIELD_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION_DOT_TARGET, self::FIELD_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASURE])) { + $errs[self::FIELD_MEASURE] = []; + } + $errs[self::FIELD_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php index 281f0aebcb..8c84adc2a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRPractitionerQualification extends FHIRBackboneElement * Validation map for fields in type Practitioner.Qualification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerQualification Constructor @@ -366,11 +366,132 @@ public function setPeriod(FHIRPeriod $period = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssuer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUER])) { + $v = $this->getIssuer(); + foreach($validationRules[self::FIELD_ISSUER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_ISSUER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUER])) { + $errs[self::FIELD_ISSUER] = []; + } + $errs[self::FIELD_ISSUER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_DOT_QUALIFICATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php index 53af37e70c..4e13c08a45 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRPractitionerRoleAvailableTime extends FHIRBackboneElement * Validation map for fields in type PractitionerRole.AvailableTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerRoleAvailableTime Constructor @@ -451,11 +451,132 @@ public function setDaysOfWeek(array $daysOfWeek = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAllDay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALL_DAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailableEndTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABLE_END_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailableStartTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABLE_START_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDaysOfWeek())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DAYS_OF_WEEK, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALL_DAY])) { + $v = $this->getAllDay(); + foreach($validationRules[self::FIELD_ALL_DAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_AVAILABLE_TIME, self::FIELD_ALL_DAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALL_DAY])) { + $errs[self::FIELD_ALL_DAY] = []; + } + $errs[self::FIELD_ALL_DAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_END_TIME])) { + $v = $this->getAvailableEndTime(); + foreach($validationRules[self::FIELD_AVAILABLE_END_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_AVAILABLE_TIME, self::FIELD_AVAILABLE_END_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_END_TIME])) { + $errs[self::FIELD_AVAILABLE_END_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_END_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_START_TIME])) { + $v = $this->getAvailableStartTime(); + foreach($validationRules[self::FIELD_AVAILABLE_START_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_AVAILABLE_TIME, self::FIELD_AVAILABLE_START_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_START_TIME])) { + $errs[self::FIELD_AVAILABLE_START_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_START_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAYS_OF_WEEK])) { + $v = $this->getDaysOfWeek(); + foreach($validationRules[self::FIELD_DAYS_OF_WEEK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_AVAILABLE_TIME, self::FIELD_DAYS_OF_WEEK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAYS_OF_WEEK])) { + $errs[self::FIELD_DAYS_OF_WEEK] = []; + } + $errs[self::FIELD_DAYS_OF_WEEK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php index e4ef1f19a9..160cf537d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRPractitionerRoleNotAvailable extends FHIRBackboneElement * Validation map for fields in type PractitionerRole.NotAvailable * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerRoleNotAvailable Constructor @@ -254,11 +254,96 @@ public function setDuring(FHIRPeriod $during = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuring())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_NOT_AVAILABLE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURING])) { + $v = $this->getDuring(); + foreach($validationRules[self::FIELD_DURING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE_DOT_NOT_AVAILABLE, self::FIELD_DURING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURING])) { + $errs[self::FIELD_DURING] = []; + } + $errs[self::FIELD_DURING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php index cec8b89c5e..94daa2a5f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRProcedureFocalDevice extends FHIRBackboneElement * Validation map for fields in type Procedure.FocalDevice * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureFocalDevice Constructor @@ -230,11 +230,96 @@ public function setManipulated(FHIRReference $manipulated = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getManipulated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANIPULATED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_FOCAL_DEVICE, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANIPULATED])) { + $v = $this->getManipulated(); + foreach($validationRules[self::FIELD_MANIPULATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_FOCAL_DEVICE, self::FIELD_MANIPULATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANIPULATED])) { + $errs[self::FIELD_MANIPULATED] = []; + } + $errs[self::FIELD_MANIPULATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php index b5b64ca752..edd900893b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRProcedurePerformer extends FHIRBackboneElement * Validation map for fields in type Procedure.Performer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedurePerformer Constructor @@ -279,11 +279,113 @@ public function setRole(FHIRCodeableConcept $role = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_PERFORMER, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_PERFORMER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_DOT_PERFORMER, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequester.php index 782d4807a2..409d243783 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRProcedureRequestRequester extends FHIRBackboneElement * Validation map for fields in type ProcedureRequest.Requester * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureRequestRequester Constructor @@ -225,11 +225,96 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST_DOT_REQUESTER, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST_DOT_REQUESTER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php index 1d18216a28..fed4f1a64a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRProcessRequestItem extends FHIRBackboneElement * Validation map for fields in type ProcessRequest.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcessRequestItem Constructor @@ -201,11 +201,79 @@ public function setSequenceLinkId($sequenceLinkId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getSequenceLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_SEQUENCE_LINK_ID])) { + $v = $this->getSequenceLinkId(); + foreach($validationRules[self::FIELD_SEQUENCE_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST_DOT_ITEM, self::FIELD_SEQUENCE_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE_LINK_ID])) { + $errs[self::FIELD_SEQUENCE_LINK_ID] = []; + } + $errs[self::FIELD_SEQUENCE_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNote.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNote.php index f97f9d1075..bf556824b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRProcessResponseProcessNote extends FHIRBackboneElement * Validation map for fields in type ProcessResponse.ProcessNote * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcessResponseProcessNote Constructor @@ -254,11 +254,96 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE_DOT_PROCESS_NOTE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE_DOT_PROCESS_NOTE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php index 037d2db12d..61f031751f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -172,7 +172,7 @@ class FHIRProvenanceAgent extends FHIRBackboneElement * Validation map for fields in type Provenance.Agent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceAgent Constructor @@ -528,11 +528,166 @@ public function setWhoUri($whoUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOnBehalfOfReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOfUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelatedAgentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATED_AGENT_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRole())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ROLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getWhoReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhoUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF_REFERENCE])) { + $v = $this->getOnBehalfOfReference(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_ON_BEHALF_OF_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF_REFERENCE])) { + $errs[self::FIELD_ON_BEHALF_OF_REFERENCE] = []; + } + $errs[self::FIELD_ON_BEHALF_OF_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF_URI])) { + $v = $this->getOnBehalfOfUri(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_ON_BEHALF_OF_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF_URI])) { + $errs[self::FIELD_ON_BEHALF_OF_URI] = []; + } + $errs[self::FIELD_ON_BEHALF_OF_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_AGENT_TYPE])) { + $v = $this->getRelatedAgentType(); + foreach($validationRules[self::FIELD_RELATED_AGENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_RELATED_AGENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_AGENT_TYPE])) { + $errs[self::FIELD_RELATED_AGENT_TYPE] = []; + } + $errs[self::FIELD_RELATED_AGENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO_REFERENCE])) { + $v = $this->getWhoReference(); + foreach($validationRules[self::FIELD_WHO_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_WHO_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO_REFERENCE])) { + $errs[self::FIELD_WHO_REFERENCE] = []; + } + $errs[self::FIELD_WHO_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO_URI])) { + $v = $this->getWhoUri(); + foreach($validationRules[self::FIELD_WHO_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_AGENT, self::FIELD_WHO_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO_URI])) { + $errs[self::FIELD_WHO_URI] = []; + } + $errs[self::FIELD_WHO_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php index 0604cc68b8..463642c918 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -169,7 +169,7 @@ class FHIRProvenanceEntity extends FHIRBackboneElement * Validation map for fields in type Provenance.Entity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceEntity Constructor @@ -503,11 +503,149 @@ public function setWhatUri($whatUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhatIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHAT_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhatReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHAT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhatUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHAT_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROLE])) { + $v = $this->getRole(); + foreach($validationRules[self::FIELD_ROLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_ROLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROLE])) { + $errs[self::FIELD_ROLE] = []; + } + $errs[self::FIELD_ROLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHAT_IDENTIFIER])) { + $v = $this->getWhatIdentifier(); + foreach($validationRules[self::FIELD_WHAT_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_WHAT_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHAT_IDENTIFIER])) { + $errs[self::FIELD_WHAT_IDENTIFIER] = []; + } + $errs[self::FIELD_WHAT_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHAT_REFERENCE])) { + $v = $this->getWhatReference(); + foreach($validationRules[self::FIELD_WHAT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_WHAT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHAT_REFERENCE])) { + $errs[self::FIELD_WHAT_REFERENCE] = []; + } + $errs[self::FIELD_WHAT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHAT_URI])) { + $v = $this->getWhatUri(); + foreach($validationRules[self::FIELD_WHAT_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_DOT_ENTITY, self::FIELD_WHAT_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHAT_URI])) { + $errs[self::FIELD_WHAT_URI] = []; + } + $errs[self::FIELD_WHAT_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php index 877bcb6851..dd95dcfb44 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -294,7 +294,7 @@ class FHIRQuestionnaireEnableWhen extends FHIRBackboneElement * Validation map for fields in type Questionnaire.EnableWhen * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireEnableWhen Constructor @@ -1129,11 +1129,300 @@ public function setQuestion($question = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAnswerAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAnswerUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANSWER_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getHasAnswer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HAS_ANSWER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuestion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ANSWER_ATTACHMENT])) { + $v = $this->getAnswerAttachment(); + foreach($validationRules[self::FIELD_ANSWER_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_ATTACHMENT])) { + $errs[self::FIELD_ANSWER_ATTACHMENT] = []; + } + $errs[self::FIELD_ANSWER_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_BOOLEAN])) { + $v = $this->getAnswerBoolean(); + foreach($validationRules[self::FIELD_ANSWER_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_BOOLEAN])) { + $errs[self::FIELD_ANSWER_BOOLEAN] = []; + } + $errs[self::FIELD_ANSWER_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_CODING])) { + $v = $this->getAnswerCoding(); + foreach($validationRules[self::FIELD_ANSWER_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_CODING])) { + $errs[self::FIELD_ANSWER_CODING] = []; + } + $errs[self::FIELD_ANSWER_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_DATE])) { + $v = $this->getAnswerDate(); + foreach($validationRules[self::FIELD_ANSWER_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_DATE])) { + $errs[self::FIELD_ANSWER_DATE] = []; + } + $errs[self::FIELD_ANSWER_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_DATE_TIME])) { + $v = $this->getAnswerDateTime(); + foreach($validationRules[self::FIELD_ANSWER_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_DATE_TIME])) { + $errs[self::FIELD_ANSWER_DATE_TIME] = []; + } + $errs[self::FIELD_ANSWER_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_DECIMAL])) { + $v = $this->getAnswerDecimal(); + foreach($validationRules[self::FIELD_ANSWER_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_DECIMAL])) { + $errs[self::FIELD_ANSWER_DECIMAL] = []; + } + $errs[self::FIELD_ANSWER_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_INTEGER])) { + $v = $this->getAnswerInteger(); + foreach($validationRules[self::FIELD_ANSWER_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_INTEGER])) { + $errs[self::FIELD_ANSWER_INTEGER] = []; + } + $errs[self::FIELD_ANSWER_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_QUANTITY])) { + $v = $this->getAnswerQuantity(); + foreach($validationRules[self::FIELD_ANSWER_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_QUANTITY])) { + $errs[self::FIELD_ANSWER_QUANTITY] = []; + } + $errs[self::FIELD_ANSWER_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_REFERENCE])) { + $v = $this->getAnswerReference(); + foreach($validationRules[self::FIELD_ANSWER_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_REFERENCE])) { + $errs[self::FIELD_ANSWER_REFERENCE] = []; + } + $errs[self::FIELD_ANSWER_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_STRING])) { + $v = $this->getAnswerString(); + foreach($validationRules[self::FIELD_ANSWER_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_STRING])) { + $errs[self::FIELD_ANSWER_STRING] = []; + } + $errs[self::FIELD_ANSWER_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_TIME])) { + $v = $this->getAnswerTime(); + foreach($validationRules[self::FIELD_ANSWER_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_TIME])) { + $errs[self::FIELD_ANSWER_TIME] = []; + } + $errs[self::FIELD_ANSWER_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANSWER_URI])) { + $v = $this->getAnswerUri(); + foreach($validationRules[self::FIELD_ANSWER_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_ANSWER_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER_URI])) { + $errs[self::FIELD_ANSWER_URI] = []; + } + $errs[self::FIELD_ANSWER_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HAS_ANSWER])) { + $v = $this->getHasAnswer(); + foreach($validationRules[self::FIELD_HAS_ANSWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_HAS_ANSWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HAS_ANSWER])) { + $errs[self::FIELD_HAS_ANSWER] = []; + } + $errs[self::FIELD_HAS_ANSWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUESTION])) { + $v = $this->getQuestion(); + foreach($validationRules[self::FIELD_QUESTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ENABLE_WHEN, self::FIELD_QUESTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUESTION])) { + $errs[self::FIELD_QUESTION] = []; + } + $errs[self::FIELD_QUESTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php index ed08d4f43f..1bd4d7ce1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -462,7 +462,7 @@ class FHIRQuestionnaireItem extends FHIRBackboneElement * Validation map for fields in type Questionnaire.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireItem Constructor @@ -2083,11 +2083,512 @@ public function setType(FHIRQuestionnaireItemType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEnableWhen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENABLE_WHEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInitialAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getInitialUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INITIAL_URI] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_LENGTH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOption())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOptions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPTIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrefix())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREFIX] = $fieldErrs; + } + } + if (null !== ($v = $this->getReadOnly())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_READ_ONLY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRepeats())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPEATS] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENABLE_WHEN])) { + $v = $this->getEnableWhen(); + foreach($validationRules[self::FIELD_ENABLE_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_ENABLE_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENABLE_WHEN])) { + $errs[self::FIELD_ENABLE_WHEN] = []; + } + $errs[self::FIELD_ENABLE_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_ATTACHMENT])) { + $v = $this->getInitialAttachment(); + foreach($validationRules[self::FIELD_INITIAL_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_ATTACHMENT])) { + $errs[self::FIELD_INITIAL_ATTACHMENT] = []; + } + $errs[self::FIELD_INITIAL_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_BOOLEAN])) { + $v = $this->getInitialBoolean(); + foreach($validationRules[self::FIELD_INITIAL_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_BOOLEAN])) { + $errs[self::FIELD_INITIAL_BOOLEAN] = []; + } + $errs[self::FIELD_INITIAL_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_CODING])) { + $v = $this->getInitialCoding(); + foreach($validationRules[self::FIELD_INITIAL_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_CODING])) { + $errs[self::FIELD_INITIAL_CODING] = []; + } + $errs[self::FIELD_INITIAL_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_DATE])) { + $v = $this->getInitialDate(); + foreach($validationRules[self::FIELD_INITIAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_DATE])) { + $errs[self::FIELD_INITIAL_DATE] = []; + } + $errs[self::FIELD_INITIAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_DATE_TIME])) { + $v = $this->getInitialDateTime(); + foreach($validationRules[self::FIELD_INITIAL_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_DATE_TIME])) { + $errs[self::FIELD_INITIAL_DATE_TIME] = []; + } + $errs[self::FIELD_INITIAL_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_DECIMAL])) { + $v = $this->getInitialDecimal(); + foreach($validationRules[self::FIELD_INITIAL_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_DECIMAL])) { + $errs[self::FIELD_INITIAL_DECIMAL] = []; + } + $errs[self::FIELD_INITIAL_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_INTEGER])) { + $v = $this->getInitialInteger(); + foreach($validationRules[self::FIELD_INITIAL_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_INTEGER])) { + $errs[self::FIELD_INITIAL_INTEGER] = []; + } + $errs[self::FIELD_INITIAL_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_QUANTITY])) { + $v = $this->getInitialQuantity(); + foreach($validationRules[self::FIELD_INITIAL_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_QUANTITY])) { + $errs[self::FIELD_INITIAL_QUANTITY] = []; + } + $errs[self::FIELD_INITIAL_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_REFERENCE])) { + $v = $this->getInitialReference(); + foreach($validationRules[self::FIELD_INITIAL_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_REFERENCE])) { + $errs[self::FIELD_INITIAL_REFERENCE] = []; + } + $errs[self::FIELD_INITIAL_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_STRING])) { + $v = $this->getInitialString(); + foreach($validationRules[self::FIELD_INITIAL_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_STRING])) { + $errs[self::FIELD_INITIAL_STRING] = []; + } + $errs[self::FIELD_INITIAL_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_TIME])) { + $v = $this->getInitialTime(); + foreach($validationRules[self::FIELD_INITIAL_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_TIME])) { + $errs[self::FIELD_INITIAL_TIME] = []; + } + $errs[self::FIELD_INITIAL_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INITIAL_URI])) { + $v = $this->getInitialUri(); + foreach($validationRules[self::FIELD_INITIAL_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_INITIAL_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INITIAL_URI])) { + $errs[self::FIELD_INITIAL_URI] = []; + } + $errs[self::FIELD_INITIAL_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_LENGTH])) { + $v = $this->getMaxLength(); + foreach($validationRules[self::FIELD_MAX_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_MAX_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_LENGTH])) { + $errs[self::FIELD_MAX_LENGTH] = []; + } + $errs[self::FIELD_MAX_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPTION])) { + $v = $this->getOption(); + foreach($validationRules[self::FIELD_OPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_OPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPTION])) { + $errs[self::FIELD_OPTION] = []; + } + $errs[self::FIELD_OPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPTIONS])) { + $v = $this->getOptions(); + foreach($validationRules[self::FIELD_OPTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_OPTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPTIONS])) { + $errs[self::FIELD_OPTIONS] = []; + } + $errs[self::FIELD_OPTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFIX])) { + $v = $this->getPrefix(); + foreach($validationRules[self::FIELD_PREFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_PREFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFIX])) { + $errs[self::FIELD_PREFIX] = []; + } + $errs[self::FIELD_PREFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_READ_ONLY])) { + $v = $this->getReadOnly(); + foreach($validationRules[self::FIELD_READ_ONLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_READ_ONLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_READ_ONLY])) { + $errs[self::FIELD_READ_ONLY] = []; + } + $errs[self::FIELD_READ_ONLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEATS])) { + $v = $this->getRepeats(); + foreach($validationRules[self::FIELD_REPEATS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_REPEATS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEATS])) { + $errs[self::FIELD_REPEATS] = []; + } + $errs[self::FIELD_REPEATS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED])) { + $v = $this->getRequired(); + foreach($validationRules[self::FIELD_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED])) { + $errs[self::FIELD_REQUIRED] = []; + } + $errs[self::FIELD_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_ITEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOption.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOption.php index eb31047aea..75ee6fda31 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOption.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOption.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRQuestionnaireOption extends FHIRBackboneElement * Validation map for fields in type Questionnaire.Option * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireOption Constructor @@ -477,11 +477,147 @@ public function setValueTime($valueTime = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_OPTION, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_OPTION, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_OPTION, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_OPTION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_DOT_OPTION, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php index 0cd7cf0ce6..8e101b6d1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -267,7 +267,7 @@ class FHIRQuestionnaireResponseAnswer extends FHIRBackboneElement * Validation map for fields in type QuestionnaireResponse.Answer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponseAnswer Constructor @@ -1028,11 +1028,285 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ANSWER, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php index 0b55756665..d0378a1001 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRQuestionnaireResponseItem extends FHIRBackboneElement * Validation map for fields in type QuestionnaireResponse.Item * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponseItem Constructor @@ -585,11 +585,168 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAnswer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ANSWER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLinkId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINK_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ANSWER])) { + $v = $this->getAnswer(); + foreach($validationRules[self::FIELD_ANSWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_ANSWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANSWER])) { + $errs[self::FIELD_ANSWER] = []; + } + $errs[self::FIELD_ANSWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK_ID])) { + $v = $this->getLinkId(); + foreach($validationRules[self::FIELD_LINK_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_LINK_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK_ID])) { + $errs[self::FIELD_LINK_ID] = []; + } + $errs[self::FIELD_LINK_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_DOT_ITEM, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequester.php index 74bd1b49e7..0fac28c7c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRReferralRequestRequester extends FHIRBackboneElement * Validation map for fields in type ReferralRequest.Requester * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReferralRequestRequester Constructor @@ -225,11 +225,96 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST_DOT_REQUESTER, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST_DOT_REQUESTER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php index 7fac1d2f7d..09ebd86c23 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -384,7 +384,7 @@ class FHIRRequestGroupAction extends FHIRBackboneElement * Validation map for fields in type RequestGroup.Action * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestGroupAction Constructor @@ -1685,11 +1685,448 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCardinalityBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARDINALITY_BEHAVIOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDocumentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENTATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGroupingBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUPING_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrecheckBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRECHECK_BEHAVIOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequiredBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSelectionBehavior())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SELECTION_BEHAVIOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getTextEquivalent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT_EQUIVALENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARDINALITY_BEHAVIOR])) { + $v = $this->getCardinalityBehavior(); + foreach($validationRules[self::FIELD_CARDINALITY_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_CARDINALITY_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARDINALITY_BEHAVIOR])) { + $errs[self::FIELD_CARDINALITY_BEHAVIOR] = []; + } + $errs[self::FIELD_CARDINALITY_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUPING_BEHAVIOR])) { + $v = $this->getGroupingBehavior(); + foreach($validationRules[self::FIELD_GROUPING_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_GROUPING_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUPING_BEHAVIOR])) { + $errs[self::FIELD_GROUPING_BEHAVIOR] = []; + } + $errs[self::FIELD_GROUPING_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECHECK_BEHAVIOR])) { + $v = $this->getPrecheckBehavior(); + foreach($validationRules[self::FIELD_PRECHECK_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_PRECHECK_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECHECK_BEHAVIOR])) { + $errs[self::FIELD_PRECHECK_BEHAVIOR] = []; + } + $errs[self::FIELD_PRECHECK_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ACTION])) { + $v = $this->getRelatedAction(); + foreach($validationRules[self::FIELD_RELATED_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_RELATED_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ACTION])) { + $errs[self::FIELD_RELATED_ACTION] = []; + } + $errs[self::FIELD_RELATED_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED_BEHAVIOR])) { + $v = $this->getRequiredBehavior(); + foreach($validationRules[self::FIELD_REQUIRED_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_REQUIRED_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED_BEHAVIOR])) { + $errs[self::FIELD_REQUIRED_BEHAVIOR] = []; + } + $errs[self::FIELD_REQUIRED_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SELECTION_BEHAVIOR])) { + $v = $this->getSelectionBehavior(); + foreach($validationRules[self::FIELD_SELECTION_BEHAVIOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_SELECTION_BEHAVIOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SELECTION_BEHAVIOR])) { + $errs[self::FIELD_SELECTION_BEHAVIOR] = []; + } + $errs[self::FIELD_SELECTION_BEHAVIOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT_EQUIVALENT])) { + $v = $this->getTextEquivalent(); + foreach($validationRules[self::FIELD_TEXT_EQUIVALENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TEXT_EQUIVALENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT_EQUIVALENT])) { + $errs[self::FIELD_TEXT_EQUIVALENT] = []; + } + $errs[self::FIELD_TEXT_EQUIVALENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DURATION])) { + $v = $this->getTimingDuration(); + foreach($validationRules[self::FIELD_TIMING_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DURATION])) { + $errs[self::FIELD_TIMING_DURATION] = []; + } + $errs[self::FIELD_TIMING_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_RANGE])) { + $v = $this->getTimingRange(); + foreach($validationRules[self::FIELD_TIMING_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_RANGE])) { + $errs[self::FIELD_TIMING_RANGE] = []; + } + $errs[self::FIELD_TIMING_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_ACTION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php index a378a4352b..1ab94b933c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRRequestGroupCondition extends FHIRBackboneElement * Validation map for fields in type RequestGroup.Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestGroupCondition Constructor @@ -419,11 +419,130 @@ public function setLanguage($language = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_CONDITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_CONDITION, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_CONDITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_CONDITION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php index ab8b42dbbb..d60af230dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -143,7 +143,7 @@ class FHIRRequestGroupRelatedAction extends FHIRBackboneElement * Validation map for fields in type RequestGroup.RelatedAction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestGroupRelatedAction Constructor @@ -380,11 +380,130 @@ public function setRelationship(FHIRActionRelationshipType $relationship = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActionId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffsetDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION_ID])) { + $v = $this->getActionId(); + foreach($validationRules[self::FIELD_ACTION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_RELATED_ACTION, self::FIELD_ACTION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION_ID])) { + $errs[self::FIELD_ACTION_ID] = []; + } + $errs[self::FIELD_ACTION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET_DURATION])) { + $v = $this->getOffsetDuration(); + foreach($validationRules[self::FIELD_OFFSET_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_RELATED_ACTION, self::FIELD_OFFSET_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET_DURATION])) { + $errs[self::FIELD_OFFSET_DURATION] = []; + } + $errs[self::FIELD_OFFSET_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET_RANGE])) { + $v = $this->getOffsetRange(); + foreach($validationRules[self::FIELD_OFFSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_RELATED_ACTION, self::FIELD_OFFSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET_RANGE])) { + $errs[self::FIELD_OFFSET_RANGE] = []; + } + $errs[self::FIELD_OFFSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP_DOT_RELATED_ACTION, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php index fe142c9244..7e6858c423 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRResearchStudyArm extends FHIRBackboneElement * Validation map for fields in type ResearchStudy.Arm * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchStudyArm Constructor @@ -338,11 +338,113 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_DOT_ARM, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_DOT_ARM, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_DOT_ARM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php index a682fa9e30..35e2733fbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -200,7 +200,7 @@ class FHIRRiskAssessmentPrediction extends FHIRBackboneElement * Validation map for fields in type RiskAssessment.Prediction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskAssessmentPrediction Constructor @@ -631,11 +631,198 @@ public function setWhenRange(FHIRRange $whenRange = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getProbabilityDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROBABILITY_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getProbabilityRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROBABILITY_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQualitativeRisk())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUALITATIVE_RISK] = $fieldErrs; + } + } + if (null !== ($v = $this->getRationale())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATIONALE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelativeRisk())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIVE_RISK] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROBABILITY_DECIMAL])) { + $v = $this->getProbabilityDecimal(); + foreach($validationRules[self::FIELD_PROBABILITY_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_PROBABILITY_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROBABILITY_DECIMAL])) { + $errs[self::FIELD_PROBABILITY_DECIMAL] = []; + } + $errs[self::FIELD_PROBABILITY_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROBABILITY_RANGE])) { + $v = $this->getProbabilityRange(); + foreach($validationRules[self::FIELD_PROBABILITY_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_PROBABILITY_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROBABILITY_RANGE])) { + $errs[self::FIELD_PROBABILITY_RANGE] = []; + } + $errs[self::FIELD_PROBABILITY_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALITATIVE_RISK])) { + $v = $this->getQualitativeRisk(); + foreach($validationRules[self::FIELD_QUALITATIVE_RISK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_QUALITATIVE_RISK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALITATIVE_RISK])) { + $errs[self::FIELD_QUALITATIVE_RISK] = []; + } + $errs[self::FIELD_QUALITATIVE_RISK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATIONALE])) { + $v = $this->getRationale(); + foreach($validationRules[self::FIELD_RATIONALE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_RATIONALE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATIONALE])) { + $errs[self::FIELD_RATIONALE] = []; + } + $errs[self::FIELD_RATIONALE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIVE_RISK])) { + $v = $this->getRelativeRisk(); + foreach($validationRules[self::FIELD_RELATIVE_RISK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_RELATIVE_RISK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIVE_RISK])) { + $errs[self::FIELD_RELATIVE_RISK] = []; + } + $errs[self::FIELD_RELATIVE_RISK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_PERIOD])) { + $v = $this->getWhenPeriod(); + foreach($validationRules[self::FIELD_WHEN_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_WHEN_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_PERIOD])) { + $errs[self::FIELD_WHEN_PERIOD] = []; + } + $errs[self::FIELD_WHEN_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_RANGE])) { + $v = $this->getWhenRange(); + foreach($validationRules[self::FIELD_WHEN_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT_DOT_PREDICTION, self::FIELD_WHEN_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_RANGE])) { + $errs[self::FIELD_WHEN_RANGE] = []; + } + $errs[self::FIELD_WHEN_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php index e95b33e3e8..821b60ba96 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRSearchParameterComponent extends FHIRBackboneElement * Validation map for fields in type SearchParameter.Component * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchParameterComponent Constructor @@ -254,11 +254,96 @@ public function setExpression($expression = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER_DOT_COMPONENT, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER_DOT_COMPONENT, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQuality.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQuality.php index 4a0071236c..a1d0f380e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQuality.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQuality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -297,7 +297,7 @@ class FHIRSequenceQuality extends FHIRBackboneElement * Validation map for fields in type Sequence.Quality * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSequenceQuality Constructor @@ -1170,11 +1170,300 @@ public function setType(FHIRQualityType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getFScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_F_SCORE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGtFP())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GT_FP] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrecision())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRECISION] = $fieldErrs; + } + } + if (null !== ($v = $this->getQueryFP())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUERY_FP] = $fieldErrs; + } + } + if (null !== ($v = $this->getQueryTP())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUERY_TP] = $fieldErrs; + } + } + if (null !== ($v = $this->getRecall())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECALL] = $fieldErrs; + } + } + if (null !== ($v = $this->getScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCORE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStandardSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STANDARD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getTruthFN())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRUTH_FN] = $fieldErrs; + } + } + if (null !== ($v = $this->getTruthTP())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRUTH_TP] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_F_SCORE])) { + $v = $this->getFScore(); + foreach($validationRules[self::FIELD_F_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_F_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_F_SCORE])) { + $errs[self::FIELD_F_SCORE] = []; + } + $errs[self::FIELD_F_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GT_FP])) { + $v = $this->getGtFP(); + foreach($validationRules[self::FIELD_GT_FP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_GT_FP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GT_FP])) { + $errs[self::FIELD_GT_FP] = []; + } + $errs[self::FIELD_GT_FP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECISION])) { + $v = $this->getPrecision(); + foreach($validationRules[self::FIELD_PRECISION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_PRECISION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECISION])) { + $errs[self::FIELD_PRECISION] = []; + } + $errs[self::FIELD_PRECISION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUERY_FP])) { + $v = $this->getQueryFP(); + foreach($validationRules[self::FIELD_QUERY_FP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_QUERY_FP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUERY_FP])) { + $errs[self::FIELD_QUERY_FP] = []; + } + $errs[self::FIELD_QUERY_FP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUERY_TP])) { + $v = $this->getQueryTP(); + foreach($validationRules[self::FIELD_QUERY_TP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_QUERY_TP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUERY_TP])) { + $errs[self::FIELD_QUERY_TP] = []; + } + $errs[self::FIELD_QUERY_TP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECALL])) { + $v = $this->getRecall(); + foreach($validationRules[self::FIELD_RECALL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_RECALL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECALL])) { + $errs[self::FIELD_RECALL] = []; + } + $errs[self::FIELD_RECALL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORE])) { + $v = $this->getScore(); + foreach($validationRules[self::FIELD_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORE])) { + $errs[self::FIELD_SCORE] = []; + } + $errs[self::FIELD_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STANDARD_SEQUENCE])) { + $v = $this->getStandardSequence(); + foreach($validationRules[self::FIELD_STANDARD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_STANDARD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STANDARD_SEQUENCE])) { + $errs[self::FIELD_STANDARD_SEQUENCE] = []; + } + $errs[self::FIELD_STANDARD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRUTH_FN])) { + $v = $this->getTruthFN(); + foreach($validationRules[self::FIELD_TRUTH_FN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_TRUTH_FN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRUTH_FN])) { + $errs[self::FIELD_TRUTH_FN] = []; + } + $errs[self::FIELD_TRUTH_FN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRUTH_TP])) { + $v = $this->getTruthTP(); + foreach($validationRules[self::FIELD_TRUTH_TP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_TRUTH_TP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRUTH_TP])) { + $errs[self::FIELD_TRUTH_TP] = []; + } + $errs[self::FIELD_TRUTH_TP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_QUALITY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeq.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeq.php index 7772f66c7e..d6b5a12107 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeq.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeq.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -205,7 +205,7 @@ class FHIRSequenceReferenceSeq extends FHIRBackboneElement * Validation map for fields in type Sequence.ReferenceSeq * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSequenceReferenceSeq Constructor @@ -694,11 +694,198 @@ public function setWindowStart($windowStart = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getChromosome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHROMOSOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getGenomeBuild())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENOME_BUILD] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceSeqId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_SEQ_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceSeqPointer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_SEQ_POINTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceSeqString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_SEQ_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getStrand())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRAND] = $fieldErrs; + } + } + if (null !== ($v = $this->getWindowEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WINDOW_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getWindowStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WINDOW_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CHROMOSOME])) { + $v = $this->getChromosome(); + foreach($validationRules[self::FIELD_CHROMOSOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_CHROMOSOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHROMOSOME])) { + $errs[self::FIELD_CHROMOSOME] = []; + } + $errs[self::FIELD_CHROMOSOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENOME_BUILD])) { + $v = $this->getGenomeBuild(); + foreach($validationRules[self::FIELD_GENOME_BUILD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_GENOME_BUILD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENOME_BUILD])) { + $errs[self::FIELD_GENOME_BUILD] = []; + } + $errs[self::FIELD_GENOME_BUILD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_SEQ_ID])) { + $v = $this->getReferenceSeqId(); + foreach($validationRules[self::FIELD_REFERENCE_SEQ_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_REFERENCE_SEQ_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_SEQ_ID])) { + $errs[self::FIELD_REFERENCE_SEQ_ID] = []; + } + $errs[self::FIELD_REFERENCE_SEQ_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_SEQ_POINTER])) { + $v = $this->getReferenceSeqPointer(); + foreach($validationRules[self::FIELD_REFERENCE_SEQ_POINTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_REFERENCE_SEQ_POINTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_SEQ_POINTER])) { + $errs[self::FIELD_REFERENCE_SEQ_POINTER] = []; + } + $errs[self::FIELD_REFERENCE_SEQ_POINTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_SEQ_STRING])) { + $v = $this->getReferenceSeqString(); + foreach($validationRules[self::FIELD_REFERENCE_SEQ_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_REFERENCE_SEQ_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_SEQ_STRING])) { + $errs[self::FIELD_REFERENCE_SEQ_STRING] = []; + } + $errs[self::FIELD_REFERENCE_SEQ_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRAND])) { + $v = $this->getStrand(); + foreach($validationRules[self::FIELD_STRAND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_STRAND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRAND])) { + $errs[self::FIELD_STRAND] = []; + } + $errs[self::FIELD_STRAND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WINDOW_END])) { + $v = $this->getWindowEnd(); + foreach($validationRules[self::FIELD_WINDOW_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_WINDOW_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WINDOW_END])) { + $errs[self::FIELD_WINDOW_END] = []; + } + $errs[self::FIELD_WINDOW_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WINDOW_START])) { + $v = $this->getWindowStart(); + foreach($validationRules[self::FIELD_WINDOW_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REFERENCE_SEQ, self::FIELD_WINDOW_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WINDOW_START])) { + $errs[self::FIELD_WINDOW_START] = []; + } + $errs[self::FIELD_WINDOW_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepository.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepository.php index 2d7e6d5792..c492508cf8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepository.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepository.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -169,7 +169,7 @@ class FHIRSequenceRepository extends FHIRBackboneElement * Validation map for fields in type Sequence.Repository * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSequenceRepository Constructor @@ -576,11 +576,164 @@ public function setVariantsetId($variantsetId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDatasetId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATASET_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getReadsetId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_READSET_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariantsetId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIANTSET_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATASET_ID])) { + $v = $this->getDatasetId(); + foreach($validationRules[self::FIELD_DATASET_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REPOSITORY, self::FIELD_DATASET_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATASET_ID])) { + $errs[self::FIELD_DATASET_ID] = []; + } + $errs[self::FIELD_DATASET_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REPOSITORY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_READSET_ID])) { + $v = $this->getReadsetId(); + foreach($validationRules[self::FIELD_READSET_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REPOSITORY, self::FIELD_READSET_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_READSET_ID])) { + $errs[self::FIELD_READSET_ID] = []; + } + $errs[self::FIELD_READSET_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REPOSITORY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REPOSITORY, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIANTSET_ID])) { + $v = $this->getVariantsetId(); + foreach($validationRules[self::FIELD_VARIANTSET_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_REPOSITORY, self::FIELD_VARIANTSET_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIANTSET_ID])) { + $errs[self::FIELD_VARIANTSET_ID] = []; + } + $errs[self::FIELD_VARIANTSET_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariant.php index 63f28b27e8..b6852b3c4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -180,7 +180,7 @@ class FHIRSequenceVariant extends FHIRBackboneElement * Validation map for fields in type Sequence.Variant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSequenceVariant Constructor @@ -595,11 +595,164 @@ public function setVariantPointer(FHIRReference $variantPointer = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCigar())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CIGAR] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getObservedAllele())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVED_ALLELE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceAllele())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_ALLELE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariantPointer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIANT_POINTER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CIGAR])) { + $v = $this->getCigar(); + foreach($validationRules[self::FIELD_CIGAR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_VARIANT, self::FIELD_CIGAR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CIGAR])) { + $errs[self::FIELD_CIGAR] = []; + } + $errs[self::FIELD_CIGAR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_VARIANT, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OBSERVED_ALLELE])) { + $v = $this->getObservedAllele(); + foreach($validationRules[self::FIELD_OBSERVED_ALLELE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_VARIANT, self::FIELD_OBSERVED_ALLELE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBSERVED_ALLELE])) { + $errs[self::FIELD_OBSERVED_ALLELE] = []; + } + $errs[self::FIELD_OBSERVED_ALLELE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_ALLELE])) { + $v = $this->getReferenceAllele(); + foreach($validationRules[self::FIELD_REFERENCE_ALLELE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_VARIANT, self::FIELD_REFERENCE_ALLELE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_ALLELE])) { + $errs[self::FIELD_REFERENCE_ALLELE] = []; + } + $errs[self::FIELD_REFERENCE_ALLELE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_VARIANT, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIANT_POINTER])) { + $v = $this->getVariantPointer(); + foreach($validationRules[self::FIELD_VARIANT_POINTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE_DOT_VARIANT, self::FIELD_VARIANT_POINTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIANT_POINTER])) { + $errs[self::FIELD_VARIANT_POINTER] = []; + } + $errs[self::FIELD_VARIANT_POINTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php index a9094c9bd0..c2ab9902e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -174,7 +174,7 @@ class FHIRSpecimenCollection extends FHIRBackboneElement * Validation map for fields in type Specimen.Collection * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenCollection Constructor @@ -485,11 +485,164 @@ public function setQuantity(FHIRQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollectedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollectedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollector())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTED_DATE_TIME])) { + $v = $this->getCollectedDateTime(); + foreach($validationRules[self::FIELD_COLLECTED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTED_DATE_TIME])) { + $errs[self::FIELD_COLLECTED_DATE_TIME] = []; + } + $errs[self::FIELD_COLLECTED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTED_PERIOD])) { + $v = $this->getCollectedPeriod(); + foreach($validationRules[self::FIELD_COLLECTED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTED_PERIOD])) { + $errs[self::FIELD_COLLECTED_PERIOD] = []; + } + $errs[self::FIELD_COLLECTED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTOR])) { + $v = $this->getCollector(); + foreach($validationRules[self::FIELD_COLLECTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_COLLECTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTOR])) { + $errs[self::FIELD_COLLECTOR] = []; + } + $errs[self::FIELD_COLLECTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_COLLECTION, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php index f4dd11d280..bc4caeca8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -185,7 +185,7 @@ class FHIRSpecimenContainer extends FHIRBackboneElement * Validation map for fields in type Specimen.Container * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenContainer Constructor @@ -570,11 +570,183 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdditiveCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdditiveReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDITIVE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCapacity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAPACITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecimenQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_CODEABLE_CONCEPT])) { + $v = $this->getAdditiveCodeableConcept(); + foreach($validationRules[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_ADDITIVE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ADDITIVE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDITIVE_REFERENCE])) { + $v = $this->getAdditiveReference(); + foreach($validationRules[self::FIELD_ADDITIVE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_ADDITIVE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE_REFERENCE])) { + $errs[self::FIELD_ADDITIVE_REFERENCE] = []; + } + $errs[self::FIELD_ADDITIVE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CAPACITY])) { + $v = $this->getCapacity(); + foreach($validationRules[self::FIELD_CAPACITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_CAPACITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPACITY])) { + $errs[self::FIELD_CAPACITY] = []; + } + $errs[self::FIELD_CAPACITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN_QUANTITY])) { + $v = $this->getSpecimenQuantity(); + foreach($validationRules[self::FIELD_SPECIMEN_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_SPECIMEN_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN_QUANTITY])) { + $errs[self::FIELD_SPECIMEN_QUANTITY] = []; + } + $errs[self::FIELD_SPECIMEN_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_CONTAINER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php index bf8727befb..ab83a57f54 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -159,7 +159,7 @@ class FHIRSpecimenProcessing extends FHIRBackboneElement * Validation map for fields in type Specimen.Processing * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenProcessing Constructor @@ -486,11 +486,149 @@ public function setTimePeriod(FHIRPeriod $timePeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdditive())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIVE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimeDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIME_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIVE])) { + $v = $this->getAdditive(); + foreach($validationRules[self::FIELD_ADDITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_PROCESSING, self::FIELD_ADDITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIVE])) { + $errs[self::FIELD_ADDITIVE] = []; + } + $errs[self::FIELD_ADDITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_PROCESSING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_PROCESSING, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_DATE_TIME])) { + $v = $this->getTimeDateTime(); + foreach($validationRules[self::FIELD_TIME_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_PROCESSING, self::FIELD_TIME_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_DATE_TIME])) { + $errs[self::FIELD_TIME_DATE_TIME] = []; + } + $errs[self::FIELD_TIME_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_PERIOD])) { + $v = $this->getTimePeriod(); + foreach($validationRules[self::FIELD_TIME_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_DOT_PROCESSING, self::FIELD_TIME_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_PERIOD])) { + $errs[self::FIELD_TIME_PERIOD] = []; + } + $errs[self::FIELD_TIME_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php index 010c19451a..aa8fb07969 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRStructureDefinitionDifferential extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Differential * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ELEMENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -218,11 +218,81 @@ public function setElement(array $element = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_DIFFERENTIAL, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php index 6ebb99cd3b..be64894fb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRStructureDefinitionMapping extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Mapping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinitionMapping Constructor @@ -444,11 +444,130 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTITY])) { + $v = $this->getIdentity(); + foreach($validationRules[self::FIELD_IDENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_IDENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY])) { + $errs[self::FIELD_IDENTITY] = []; + } + $errs[self::FIELD_IDENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_MAPPING, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php index 33d2d66dfb..63753bf142 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRStructureDefinitionSnapshot extends FHIRBackboneElement * Validation map for fields in type StructureDefinition.Snapshot * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ELEMENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -218,11 +218,81 @@ public function setElement(array $element = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_DOT_SNAPSHOT, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php index 22f6d50e1f..a60918552c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRStructureMapDependent extends FHIRBackboneElement * Validation map for fields in type StructureMap.Dependent * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VARIABLE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -329,11 +329,98 @@ public function setVariable(array $variable = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVariable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VARIABLE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_DEPENDENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIABLE])) { + $v = $this->getVariable(); + foreach($validationRules[self::FIELD_VARIABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_DEPENDENT, self::FIELD_VARIABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIABLE])) { + $errs[self::FIELD_VARIABLE] = []; + } + $errs[self::FIELD_VARIABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php index 65eaf6eddb..8cd9421c97 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRStructureMapGroup extends FHIRBackboneElement * Validation map for fields in type StructureMap.Group * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INPUT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -608,11 +608,168 @@ public function setTypeMode(FHIRStructureMapGroupTypeMode $typeMode = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExtends())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXTENDS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInput())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INPUT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTypeMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE_MODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENDS])) { + $v = $this->getExtends(); + foreach($validationRules[self::FIELD_EXTENDS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_EXTENDS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENDS])) { + $errs[self::FIELD_EXTENDS] = []; + } + $errs[self::FIELD_EXTENDS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INPUT])) { + $v = $this->getInput(); + foreach($validationRules[self::FIELD_INPUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_INPUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INPUT])) { + $errs[self::FIELD_INPUT] = []; + } + $errs[self::FIELD_INPUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE_MODE])) { + $v = $this->getTypeMode(); + foreach($validationRules[self::FIELD_TYPE_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_GROUP, self::FIELD_TYPE_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE_MODE])) { + $errs[self::FIELD_TYPE_MODE] = []; + } + $errs[self::FIELD_TYPE_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php index 11817a17dc..9b31794f5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRStructureMapInput extends FHIRBackboneElement * Validation map for fields in type StructureMap.Input * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapInput Constructor @@ -422,11 +422,130 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_INPUT, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_INPUT, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_INPUT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_INPUT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php index f9933b31b5..98975fa8f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRStructureMapParameter extends FHIRBackboneElement * Validation map for fields in type StructureMap.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapParameter Constructor @@ -509,11 +509,147 @@ public function setValueString($valueString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_PARAMETER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_PARAMETER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_PARAMETER, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_PARAMETER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_PARAMETER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php index 13eedf129c..9e4fe49d50 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -155,7 +155,7 @@ class FHIRStructureMapRule extends FHIRBackboneElement * Validation map for fields in type StructureMap.Rule * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_SOURCE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -600,11 +600,172 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getDependent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEPENDENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SOURCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDENT])) { + $v = $this->getDependent(); + foreach($validationRules[self::FIELD_DEPENDENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_DEPENDENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDENT])) { + $errs[self::FIELD_DEPENDENT] = []; + } + $errs[self::FIELD_DEPENDENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_RULE, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php index 83089019f4..e45372aa36 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -760,7 +760,7 @@ class FHIRStructureMapSource extends FHIRBackboneElement * Validation map for fields in type StructureMap.Source * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapSource Constructor @@ -3228,11 +3228,861 @@ public function setVariable($variable = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCheck())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHECK] = $fieldErrs; + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getElement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getListMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIST_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIABLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CHECK])) { + $v = $this->getCheck(); + foreach($validationRules[self::FIELD_CHECK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_CHECK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHECK])) { + $errs[self::FIELD_CHECK] = []; + } + $errs[self::FIELD_CHECK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ADDRESS])) { + $v = $this->getDefaultValueAddress(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ADDRESS])) { + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_AGE])) { + $v = $this->getDefaultValueAge(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_AGE])) { + $errs[self::FIELD_DEFAULT_VALUE_AGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ANNOTATION])) { + $v = $this->getDefaultValueAnnotation(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ANNOTATION])) { + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ATTACHMENT])) { + $v = $this->getDefaultValueAttachment(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT])) { + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $v = $this->getDefaultValueBase64Binary(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $v = $this->getDefaultValueBoolean(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODE])) { + $v = $this->getDefaultValueCode(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODE])) { + $errs[self::FIELD_DEFAULT_VALUE_CODE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getDefaultValueCodeableConcept(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODING])) { + $v = $this->getDefaultValueCoding(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODING])) { + $errs[self::FIELD_DEFAULT_VALUE_CODING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])) { + $v = $this->getDefaultValueContactPoint(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_COUNT])) { + $v = $this->getDefaultValueCount(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_COUNT])) { + $errs[self::FIELD_DEFAULT_VALUE_COUNT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATE])) { + $v = $this->getDefaultValueDate(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATE])) { + $errs[self::FIELD_DEFAULT_VALUE_DATE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $v = $this->getDefaultValueDateTime(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $v = $this->getDefaultValueDecimal(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DISTANCE])) { + $v = $this->getDefaultValueDistance(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DISTANCE])) { + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DURATION])) { + $v = $this->getDefaultValueDuration(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DURATION])) { + $errs[self::FIELD_DEFAULT_VALUE_DURATION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { + $v = $this->getDefaultValueHumanName(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ID])) { + $v = $this->getDefaultValueId(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ID])) { + $errs[self::FIELD_DEFAULT_VALUE_ID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { + $v = $this->getDefaultValueIdentifier(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $v = $this->getDefaultValueInstant(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $errs[self::FIELD_DEFAULT_VALUE_INSTANT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $v = $this->getDefaultValueInteger(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $errs[self::FIELD_DEFAULT_VALUE_INTEGER] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $v = $this->getDefaultValueMarkdown(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_META])) { + $v = $this->getDefaultValueMeta(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_META])) { + $errs[self::FIELD_DEFAULT_VALUE_META] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_MONEY])) { + $v = $this->getDefaultValueMoney(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_MONEY])) { + $errs[self::FIELD_DEFAULT_VALUE_MONEY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_OID])) { + $v = $this->getDefaultValueOid(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_OID])) { + $errs[self::FIELD_DEFAULT_VALUE_OID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_PERIOD])) { + $v = $this->getDefaultValuePeriod(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_PERIOD])) { + $errs[self::FIELD_DEFAULT_VALUE_PERIOD] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $v = $this->getDefaultValuePositiveInt(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_QUANTITY])) { + $v = $this->getDefaultValueQuantity(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_QUANTITY])) { + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RANGE])) { + $v = $this->getDefaultValueRange(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RANGE])) { + $errs[self::FIELD_DEFAULT_VALUE_RANGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RATIO])) { + $v = $this->getDefaultValueRatio(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RATIO])) { + $errs[self::FIELD_DEFAULT_VALUE_RATIO] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_REFERENCE])) { + $v = $this->getDefaultValueReference(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_REFERENCE])) { + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA])) { + $v = $this->getDefaultValueSampledData(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_SIGNATURE])) { + $v = $this->getDefaultValueSignature(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_SIGNATURE])) { + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_STRING])) { + $v = $this->getDefaultValueString(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_STRING])) { + $errs[self::FIELD_DEFAULT_VALUE_STRING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TIME])) { + $v = $this->getDefaultValueTime(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TIME])) { + $errs[self::FIELD_DEFAULT_VALUE_TIME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TIMING])) { + $v = $this->getDefaultValueTiming(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TIMING])) { + $errs[self::FIELD_DEFAULT_VALUE_TIMING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $v = $this->getDefaultValueUnsignedInt(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_URI])) { + $v = $this->getDefaultValueUri(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_DEFAULT_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_URI])) { + $errs[self::FIELD_DEFAULT_VALUE_URI] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIST_MODE])) { + $v = $this->getListMode(); + foreach($validationRules[self::FIELD_LIST_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_LIST_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIST_MODE])) { + $errs[self::FIELD_LIST_MODE] = []; + } + $errs[self::FIELD_LIST_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIABLE])) { + $v = $this->getVariable(); + foreach($validationRules[self::FIELD_VARIABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_SOURCE, self::FIELD_VARIABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIABLE])) { + $errs[self::FIELD_VARIABLE] = []; + } + $errs[self::FIELD_VARIABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php index cdf631bed8..73135e7f14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRStructureMapStructure extends FHIRBackboneElement * Validation map for fields in type StructureMap.Structure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapStructure Constructor @@ -413,11 +413,130 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAlias())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALIAS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_STRUCTURE, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_STRUCTURE, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_STRUCTURE, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_STRUCTURE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php index 21b30d8fb7..f389ed683a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -196,7 +196,7 @@ class FHIRStructureMapTarget extends FHIRBackboneElement * Validation map for fields in type StructureMap.Target * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapTarget Constructor @@ -760,11 +760,202 @@ public function setVariable($variable = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContextType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getElement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELEMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getListMode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIST_MODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getListRuleId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIST_RULE_ID] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTransform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRANSFORM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVariable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VARIABLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT_TYPE])) { + $v = $this->getContextType(); + foreach($validationRules[self::FIELD_CONTEXT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_CONTEXT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT_TYPE])) { + $errs[self::FIELD_CONTEXT_TYPE] = []; + } + $errs[self::FIELD_CONTEXT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIST_MODE])) { + $v = $this->getListMode(); + foreach($validationRules[self::FIELD_LIST_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_LIST_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIST_MODE])) { + $errs[self::FIELD_LIST_MODE] = []; + } + $errs[self::FIELD_LIST_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIST_RULE_ID])) { + $v = $this->getListRuleId(); + foreach($validationRules[self::FIELD_LIST_RULE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_LIST_RULE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIST_RULE_ID])) { + $errs[self::FIELD_LIST_RULE_ID] = []; + } + $errs[self::FIELD_LIST_RULE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRANSFORM])) { + $v = $this->getTransform(); + foreach($validationRules[self::FIELD_TRANSFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_TRANSFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSFORM])) { + $errs[self::FIELD_TRANSFORM] = []; + } + $errs[self::FIELD_TRANSFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIABLE])) { + $v = $this->getVariable(); + foreach($validationRules[self::FIELD_VARIABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_DOT_TARGET, self::FIELD_VARIABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIABLE])) { + $errs[self::FIELD_VARIABLE] = []; + } + $errs[self::FIELD_VARIABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php index 7353b4a6aa..bce1654141 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRSubscriptionChannel extends FHIRBackboneElement * Validation map for fields in type Subscription.Channel * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscriptionChannel Constructor @@ -464,11 +464,132 @@ public function setType(FHIRSubscriptionChannelType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getHeader())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HEADER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPayload())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYLOAD] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER])) { + $v = $this->getHeader(); + foreach($validationRules[self::FIELD_HEADER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_HEADER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER])) { + $errs[self::FIELD_HEADER] = []; + } + $errs[self::FIELD_HEADER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD])) { + $v = $this->getPayload(); + foreach($validationRules[self::FIELD_PAYLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_PAYLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD])) { + $errs[self::FIELD_PAYLOAD] = []; + } + $errs[self::FIELD_PAYLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_DOT_CHANNEL, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php index ebbd2a24ee..ef7dc0077b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRSubstanceIngredient extends FHIRBackboneElement * Validation map for fields in type Substance.Ingredient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceIngredient Constructor @@ -281,11 +281,113 @@ public function setSubstanceReference(FHIRReference $substanceReference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstanceCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstanceReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INGREDIENT, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT])) { + $v = $this->getSubstanceCodeableConcept(); + foreach($validationRules[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INGREDIENT, self::FIELD_SUBSTANCE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTANCE_REFERENCE])) { + $v = $this->getSubstanceReference(); + foreach($validationRules[self::FIELD_SUBSTANCE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INGREDIENT, self::FIELD_SUBSTANCE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTANCE_REFERENCE])) { + $errs[self::FIELD_SUBSTANCE_REFERENCE] = []; + } + $errs[self::FIELD_SUBSTANCE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php index 0406cf3c31..2311c46600 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRSubstanceInstance extends FHIRBackboneElement * Validation map for fields in type Substance.Instance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstanceInstance Constructor @@ -321,11 +321,113 @@ public function setQuantity(FHIRQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpiry())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRY] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPIRY])) { + $v = $this->getExpiry(); + foreach($validationRules[self::FIELD_EXPIRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_EXPIRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRY])) { + $errs[self::FIELD_EXPIRY] = []; + } + $errs[self::FIELD_EXPIRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE_DOT_INSTANCE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php index 0226735b58..852cf63871 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRSupplyDeliverySuppliedItem extends FHIRBackboneElement * Validation map for fields in type SupplyDelivery.SuppliedItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyDeliverySuppliedItem Constructor @@ -296,11 +296,113 @@ public function setQuantity(FHIRQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_DOT_SUPPLIED_ITEM, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_DOT_SUPPLIED_ITEM, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_DOT_SUPPLIED_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItem.php index 9d2a474223..0d76d43d66 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRSupplyRequestOrderedItem extends FHIRBackboneElement * Validation map for fields in type SupplyRequest.OrderedItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyRequestOrderedItem Constructor @@ -297,11 +297,113 @@ public function setQuantity(FHIRQuantity $quantity = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getItemCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getItemReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ITEM_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $v = $this->getItemCodeableConcept(); + foreach($validationRules[self::FIELD_ITEM_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_ORDERED_ITEM, self::FIELD_ITEM_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_CODEABLE_CONCEPT])) { + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_ITEM_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM_REFERENCE])) { + $v = $this->getItemReference(); + foreach($validationRules[self::FIELD_ITEM_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_ORDERED_ITEM, self::FIELD_ITEM_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM_REFERENCE])) { + $errs[self::FIELD_ITEM_REFERENCE] = []; + } + $errs[self::FIELD_ITEM_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_ORDERED_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequester.php index daccf3292b..c22609fe7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRSupplyRequestRequester extends FHIRBackboneElement * Validation map for fields in type SupplyRequest.Requester * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyRequestRequester Constructor @@ -225,11 +225,96 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_REQUESTER, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_DOT_REQUESTER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php index 501cd0f4b0..4d921714ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -646,7 +646,7 @@ class FHIRTaskInput extends FHIRBackboneElement * Validation map for fields in type Task.Input * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTaskInput Constructor @@ -2594,11 +2594,725 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_AGE])) { + $v = $this->getValueAge(); + foreach($validationRules[self::FIELD_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_AGE])) { + $errs[self::FIELD_VALUE_AGE] = []; + } + $errs[self::FIELD_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_COUNT])) { + $v = $this->getValueCount(); + foreach($validationRules[self::FIELD_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_COUNT])) { + $errs[self::FIELD_VALUE_COUNT] = []; + } + $errs[self::FIELD_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DISTANCE])) { + $v = $this->getValueDistance(); + foreach($validationRules[self::FIELD_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DISTANCE])) { + $errs[self::FIELD_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_INPUT, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php index 7e80f82626..77d5c28214 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -645,7 +645,7 @@ class FHIRTaskOutput extends FHIRBackboneElement * Validation map for fields in type Task.Output * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTaskOutput Constructor @@ -2591,11 +2591,725 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_AGE])) { + $v = $this->getValueAge(); + foreach($validationRules[self::FIELD_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_AGE])) { + $errs[self::FIELD_VALUE_AGE] = []; + } + $errs[self::FIELD_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_COUNT])) { + $v = $this->getValueCount(); + foreach($validationRules[self::FIELD_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_COUNT])) { + $errs[self::FIELD_VALUE_COUNT] = []; + } + $errs[self::FIELD_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DISTANCE])) { + $v = $this->getValueDistance(); + foreach($validationRules[self::FIELD_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DISTANCE])) { + $errs[self::FIELD_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_OUTPUT, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequester.php index 5448f89414..2d35aaf016 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRTaskRequester extends FHIRBackboneElement * Validation map for fields in type Task.Requester * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTaskRequester Constructor @@ -227,11 +227,96 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_REQUESTER, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF])) { + $v = $this->getOnBehalfOf(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_REQUESTER, self::FIELD_ON_BEHALF_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF])) { + $errs[self::FIELD_ON_BEHALF_OF] = []; + } + $errs[self::FIELD_ON_BEHALF_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php index 7abb3ad8f8..05a4cc8abf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRTaskRestriction extends FHIRBackboneElement * Validation map for fields in type Task.Restriction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTaskRestriction Constructor @@ -341,11 +341,115 @@ public function setRepetitions($repetitions = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRepetitions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPETITIONS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_RESTRICTION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_RESTRICTION, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPETITIONS])) { + $v = $this->getRepetitions(); + foreach($validationRules[self::FIELD_REPETITIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_DOT_RESTRICTION, self::FIELD_REPETITIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPETITIONS])) { + $errs[self::FIELD_REPETITIONS] = []; + } + $errs[self::FIELD_REPETITIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php index eae37316ac..3e4bfe3615 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRTestReportAction extends FHIRBackboneElement * Validation map for fields in type TestReport.Action * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportAction Constructor @@ -211,11 +211,96 @@ public function setOperation(FHIRTestReportOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERT])) { + $v = $this->getAssert(); + foreach($validationRules[self::FIELD_ASSERT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ACTION, self::FIELD_ASSERT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERT])) { + $errs[self::FIELD_ASSERT] = []; + } + $errs[self::FIELD_ASSERT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ACTION, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php index e7fcb3bb3b..95cb736b33 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRTestReportAction1 extends FHIRBackboneElement * Validation map for fields in type TestReport.Action1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportAction1 Constructor @@ -211,11 +211,96 @@ public function setOperation(FHIRTestReportOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERT])) { + $v = $this->getAssert(); + foreach($validationRules[self::FIELD_ASSERT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ACTION_1, self::FIELD_ASSERT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERT])) { + $errs[self::FIELD_ASSERT] = []; + } + $errs[self::FIELD_ASSERT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ACTION_1, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php index f1fadb5b02..49bdd12c53 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRTestReportAction2 extends FHIRBackboneElement * Validation map for fields in type TestReport.Action2 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportAction2 Constructor @@ -168,11 +168,79 @@ public function setOperation(FHIRTestReportOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ACTION_2, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php index 861643fc65..8ee8dc31bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRTestReportAssert extends FHIRBackboneElement * Validation map for fields in type TestReport.Assert * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportAssert Constructor @@ -357,11 +357,113 @@ public function setResult(FHIRTestReportActionResult $result = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMessage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResult())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESULT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ASSERT, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MESSAGE])) { + $v = $this->getMessage(); + foreach($validationRules[self::FIELD_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ASSERT, self::FIELD_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MESSAGE])) { + $errs[self::FIELD_MESSAGE] = []; + } + $errs[self::FIELD_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_ASSERT, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php index 8a7a158a6f..f9dff15d0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRTestReportOperation extends FHIRBackboneElement * Validation map for fields in type TestReport.Operation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportOperation Constructor @@ -357,11 +357,113 @@ public function setResult(FHIRTestReportActionResult $result = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMessage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResult())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESULT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_OPERATION, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MESSAGE])) { + $v = $this->getMessage(); + foreach($validationRules[self::FIELD_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_OPERATION, self::FIELD_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MESSAGE])) { + $errs[self::FIELD_MESSAGE] = []; + } + $errs[self::FIELD_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_OPERATION, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php index 65e0c7c6f8..d78f62b451 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRTestReportParticipant extends FHIRBackboneElement * Validation map for fields in type TestReport.Participant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportParticipant Constructor @@ -339,11 +339,113 @@ public function setUri($uri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_PARTICIPANT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_PARTICIPANT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URI])) { + $v = $this->getUri(); + foreach($validationRules[self::FIELD_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_PARTICIPANT, self::FIELD_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URI])) { + $errs[self::FIELD_URI] = []; + } + $errs[self::FIELD_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php index 56f885ff0d..8e26887e38 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRTestReportSetup extends FHIRBackboneElement * Validation map for fields in type TestReport.Setup * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -207,11 +207,81 @@ public function setAction(array $action = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_SETUP, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php index 4f10c12e6a..df9ba96d99 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRTestReportTeardown extends FHIRBackboneElement * Validation map for fields in type TestReport.Teardown * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -207,11 +207,81 @@ public function setAction(array $action = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_TEARDOWN, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php index 7d6cd2c82b..e124154cbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRTestReportTest extends FHIRBackboneElement * Validation map for fields in type TestReport.Test * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -359,11 +359,115 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_TEST, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_TEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_DOT_TEST, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php index 589061a4aa..34365fe946 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRTestScriptAction extends FHIRBackboneElement * Validation map for fields in type TestScript.Action * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAction Constructor @@ -221,11 +221,96 @@ public function setOperation(FHIRTestScriptOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERT])) { + $v = $this->getAssert(); + foreach($validationRules[self::FIELD_ASSERT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION, self::FIELD_ASSERT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERT])) { + $errs[self::FIELD_ASSERT] = []; + } + $errs[self::FIELD_ASSERT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php index 0dafdaabc6..f2da17d4b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRTestScriptAction1 extends FHIRBackboneElement * Validation map for fields in type TestScript.Action1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAction1 Constructor @@ -221,11 +221,96 @@ public function setOperation(FHIRTestScriptOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssert())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERT])) { + $v = $this->getAssert(); + foreach($validationRules[self::FIELD_ASSERT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION_1, self::FIELD_ASSERT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERT])) { + $errs[self::FIELD_ASSERT] = []; + } + $errs[self::FIELD_ASSERT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION_1, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php index e3cb4f780b..f54fc6d822 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRTestScriptAction2 extends FHIRBackboneElement * Validation map for fields in type TestScript.Action2 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAction2 Constructor @@ -172,11 +172,79 @@ public function setOperation(FHIRTestScriptOperation $operation = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOperation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OPERATION])) { + $v = $this->getOperation(); + foreach($validationRules[self::FIELD_OPERATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ACTION_2, self::FIELD_OPERATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION])) { + $errs[self::FIELD_OPERATION] = []; + } + $errs[self::FIELD_OPERATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php index 6d4616025f..a810d19a27 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -414,7 +414,7 @@ class FHIRTestScriptAssert extends FHIRBackboneElement * Validation map for fields in type TestScript.Assert * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptAssert Constructor @@ -1843,11 +1843,470 @@ public function setWarningOnly($warningOnly = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCompareToSourceExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompareToSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARE_TO_SOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompareToSourcePath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARE_TO_SOURCE_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDirection())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIRECTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeaderField())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEADER_FIELD] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinimumId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MINIMUM_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getNavigationLinks())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAVIGATION_LINKS] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestURL())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponseCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRuleset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidateProfileId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDATE_PROFILE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWarningOnly())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WARNING_ONLY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { + $v = $this->getCompareToSourceExpression(); + foreach($validationRules[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_COMPARE_TO_SOURCE_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { + $errs[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION] = []; + } + $errs[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARE_TO_SOURCE_ID])) { + $v = $this->getCompareToSourceId(); + foreach($validationRules[self::FIELD_COMPARE_TO_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_COMPARE_TO_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARE_TO_SOURCE_ID])) { + $errs[self::FIELD_COMPARE_TO_SOURCE_ID] = []; + } + $errs[self::FIELD_COMPARE_TO_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARE_TO_SOURCE_PATH])) { + $v = $this->getCompareToSourcePath(); + foreach($validationRules[self::FIELD_COMPARE_TO_SOURCE_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_COMPARE_TO_SOURCE_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARE_TO_SOURCE_PATH])) { + $errs[self::FIELD_COMPARE_TO_SOURCE_PATH] = []; + } + $errs[self::FIELD_COMPARE_TO_SOURCE_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIRECTION])) { + $v = $this->getDirection(); + foreach($validationRules[self::FIELD_DIRECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_DIRECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIRECTION])) { + $errs[self::FIELD_DIRECTION] = []; + } + $errs[self::FIELD_DIRECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER_FIELD])) { + $v = $this->getHeaderField(); + foreach($validationRules[self::FIELD_HEADER_FIELD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_HEADER_FIELD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER_FIELD])) { + $errs[self::FIELD_HEADER_FIELD] = []; + } + $errs[self::FIELD_HEADER_FIELD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MINIMUM_ID])) { + $v = $this->getMinimumId(); + foreach($validationRules[self::FIELD_MINIMUM_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_MINIMUM_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MINIMUM_ID])) { + $errs[self::FIELD_MINIMUM_ID] = []; + } + $errs[self::FIELD_MINIMUM_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAVIGATION_LINKS])) { + $v = $this->getNavigationLinks(); + foreach($validationRules[self::FIELD_NAVIGATION_LINKS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_NAVIGATION_LINKS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAVIGATION_LINKS])) { + $errs[self::FIELD_NAVIGATION_LINKS] = []; + } + $errs[self::FIELD_NAVIGATION_LINKS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATOR])) { + $v = $this->getOperator(); + foreach($validationRules[self::FIELD_OPERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_OPERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATOR])) { + $errs[self::FIELD_OPERATOR] = []; + } + $errs[self::FIELD_OPERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_METHOD])) { + $v = $this->getRequestMethod(); + foreach($validationRules[self::FIELD_REQUEST_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_REQUEST_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_METHOD])) { + $errs[self::FIELD_REQUEST_METHOD] = []; + } + $errs[self::FIELD_REQUEST_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_URL])) { + $v = $this->getRequestURL(); + foreach($validationRules[self::FIELD_REQUEST_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_REQUEST_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_URL])) { + $errs[self::FIELD_REQUEST_URL] = []; + } + $errs[self::FIELD_REQUEST_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE_CODE])) { + $v = $this->getResponseCode(); + foreach($validationRules[self::FIELD_RESPONSE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RESPONSE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE_CODE])) { + $errs[self::FIELD_RESPONSE_CODE] = []; + } + $errs[self::FIELD_RESPONSE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ID])) { + $v = $this->getSourceId(); + foreach($validationRules[self::FIELD_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ID])) { + $errs[self::FIELD_SOURCE_ID] = []; + } + $errs[self::FIELD_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATE_PROFILE_ID])) { + $v = $this->getValidateProfileId(); + foreach($validationRules[self::FIELD_VALIDATE_PROFILE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_VALIDATE_PROFILE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATE_PROFILE_ID])) { + $errs[self::FIELD_VALIDATE_PROFILE_ID] = []; + } + $errs[self::FIELD_VALIDATE_PROFILE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WARNING_ONLY])) { + $v = $this->getWarningOnly(); + foreach($validationRules[self::FIELD_WARNING_ONLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ASSERT, self::FIELD_WARNING_ONLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WARNING_ONLY])) { + $errs[self::FIELD_WARNING_ONLY] = []; + } + $errs[self::FIELD_WARNING_ONLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php index b76a7699d7..f77ef3ecb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -184,7 +184,7 @@ class FHIRTestScriptCapability extends FHIRBackboneElement * Validation map for fields in type TestScript.Capability * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptCapability Constructor @@ -719,11 +719,185 @@ public function setValidated($validated = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCapabilities())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAPABILITIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOrigin())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ORIGIN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getValidated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALIDATED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CAPABILITIES])) { + $v = $this->getCapabilities(); + foreach($validationRules[self::FIELD_CAPABILITIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_CAPABILITIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPABILITIES])) { + $errs[self::FIELD_CAPABILITIES] = []; + } + $errs[self::FIELD_CAPABILITIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIRED])) { + $v = $this->getRequired(); + foreach($validationRules[self::FIELD_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIRED])) { + $errs[self::FIELD_REQUIRED] = []; + } + $errs[self::FIELD_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALIDATED])) { + $v = $this->getValidated(); + foreach($validationRules[self::FIELD_VALIDATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_CAPABILITY, self::FIELD_VALIDATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALIDATED])) { + $errs[self::FIELD_VALIDATED] = []; + } + $errs[self::FIELD_VALIDATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php index 3ab1fc1896..d0f93196f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptDestination extends FHIRBackboneElement * Validation map for fields in type TestScript.Destination * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptDestination Constructor @@ -254,11 +254,96 @@ public function setProfile(FHIRCoding $profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIndex())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDEX] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INDEX])) { + $v = $this->getIndex(); + foreach($validationRules[self::FIELD_INDEX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_DESTINATION, self::FIELD_INDEX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDEX])) { + $errs[self::FIELD_INDEX] = []; + } + $errs[self::FIELD_INDEX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_DESTINATION, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php index 947fce5582..b2a9587206 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRTestScriptFixture extends FHIRBackboneElement * Validation map for fields in type TestScript.Fixture * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptFixture Constructor @@ -340,11 +340,113 @@ public function setResource(FHIRReference $resource = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAutocreate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTOCREATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAutodelete())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTODELETE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTOCREATE])) { + $v = $this->getAutocreate(); + foreach($validationRules[self::FIELD_AUTOCREATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_FIXTURE, self::FIELD_AUTOCREATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTOCREATE])) { + $errs[self::FIELD_AUTOCREATE] = []; + } + $errs[self::FIELD_AUTOCREATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTODELETE])) { + $v = $this->getAutodelete(); + foreach($validationRules[self::FIELD_AUTODELETE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_FIXTURE, self::FIELD_AUTODELETE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTODELETE])) { + $errs[self::FIELD_AUTODELETE] = []; + } + $errs[self::FIELD_AUTODELETE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_FIXTURE, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php index ce25cd6328..4801bb0df6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptLink extends FHIRBackboneElement * Validation map for fields in type TestScript.Link * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptLink Constructor @@ -276,11 +276,96 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_LINK, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_LINK, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php index 8530294daf..27f399768b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRTestScriptMetadata extends FHIRBackboneElement * Validation map for fields in type TestScript.Metadata * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CAPABILITY => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -298,11 +298,100 @@ public function setLink(array $link = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCapability())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CAPABILITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CAPABILITY])) { + $v = $this->getCapability(); + foreach($validationRules[self::FIELD_CAPABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_METADATA, self::FIELD_CAPABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CAPABILITY])) { + $errs[self::FIELD_CAPABILITY] = []; + } + $errs[self::FIELD_CAPABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_METADATA, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php index 20cd3fd0d9..9ee33740e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -312,7 +312,7 @@ class FHIRTestScriptOperation extends FHIRBackboneElement * Validation map for fields in type TestScript.Operation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptOperation Constructor @@ -1321,11 +1321,336 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncodeRequestUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCODE_REQUEST_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getParams())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARAMS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRequestHeader())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUEST_HEADER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequestId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponseId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCEPT])) { + $v = $this->getAccept(); + foreach($validationRules[self::FIELD_ACCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_ACCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCEPT])) { + $errs[self::FIELD_ACCEPT] = []; + } + $errs[self::FIELD_ACCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCODE_REQUEST_URL])) { + $v = $this->getEncodeRequestUrl(); + foreach($validationRules[self::FIELD_ENCODE_REQUEST_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_ENCODE_REQUEST_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCODE_REQUEST_URL])) { + $errs[self::FIELD_ENCODE_REQUEST_URL] = []; + } + $errs[self::FIELD_ENCODE_REQUEST_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMS])) { + $v = $this->getParams(); + foreach($validationRules[self::FIELD_PARAMS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_PARAMS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMS])) { + $errs[self::FIELD_PARAMS] = []; + } + $errs[self::FIELD_PARAMS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_HEADER])) { + $v = $this->getRequestHeader(); + foreach($validationRules[self::FIELD_REQUEST_HEADER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_REQUEST_HEADER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_HEADER])) { + $errs[self::FIELD_REQUEST_HEADER] = []; + } + $errs[self::FIELD_REQUEST_HEADER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ID])) { + $v = $this->getRequestId(); + foreach($validationRules[self::FIELD_REQUEST_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_REQUEST_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ID])) { + $errs[self::FIELD_REQUEST_ID] = []; + } + $errs[self::FIELD_REQUEST_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE_ID])) { + $v = $this->getResponseId(); + foreach($validationRules[self::FIELD_RESPONSE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_RESPONSE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE_ID])) { + $errs[self::FIELD_RESPONSE_ID] = []; + } + $errs[self::FIELD_RESPONSE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ID])) { + $v = $this->getSourceId(); + foreach($validationRules[self::FIELD_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ID])) { + $errs[self::FIELD_SOURCE_ID] = []; + } + $errs[self::FIELD_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_ID])) { + $v = $this->getTargetId(); + foreach($validationRules[self::FIELD_TARGET_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_TARGET_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_ID])) { + $errs[self::FIELD_TARGET_ID] = []; + } + $errs[self::FIELD_TARGET_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_OPERATION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php index bf30c4a687..37f43eb221 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptOrigin extends FHIRBackboneElement * Validation map for fields in type TestScript.Origin * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptOrigin Constructor @@ -254,11 +254,96 @@ public function setProfile(FHIRCoding $profile = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIndex())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDEX] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_INDEX])) { + $v = $this->getIndex(); + foreach($validationRules[self::FIELD_INDEX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ORIGIN, self::FIELD_INDEX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDEX])) { + $errs[self::FIELD_INDEX] = []; + } + $errs[self::FIELD_INDEX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_ORIGIN, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam.php index 652b23a143..5bef765afc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRTestScriptParam extends FHIRBackboneElement * Validation map for fields in type TestScript.Param * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptParam Constructor @@ -281,11 +281,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_PARAM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_PARAM, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1.php index 28104fb695..00961cd75d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRTestScriptParam1 extends FHIRBackboneElement * Validation map for fields in type TestScript.Param1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptParam1 Constructor @@ -281,11 +281,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_PARAM_1, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_PARAM_1, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2.php index 851492d5f9..1bf94c378f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRTestScriptParam2 extends FHIRBackboneElement * Validation map for fields in type TestScript.Param2 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptParam2 Constructor @@ -281,11 +281,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_PARAM_2, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_PARAM_2, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3.php index 9e2632d26a..8216fcd343 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRTestScriptParam3 extends FHIRBackboneElement * Validation map for fields in type TestScript.Param3 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptParam3 Constructor @@ -281,11 +281,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_PARAM_3, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_PARAM_3, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php index c02a9fd201..0b7b9296a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRTestScriptRequestHeader extends FHIRBackboneElement * Validation map for fields in type TestScript.RequestHeader * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptRequestHeader Constructor @@ -275,11 +275,96 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getField())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIELD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FIELD])) { + $v = $this->getField(); + foreach($validationRules[self::FIELD_FIELD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_REQUEST_HEADER, self::FIELD_FIELD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIELD])) { + $errs[self::FIELD_FIELD] = []; + } + $errs[self::FIELD_FIELD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_REQUEST_HEADER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule.php index 9561bfe442..16630f18e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRTestScriptRule extends FHIRBackboneElement * Validation map for fields in type TestScript.Rule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptRule Constructor @@ -261,11 +261,98 @@ public function setResource(FHIRReference $resource = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARAM])) { + $v = $this->getParam(); + foreach($validationRules[self::FIELD_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULE, self::FIELD_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAM])) { + $errs[self::FIELD_PARAM] = []; + } + $errs[self::FIELD_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULE, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1.php index 4306552942..43fe8043d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptRule1 extends FHIRBackboneElement * Validation map for fields in type TestScript.Rule1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptRule1 Constructor @@ -292,11 +292,98 @@ public function setRuleId($ruleId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRuleId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULE_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARAM])) { + $v = $this->getParam(); + foreach($validationRules[self::FIELD_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULE_1, self::FIELD_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAM])) { + $errs[self::FIELD_PARAM] = []; + } + $errs[self::FIELD_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE_ID])) { + $v = $this->getRuleId(); + foreach($validationRules[self::FIELD_RULE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULE_1, self::FIELD_RULE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE_ID])) { + $errs[self::FIELD_RULE_ID] = []; + } + $errs[self::FIELD_RULE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2.php index 9899b1866e..c1d2d92f74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptRule2 extends FHIRBackboneElement * Validation map for fields in type TestScript.Rule2 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptRule2 Constructor @@ -292,11 +292,98 @@ public function setRuleId($ruleId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRuleId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULE_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARAM])) { + $v = $this->getParam(); + foreach($validationRules[self::FIELD_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULE_2, self::FIELD_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAM])) { + $errs[self::FIELD_PARAM] = []; + } + $errs[self::FIELD_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE_ID])) { + $v = $this->getRuleId(); + foreach($validationRules[self::FIELD_RULE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULE_2, self::FIELD_RULE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE_ID])) { + $errs[self::FIELD_RULE_ID] = []; + } + $errs[self::FIELD_RULE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3.php index b4f381e4b9..ef150a03dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptRule3 extends FHIRBackboneElement * Validation map for fields in type TestScript.Rule3 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptRule3 Constructor @@ -292,11 +292,98 @@ public function setRuleId($ruleId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getParam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRuleId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULE_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PARAM])) { + $v = $this->getParam(); + foreach($validationRules[self::FIELD_PARAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULE_3, self::FIELD_PARAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAM])) { + $errs[self::FIELD_PARAM] = []; + } + $errs[self::FIELD_PARAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE_ID])) { + $v = $this->getRuleId(); + foreach($validationRules[self::FIELD_RULE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULE_3, self::FIELD_RULE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE_ID])) { + $errs[self::FIELD_RULE_ID] = []; + } + $errs[self::FIELD_RULE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset.php index 6779a4b67a..0e26696afa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRTestScriptRuleset extends FHIRBackboneElement * Validation map for fields in type TestScript.Ruleset * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RULE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -265,11 +265,98 @@ public function setRule(array $rule = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULESET, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULESET, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1.php index 81c67a9448..6f97523aac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTestScriptRuleset1 extends FHIRBackboneElement * Validation map for fields in type TestScript.Ruleset1 * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptRuleset1 Constructor @@ -292,11 +292,98 @@ public function setRulesetId($rulesetId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getRule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRulesetId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULESET_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULESET_1, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET_ID])) { + $v = $this->getRulesetId(); + foreach($validationRules[self::FIELD_RULESET_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_RULESET_1, self::FIELD_RULESET_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET_ID])) { + $errs[self::FIELD_RULESET_ID] = []; + } + $errs[self::FIELD_RULESET_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php index a240e12f0f..9089bcf6f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRTestScriptSetup extends FHIRBackboneElement * Validation map for fields in type TestScript.Setup * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -212,11 +212,81 @@ public function setAction(array $action = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_SETUP, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php index cc25393272..cdd0b66a3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRTestScriptTeardown extends FHIRBackboneElement * Validation map for fields in type TestScript.Teardown * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -212,11 +212,81 @@ public function setAction(array $action = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEARDOWN, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php index 80735f4f6e..8dd1edc4ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRTestScriptTest extends FHIRBackboneElement * Validation map for fields in type TestScript.Test * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -364,11 +364,115 @@ public function setName($name = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEST, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_TEST, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php index 8e578ae41d..10b9248cac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -200,7 +200,7 @@ class FHIRTestScriptVariable extends FHIRBackboneElement * Validation map for fields in type TestScript.Variable * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptVariable Constructor @@ -747,11 +747,198 @@ public function setSourceId($sourceId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDefaultValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeaderField())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEADER_FIELD] = $fieldErrs; + } + } + if (null !== ($v = $this->getHint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE])) { + $v = $this->getDefaultValue(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_DEFAULT_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE])) { + $errs[self::FIELD_DEFAULT_VALUE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER_FIELD])) { + $v = $this->getHeaderField(); + foreach($validationRules[self::FIELD_HEADER_FIELD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_HEADER_FIELD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER_FIELD])) { + $errs[self::FIELD_HEADER_FIELD] = []; + } + $errs[self::FIELD_HEADER_FIELD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HINT])) { + $v = $this->getHint(); + foreach($validationRules[self::FIELD_HINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_HINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HINT])) { + $errs[self::FIELD_HINT] = []; + } + $errs[self::FIELD_HINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ID])) { + $v = $this->getSourceId(); + foreach($validationRules[self::FIELD_SOURCE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_DOT_VARIABLE, self::FIELD_SOURCE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ID])) { + $errs[self::FIELD_SOURCE_ID] = []; + } + $errs[self::FIELD_SOURCE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php index 76f53eec24..40213ef4ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRValueSetCompose extends FHIRBackboneElement * Validation map for fields in type ValueSet.Compose * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_INCLUDE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -463,11 +463,134 @@ public function setLockedDate($lockedDate = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getExclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCLUDE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInactive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INCLUDE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLockedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCKED_DATE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INACTIVE])) { + $v = $this->getInactive(); + foreach($validationRules[self::FIELD_INACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_INACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INACTIVE])) { + $errs[self::FIELD_INACTIVE] = []; + } + $errs[self::FIELD_INACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCLUDE])) { + $v = $this->getInclude(); + foreach($validationRules[self::FIELD_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCLUDE])) { + $errs[self::FIELD_INCLUDE] = []; + } + $errs[self::FIELD_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCKED_DATE])) { + $v = $this->getLockedDate(); + foreach($validationRules[self::FIELD_LOCKED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_COMPOSE, self::FIELD_LOCKED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCKED_DATE])) { + $errs[self::FIELD_LOCKED_DATE] = []; + } + $errs[self::FIELD_LOCKED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php index e4cfdeb5b5..51c6f2da57 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRValueSetConcept extends FHIRBackboneElement * Validation map for fields in type ValueSet.Concept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetConcept Constructor @@ -366,11 +366,115 @@ public function setDisplay($display = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONCEPT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php index 6714e40d45..09df698e04 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -194,7 +194,7 @@ class FHIRValueSetContains extends FHIRBackboneElement * Validation map for fields in type ValueSet.Contains * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetContains Constructor @@ -755,11 +755,202 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbstract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABSTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContains())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDesignation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESIGNATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getInactive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABSTRACT])) { + $v = $this->getAbstract(); + foreach($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_ABSTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABSTRACT])) { + $errs[self::FIELD_ABSTRACT] = []; + } + $errs[self::FIELD_ABSTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINS])) { + $v = $this->getContains(); + foreach($validationRules[self::FIELD_CONTAINS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_CONTAINS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINS])) { + $errs[self::FIELD_CONTAINS] = []; + } + $errs[self::FIELD_CONTAINS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INACTIVE])) { + $v = $this->getInactive(); + foreach($validationRules[self::FIELD_INACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_INACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INACTIVE])) { + $errs[self::FIELD_INACTIVE] = []; + } + $errs[self::FIELD_INACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_CONTAINS, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php index 71cf701c2b..9335ccbf65 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRValueSetDesignation extends FHIRBackboneElement * Validation map for fields in type ValueSet.Designation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetDesignation Constructor @@ -328,11 +328,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DESIGNATION, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DESIGNATION, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_DESIGNATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php index de1899d458..2f75d3cfce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -170,7 +170,7 @@ class FHIRValueSetExpansion extends FHIRBackboneElement * Validation map for fields in type ValueSet.Expansion * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetExpansion Constructor @@ -615,11 +615,168 @@ public function setTotal($total = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContains())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTimestamp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMESTAMP] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTAINS])) { + $v = $this->getContains(); + foreach($validationRules[self::FIELD_CONTAINS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_CONTAINS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINS])) { + $errs[self::FIELD_CONTAINS] = []; + } + $errs[self::FIELD_CONTAINS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET])) { + $v = $this->getOffset(); + foreach($validationRules[self::FIELD_OFFSET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_OFFSET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET])) { + $errs[self::FIELD_OFFSET] = []; + } + $errs[self::FIELD_OFFSET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMESTAMP])) { + $v = $this->getTimestamp(); + foreach($validationRules[self::FIELD_TIMESTAMP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_TIMESTAMP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMESTAMP])) { + $errs[self::FIELD_TIMESTAMP] = []; + } + $errs[self::FIELD_TIMESTAMP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_EXPANSION, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php index 2fefb78c1f..a87680cdaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRValueSetFilter extends FHIRBackboneElement * Validation map for fields in type ValueSet.Filter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetFilter Constructor @@ -353,11 +353,113 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getOp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OP] = $fieldErrs; + } + } + if (null !== ($v = $this->getProperty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROPERTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_OP])) { + $v = $this->getOp(); + foreach($validationRules[self::FIELD_OP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_OP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OP])) { + $errs[self::FIELD_OP] = []; + } + $errs[self::FIELD_OP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_FILTER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php index 408ce477d2..65d559d5d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -149,7 +149,7 @@ class FHIRValueSetInclude extends FHIRBackboneElement * Validation map for fields in type ValueSet.Include * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetInclude Constructor @@ -561,11 +561,153 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FILTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValueSet())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUE_SET, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FILTER])) { + $v = $this->getFilter(); + foreach($validationRules[self::FIELD_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FILTER])) { + $errs[self::FIELD_FILTER] = []; + } + $errs[self::FIELD_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET])) { + $v = $this->getValueSet(); + foreach($validationRules[self::FIELD_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET])) { + $errs[self::FIELD_VALUE_SET] = []; + } + $errs[self::FIELD_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_INCLUDE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php index 06d355812d..55936ed197 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -182,7 +182,7 @@ class FHIRValueSetParameter extends FHIRBackboneElement * Validation map for fields in type ValueSet.Parameter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSetParameter Constructor @@ -652,11 +652,181 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET_DOT_PARAMETER, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php index 7b09215db4..b3e7950d65 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -294,7 +294,7 @@ class FHIRVisionPrescriptionDispense extends FHIRBackboneElement * Validation map for fields in type VisionPrescription.Dispense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionPrescriptionDispense Constructor @@ -1220,11 +1220,319 @@ public function setSphere($sphere = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAdd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADD] = $fieldErrs; + } + } + if (null !== ($v = $this->getAxis())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AXIS] = $fieldErrs; + } + } + if (null !== ($v = $this->getBackCurve())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BACK_CURVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBrand())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BRAND] = $fieldErrs; + } + } + if (null !== ($v = $this->getColor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCylinder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CYLINDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiameter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAMETER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEye())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EYE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPower())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POWER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrism())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRISM] = $fieldErrs; + } + } + if (null !== ($v = $this->getProduct())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSphere())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPHERE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADD])) { + $v = $this->getAdd(); + foreach($validationRules[self::FIELD_ADD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_ADD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADD])) { + $errs[self::FIELD_ADD] = []; + } + $errs[self::FIELD_ADD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AXIS])) { + $v = $this->getAxis(); + foreach($validationRules[self::FIELD_AXIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_AXIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AXIS])) { + $errs[self::FIELD_AXIS] = []; + } + $errs[self::FIELD_AXIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BACK_CURVE])) { + $v = $this->getBackCurve(); + foreach($validationRules[self::FIELD_BACK_CURVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_BACK_CURVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BACK_CURVE])) { + $errs[self::FIELD_BACK_CURVE] = []; + } + $errs[self::FIELD_BACK_CURVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BRAND])) { + $v = $this->getBrand(); + foreach($validationRules[self::FIELD_BRAND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_BRAND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BRAND])) { + $errs[self::FIELD_BRAND] = []; + } + $errs[self::FIELD_BRAND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLOR])) { + $v = $this->getColor(); + foreach($validationRules[self::FIELD_COLOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_COLOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLOR])) { + $errs[self::FIELD_COLOR] = []; + } + $errs[self::FIELD_COLOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CYLINDER])) { + $v = $this->getCylinder(); + foreach($validationRules[self::FIELD_CYLINDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_CYLINDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CYLINDER])) { + $errs[self::FIELD_CYLINDER] = []; + } + $errs[self::FIELD_CYLINDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAMETER])) { + $v = $this->getDiameter(); + foreach($validationRules[self::FIELD_DIAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_DIAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAMETER])) { + $errs[self::FIELD_DIAMETER] = []; + } + $errs[self::FIELD_DIAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EYE])) { + $v = $this->getEye(); + foreach($validationRules[self::FIELD_EYE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_EYE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EYE])) { + $errs[self::FIELD_EYE] = []; + } + $errs[self::FIELD_EYE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POWER])) { + $v = $this->getPower(); + foreach($validationRules[self::FIELD_POWER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_POWER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POWER])) { + $errs[self::FIELD_POWER] = []; + } + $errs[self::FIELD_POWER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRISM])) { + $v = $this->getPrism(); + foreach($validationRules[self::FIELD_PRISM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_PRISM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRISM])) { + $errs[self::FIELD_PRISM] = []; + } + $errs[self::FIELD_PRISM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT])) { + $v = $this->getProduct(); + foreach($validationRules[self::FIELD_PRODUCT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_PRODUCT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT])) { + $errs[self::FIELD_PRODUCT] = []; + } + $errs[self::FIELD_PRODUCT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPHERE])) { + $v = $this->getSphere(); + foreach($validationRules[self::FIELD_SPHERE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION_DOT_DISPENSE, self::FIELD_SPHERE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPHERE])) { + $errs[self::FIELD_SPHERE] = []; + } + $errs[self::FIELD_SPHERE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBase64Binary.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBase64Binary.php index bf571bc1db..0c38987eff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBase64Binary.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBase64Binary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRBase64Binary extends FHIRElement * Validation map for fields in type base64Binary * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBase64Binary Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASE_64BINARY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBindingStrength.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBindingStrength.php index 461e2cc8c2..992ea017b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBindingStrength.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBindingStrength.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBindingStrength extends FHIRElement * Validation map for fields in type BindingStrength * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBindingStrength Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINDING_STRENGTH, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBoolean.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBoolean.php index 25ef4e0eb7..7e97e8b1ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBoolean.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBoolean.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBoolean extends FHIRElement * Validation map for fields in type boolean * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBoolean Constructor @@ -170,11 +170,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BOOLEAN, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBundleType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBundleType.php index fadd16a645..91176d1bee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBundleType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBundleType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBundleType extends FHIRElement * Validation map for fields in type BundleType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundleType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCapabilityStatementKind.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCapabilityStatementKind.php index c0d0b2e282..1207237220 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCapabilityStatementKind.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCapabilityStatementKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCapabilityStatementKind extends FHIRElement * Validation map for fields in type CapabilityStatementKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCapabilityStatementKind Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanActivityStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanActivityStatus.php index d161e791df..a9093e16b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanActivityStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanActivityStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCarePlanActivityStatus extends FHIRElement * Validation map for fields in type CarePlanActivityStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanActivityStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanIntent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanIntent.php index 88d079ab5f..6e2fcc7675 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCarePlanIntent extends FHIRElement * Validation map for fields in type CarePlanIntent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanIntent Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_INTENT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanStatus.php index deb2dfab76..2694aea285 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCarePlanStatus extends FHIRElement * Validation map for fields in type CarePlanStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlanStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCareTeamStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCareTeamStatus.php index 2c7aae7a83..0032fb4da0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCareTeamStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCareTeamStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCareTeamStatus extends FHIRElement * Validation map for fields in type CareTeamStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCareTeamStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRChargeItemStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRChargeItemStatus.php index 8202324153..55d98c17b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRChargeItemStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRChargeItemStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRChargeItemStatus extends FHIRElement * Validation map for fields in type ChargeItemStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRChargeItemStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRClinicalImpressionStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRClinicalImpressionStatus.php index f7c57fede7..b8710aaeec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRClinicalImpressionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRClinicalImpressionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRClinicalImpressionStatus extends FHIRElement * Validation map for fields in type ClinicalImpressionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpressionStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCode.php index ce1d62731d..3796a6fe77 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRCode extends FHIRElement * Validation map for fields in type code * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCode Constructor @@ -172,11 +172,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemContentMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemContentMode.php index 71ad5ee1e9..b5d0f4c8e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemContentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemContentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCodeSystemContentMode extends FHIRElement * Validation map for fields in type CodeSystemContentMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemContentMode Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_CONTENT_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemHierarchyMeaning.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemHierarchyMeaning.php index 6434bdacd3..07cb757280 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemHierarchyMeaning.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemHierarchyMeaning.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCodeSystemHierarchyMeaning extends FHIRElement * Validation map for fields in type CodeSystemHierarchyMeaning * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystemHierarchyMeaning Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_HIERARCHY_MEANING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeableConcept.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeableConcept.php index 9c2a6150d4..fb845d9415 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeableConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeableConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRCodeableConcept extends FHIRElement * Validation map for fields in type CodeableConcept * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeableConcept Constructor @@ -294,11 +294,86 @@ public function setText($text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCoding())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODING])) { + $v = $this->getCoding(); + foreach($validationRules[self::FIELD_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODEABLE_CONCEPT, self::FIELD_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODING])) { + $errs[self::FIELD_CODING] = []; + } + $errs[self::FIELD_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODEABLE_CONCEPT, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCoding.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCoding.php index 0b8e51e57d..678beaea8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCoding.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCoding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -159,7 +159,7 @@ class FHIRCoding extends FHIRElement * Validation map for fields in type Coding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoding Constructor @@ -521,11 +521,135 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUserSelected())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USER_SELECTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USER_SELECTED])) { + $v = $this->getUserSelected(); + foreach($validationRules[self::FIELD_USER_SELECTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_USER_SELECTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USER_SELECTED])) { + $errs[self::FIELD_USER_SELECTED] = []; + } + $errs[self::FIELD_USER_SELECTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODING, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompartmentType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompartmentType.php index 00670f432e..c4f7a42a94 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompartmentType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompartmentType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCompartmentType extends FHIRElement * Validation map for fields in type CompartmentType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompartmentType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionAttestationMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionAttestationMode.php index 0648c1dbe1..a777a38c4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionAttestationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionAttestationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCompositionAttestationMode extends FHIRElement * Validation map for fields in type CompositionAttestationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionAttestationMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionStatus.php index db5e9d7cbd..a9db81abde 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCompositionStatus extends FHIRElement * Validation map for fields in type CompositionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompositionStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapEquivalence.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapEquivalence.php index d30e960c1d..62471ccb76 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapEquivalence.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapEquivalence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRConceptMapEquivalence extends FHIRElement * Validation map for fields in type ConceptMapEquivalence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapEquivalence Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapGroupUnmappedMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapGroupUnmappedMode.php index d5206577a3..b256c5de72 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapGroupUnmappedMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapGroupUnmappedMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConceptMapGroupUnmappedMode extends FHIRElement * Validation map for fields in type ConceptMapGroupUnmappedMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMapGroupUnmappedMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_GROUP_UNMAPPED_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionClinicalStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionClinicalStatusCodes.php index 04b250df5f..7e1ec503da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionClinicalStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionClinicalStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConditionClinicalStatusCodes extends FHIRElement * Validation map for fields in type ConditionClinicalStatusCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionClinicalStatusCodes Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_CLINICAL_STATUS_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionVerificationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionVerificationStatus.php index 93250572c8..280770da84 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionVerificationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionVerificationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRConditionVerificationStatus extends FHIRElement * Validation map for fields in type ConditionVerificationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionVerificationStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION_VERIFICATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalDeleteStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalDeleteStatus.php index 520cfb96ee..c928c81685 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalDeleteStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalDeleteStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConditionalDeleteStatus extends FHIRElement * Validation map for fields in type ConditionalDeleteStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionalDeleteStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITIONAL_DELETE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalReadStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalReadStatus.php index 28a2b7f962..1fa9d2002a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalReadStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalReadStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConditionalReadStatus extends FHIRElement * Validation map for fields in type ConditionalReadStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConditionalReadStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITIONAL_READ_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConfidentialityClassification.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConfidentialityClassification.php index 6fa427aa8b..8ae41b9053 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConfidentialityClassification.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConfidentialityClassification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConfidentialityClassification extends FHIRElement * Validation map for fields in type ConfidentialityClassification * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConfidentialityClassification Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONFIDENTIALITY_CLASSIFICATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentDataMeaning.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentDataMeaning.php index f1810168be..39146856ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentDataMeaning.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentDataMeaning.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConsentDataMeaning extends FHIRElement * Validation map for fields in type ConsentDataMeaning * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentDataMeaning Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_DATA_MEANING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentExceptType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentExceptType.php index afd6f2e27e..baadc29ddc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentExceptType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentExceptType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRConsentExceptType extends FHIRElement * Validation map for fields in type ConsentExceptType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentExceptType Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_EXCEPT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentState.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentState.php index c6de1a44a6..6631f6e6ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentState.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConsentState extends FHIRElement * Validation map for fields in type ConsentState * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsentState Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT_STATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConstraintSeverity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConstraintSeverity.php index 196878df2a..9e264d3c03 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConstraintSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConstraintSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConstraintSeverity extends FHIRElement * Validation map for fields in type ConstraintSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConstraintSeverity Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactDetail.php index 05438b7bdd..b554355411 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRContactDetail extends FHIRElement * Validation map for fields in type ContactDetail * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactDetail Constructor @@ -295,11 +295,86 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_DETAIL, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_DETAIL, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPoint.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPoint.php index 561498b7aa..977f67acb1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPoint.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRContactPoint extends FHIRElement * Validation map for fields in type ContactPoint * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactPoint Constructor @@ -460,11 +460,135 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getRank())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RANK] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RANK])) { + $v = $this->getRank(); + foreach($validationRules[self::FIELD_RANK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_RANK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RANK])) { + $errs[self::FIELD_RANK] = []; + } + $errs[self::FIELD_RANK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointSystem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointSystem.php index 406fa3ff78..734f87f73c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContactPointSystem extends FHIRElement * Validation map for fields in type ContactPointSystem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactPointSystem Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_SYSTEM, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointUse.php index fc0f980c39..944a1821b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContactPointUse extends FHIRElement * Validation map for fields in type ContactPointUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContactPointUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContentType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContentType.php index 004113f4b3..a1e919eea6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContentType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContentType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContentType extends FHIRElement * Validation map for fields in type ContentType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContentType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTENT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContractResourceStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContractResourceStatusCodes.php index 9a20942e7d..f1f558046e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContractResourceStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContractResourceStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContractResourceStatusCodes extends FHIRElement * Validation map for fields in type ContractResourceStatusCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContractResourceStatusCodes Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT_RESOURCE_STATUS_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributor.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributor.php index b44fc3b020..8c80a4b319 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributor.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRContributor extends FHIRElement * Validation map for fields in type Contributor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContributor Constructor @@ -355,11 +355,103 @@ public function setType(FHIRContributorType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributorType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributorType.php index a889c9d61e..32ec03ec79 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributorType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRContributorType extends FHIRElement * Validation map for fields in type ContributorType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContributorType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataElementStringency.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataElementStringency.php index 7c5191e2fd..10f190337c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataElementStringency.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataElementStringency.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDataElementStringency extends FHIRElement * Validation map for fields in type DataElementStringency * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataElementStringency Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_STRINGENCY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement.php index 6a65b52e28..e944e818ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -165,7 +165,7 @@ class FHIRDataRequirement extends FHIRElement * Validation map for fields in type DataRequirement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataRequirement Constructor @@ -656,11 +656,143 @@ public function setType($type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCodeFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE_FILTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDateFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATE_FILTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMustSupport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MUST_SUPPORT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE_FILTER])) { + $v = $this->getCodeFilter(); + foreach($validationRules[self::FIELD_CODE_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_CODE_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_FILTER])) { + $errs[self::FIELD_CODE_FILTER] = []; + } + $errs[self::FIELD_CODE_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_FILTER])) { + $v = $this->getDateFilter(); + foreach($validationRules[self::FIELD_DATE_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_DATE_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_FILTER])) { + $errs[self::FIELD_DATE_FILTER] = []; + } + $errs[self::FIELD_DATE_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MUST_SUPPORT])) { + $v = $this->getMustSupport(); + foreach($validationRules[self::FIELD_MUST_SUPPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_MUST_SUPPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MUST_SUPPORT])) { + $errs[self::FIELD_MUST_SUPPORT] = []; + } + $errs[self::FIELD_MUST_SUPPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php index 4b59268f58..1bbd33eb8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -189,7 +189,7 @@ class FHIRDataRequirementCodeFilter extends FHIRElement * Validation map for fields in type DataRequirement.CodeFilter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataRequirementCodeFilter Constructor @@ -694,11 +694,158 @@ public function setValueSetString($valueSetString = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValueCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUE_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getValueCodeableConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUE_CODEABLE_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getValueCoding())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUE_CODING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValueSetReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSetString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET_STRING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_CODE_FILTER, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_CODE_FILTER, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_CODE_FILTER, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_CODE_FILTER, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET_REFERENCE])) { + $v = $this->getValueSetReference(); + foreach($validationRules[self::FIELD_VALUE_SET_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_CODE_FILTER, self::FIELD_VALUE_SET_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET_REFERENCE])) { + $errs[self::FIELD_VALUE_SET_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_SET_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET_STRING])) { + $v = $this->getValueSetString(); + foreach($validationRules[self::FIELD_VALUE_SET_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_CODE_FILTER, self::FIELD_VALUE_SET_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET_STRING])) { + $errs[self::FIELD_VALUE_SET_STRING] = []; + } + $errs[self::FIELD_VALUE_SET_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php index 5ff5b1b10c..2be616201d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -164,7 +164,7 @@ class FHIRDataRequirementDateFilter extends FHIRElement * Validation map for fields in type DataRequirement.DateFilter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDataRequirementDateFilter Constructor @@ -447,11 +447,118 @@ public function setValuePeriod(FHIRPeriod $valuePeriod = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_DATE_FILTER, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_DATE_FILTER, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_DATE_FILTER, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_REQUIREMENT_DOT_DATE_FILTER, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDate.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDate.php index 44fa6815b4..40721c65ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDate.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRDate extends FHIRElement * Validation map for fields in type date * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDate Constructor @@ -172,11 +172,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDateTime.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDateTime.php index 40e84539b8..42387eb533 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDateTime.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDateTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRDateTime extends FHIRElement * Validation map for fields in type dateTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDateTime Constructor @@ -174,11 +174,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDaysOfWeek.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDaysOfWeek.php index 5ed13863b7..d62b61e71e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDaysOfWeek.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDaysOfWeek.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDaysOfWeek extends FHIRElement * Validation map for fields in type DaysOfWeek * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDaysOfWeek Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DAYS_OF_WEEK, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDecimal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDecimal.php index 7bc52f3815..cfb1b56234 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDecimal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDecimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRDecimal extends FHIRElement * Validation map for fields in type decimal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDecimal Constructor @@ -172,11 +172,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DECIMAL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDetectedIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDetectedIssueSeverity.php index 22666e889a..ec888c819d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDetectedIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDetectedIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDetectedIssueSeverity extends FHIRElement * Validation map for fields in type DetectedIssueSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDetectedIssueSeverity Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationState.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationState.php index 352a138636..2a2e830ccd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationState.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricCalibrationState extends FHIRElement * Validation map for fields in type DeviceMetricCalibrationState * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCalibrationState Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_STATE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationType.php index 84eb2a8144..eaeb5d99ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricCalibrationType extends FHIRElement * Validation map for fields in type DeviceMetricCalibrationType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCalibrationType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCategory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCategory.php index 967dceb2ed..7e00d34cd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricCategory extends FHIRElement * Validation map for fields in type DeviceMetricCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricCategory Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricColor.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricColor.php index c3f76bfbef..5e3dbec3bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricColor.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricColor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricColor extends FHIRElement * Validation map for fields in type DeviceMetricColor * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricColor Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_COLOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricOperationalStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricOperationalStatus.php index ed5ebcd7ea..3997a398e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricOperationalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricOperationalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceMetricOperationalStatus extends FHIRElement * Validation map for fields in type DeviceMetricOperationalStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetricOperationalStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_OPERATIONAL_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceUseStatementStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceUseStatementStatus.php index 310c3835a0..ceb8c80e4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceUseStatementStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceUseStatementStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDeviceUseStatementStatus extends FHIRElement * Validation map for fields in type DeviceUseStatementStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceUseStatementStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiagnosticReportStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiagnosticReportStatus.php index b21e9cf937..37e17da046 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiagnosticReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiagnosticReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDiagnosticReportStatus extends FHIRElement * Validation map for fields in type DiagnosticReportStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReportStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDigitalMediaType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDigitalMediaType.php index 8e0e84342e..f49c000cae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDigitalMediaType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDigitalMediaType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDigitalMediaType extends FHIRElement * Validation map for fields in type DigitalMediaType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDigitalMediaType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIGITAL_MEDIA_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiscriminatorType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiscriminatorType.php index 580d803ae5..6baa2d4e1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiscriminatorType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiscriminatorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDiscriminatorType extends FHIRElement * Validation map for fields in type DiscriminatorType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiscriminatorType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DISCRIMINATOR_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentMode.php index ca7d18044d..eb877d629a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDocumentMode extends FHIRElement * Validation map for fields in type DocumentMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentReferenceStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentReferenceStatus.php index c19ad7ed69..fb3648015c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentReferenceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentReferenceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRDocumentReferenceStatus extends FHIRElement * Validation map for fields in type DocumentReferenceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentReferenceStatus Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentRelationshipType.php index ae7fc42505..6977a494e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDocumentRelationshipType extends FHIRElement * Validation map for fields in type DocumentRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDocumentRelationshipType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDosage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDosage.php index f38091f6e5..1aeb782a28 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -329,7 +329,7 @@ class FHIRDosage extends FHIRElement * Validation map for fields in type Dosage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDosage Constructor @@ -1216,11 +1216,358 @@ public function setTiming(FHIRTiming $timing = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAdditionalInstruction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDITIONAL_INSTRUCTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerAdministration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_ADMINISTRATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerLifetime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_LIFETIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxDosePerPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatientInstruction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT_INSTRUCTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDITIONAL_INSTRUCTION])) { + $v = $this->getAdditionalInstruction(); + foreach($validationRules[self::FIELD_ADDITIONAL_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_ADDITIONAL_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDITIONAL_INSTRUCTION])) { + $errs[self::FIELD_ADDITIONAL_INSTRUCTION] = []; + } + $errs[self::FIELD_ADDITIONAL_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_QUANTITY])) { + $v = $this->getDoseQuantity(); + foreach($validationRules[self::FIELD_DOSE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_DOSE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_QUANTITY])) { + $errs[self::FIELD_DOSE_QUANTITY] = []; + } + $errs[self::FIELD_DOSE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_RANGE])) { + $v = $this->getDoseRange(); + foreach($validationRules[self::FIELD_DOSE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_DOSE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_RANGE])) { + $errs[self::FIELD_DOSE_RANGE] = []; + } + $errs[self::FIELD_DOSE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_ADMINISTRATION])) { + $v = $this->getMaxDosePerAdministration(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_ADMINISTRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_MAX_DOSE_PER_ADMINISTRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_ADMINISTRATION])) { + $errs[self::FIELD_MAX_DOSE_PER_ADMINISTRATION] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_ADMINISTRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_LIFETIME])) { + $v = $this->getMaxDosePerLifetime(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_LIFETIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_MAX_DOSE_PER_LIFETIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_LIFETIME])) { + $errs[self::FIELD_MAX_DOSE_PER_LIFETIME] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_LIFETIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $v = $this->getMaxDosePerPeriod(); + foreach($validationRules[self::FIELD_MAX_DOSE_PER_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_MAX_DOSE_PER_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_DOSE_PER_PERIOD])) { + $errs[self::FIELD_MAX_DOSE_PER_PERIOD] = []; + } + $errs[self::FIELD_MAX_DOSE_PER_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT_INSTRUCTION])) { + $v = $this->getPatientInstruction(); + foreach($validationRules[self::FIELD_PATIENT_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_PATIENT_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT_INSTRUCTION])) { + $errs[self::FIELD_PATIENT_INSTRUCTION] = []; + } + $errs[self::FIELD_PATIENT_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_QUANTITY])) { + $v = $this->getRateQuantity(); + foreach($validationRules[self::FIELD_RATE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_RATE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_QUANTITY])) { + $errs[self::FIELD_RATE_QUANTITY] = []; + } + $errs[self::FIELD_RATE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RANGE])) { + $v = $this->getRateRange(); + foreach($validationRules[self::FIELD_RATE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_RATE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RANGE])) { + $errs[self::FIELD_RATE_RANGE] = []; + } + $errs[self::FIELD_RATE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_RATIO])) { + $v = $this->getRateRatio(); + foreach($validationRules[self::FIELD_RATE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_RATE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_RATIO])) { + $errs[self::FIELD_RATE_RATIO] = []; + } + $errs[self::FIELD_RATE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING])) { + $v = $this->getTiming(); + foreach($validationRules[self::FIELD_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOSAGE, self::FIELD_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING])) { + $errs[self::FIELD_TIMING] = []; + } + $errs[self::FIELD_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition.php index 148030e93a..7311ab36d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -2626,7 +2626,7 @@ class FHIRElementDefinition extends FHIRElement * Validation map for fields in type ElementDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinition Constructor @@ -11923,11 +11923,2769 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAlias())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALIAS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBinding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getConstraint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONSTRAINT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefaultValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFAULT_VALUE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExample())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXAMPLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getFixedAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFixedUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FIXED_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsModifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_MODIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsSummary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_SUMMARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMapping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_LENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaxValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeaningWhenMissing())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEANING_WHEN_MISSING] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getMinValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMustSupport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MUST_SUPPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderMeaning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDER_MEANING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternPositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatternUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATTERN_URI] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRepresentation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPRESENTATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getShort())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SHORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSliceName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLICE_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getSlicing())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLICING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BINDING])) { + $v = $this->getBinding(); + foreach($validationRules[self::FIELD_BINDING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_BINDING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING])) { + $errs[self::FIELD_BINDING] = []; + } + $errs[self::FIELD_BINDING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONSTRAINT])) { + $v = $this->getConstraint(); + foreach($validationRules[self::FIELD_CONSTRAINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CONSTRAINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONSTRAINT])) { + $errs[self::FIELD_CONSTRAINT] = []; + } + $errs[self::FIELD_CONSTRAINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_REFERENCE])) { + $v = $this->getContentReference(); + foreach($validationRules[self::FIELD_CONTENT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_CONTENT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_REFERENCE])) { + $errs[self::FIELD_CONTENT_REFERENCE] = []; + } + $errs[self::FIELD_CONTENT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ADDRESS])) { + $v = $this->getDefaultValueAddress(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ADDRESS])) { + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_AGE])) { + $v = $this->getDefaultValueAge(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_AGE])) { + $errs[self::FIELD_DEFAULT_VALUE_AGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ANNOTATION])) { + $v = $this->getDefaultValueAnnotation(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ANNOTATION])) { + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ATTACHMENT])) { + $v = $this->getDefaultValueAttachment(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT])) { + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $v = $this->getDefaultValueBase64Binary(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $v = $this->getDefaultValueBoolean(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODE])) { + $v = $this->getDefaultValueCode(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODE])) { + $errs[self::FIELD_DEFAULT_VALUE_CODE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getDefaultValueCodeableConcept(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CODING])) { + $v = $this->getDefaultValueCoding(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CODING])) { + $errs[self::FIELD_DEFAULT_VALUE_CODING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])) { + $v = $this->getDefaultValueContactPoint(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_COUNT])) { + $v = $this->getDefaultValueCount(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_COUNT])) { + $errs[self::FIELD_DEFAULT_VALUE_COUNT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATE])) { + $v = $this->getDefaultValueDate(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATE])) { + $errs[self::FIELD_DEFAULT_VALUE_DATE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $v = $this->getDefaultValueDateTime(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $v = $this->getDefaultValueDecimal(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DISTANCE])) { + $v = $this->getDefaultValueDistance(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DISTANCE])) { + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_DURATION])) { + $v = $this->getDefaultValueDuration(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_DURATION])) { + $errs[self::FIELD_DEFAULT_VALUE_DURATION] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { + $v = $this->getDefaultValueHumanName(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_ID])) { + $v = $this->getDefaultValueId(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_ID])) { + $errs[self::FIELD_DEFAULT_VALUE_ID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { + $v = $this->getDefaultValueIdentifier(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $v = $this->getDefaultValueInstant(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $errs[self::FIELD_DEFAULT_VALUE_INSTANT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $v = $this->getDefaultValueInteger(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $errs[self::FIELD_DEFAULT_VALUE_INTEGER] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $v = $this->getDefaultValueMarkdown(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_META])) { + $v = $this->getDefaultValueMeta(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_META])) { + $errs[self::FIELD_DEFAULT_VALUE_META] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_MONEY])) { + $v = $this->getDefaultValueMoney(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_MONEY])) { + $errs[self::FIELD_DEFAULT_VALUE_MONEY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_OID])) { + $v = $this->getDefaultValueOid(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_OID])) { + $errs[self::FIELD_DEFAULT_VALUE_OID] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_PERIOD])) { + $v = $this->getDefaultValuePeriod(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_PERIOD])) { + $errs[self::FIELD_DEFAULT_VALUE_PERIOD] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $v = $this->getDefaultValuePositiveInt(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_QUANTITY])) { + $v = $this->getDefaultValueQuantity(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_QUANTITY])) { + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RANGE])) { + $v = $this->getDefaultValueRange(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RANGE])) { + $errs[self::FIELD_DEFAULT_VALUE_RANGE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_RATIO])) { + $v = $this->getDefaultValueRatio(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_RATIO])) { + $errs[self::FIELD_DEFAULT_VALUE_RATIO] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_REFERENCE])) { + $v = $this->getDefaultValueReference(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_REFERENCE])) { + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA])) { + $v = $this->getDefaultValueSampledData(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_SIGNATURE])) { + $v = $this->getDefaultValueSignature(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_SIGNATURE])) { + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_STRING])) { + $v = $this->getDefaultValueString(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_STRING])) { + $errs[self::FIELD_DEFAULT_VALUE_STRING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TIME])) { + $v = $this->getDefaultValueTime(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TIME])) { + $errs[self::FIELD_DEFAULT_VALUE_TIME] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_TIMING])) { + $v = $this->getDefaultValueTiming(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_TIMING])) { + $errs[self::FIELD_DEFAULT_VALUE_TIMING] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $v = $this->getDefaultValueUnsignedInt(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFAULT_VALUE_URI])) { + $v = $this->getDefaultValueUri(); + foreach($validationRules[self::FIELD_DEFAULT_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFAULT_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFAULT_VALUE_URI])) { + $errs[self::FIELD_DEFAULT_VALUE_URI] = []; + } + $errs[self::FIELD_DEFAULT_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXAMPLE])) { + $v = $this->getExample(); + foreach($validationRules[self::FIELD_EXAMPLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_EXAMPLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXAMPLE])) { + $errs[self::FIELD_EXAMPLE] = []; + } + $errs[self::FIELD_EXAMPLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ADDRESS])) { + $v = $this->getFixedAddress(); + foreach($validationRules[self::FIELD_FIXED_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ADDRESS])) { + $errs[self::FIELD_FIXED_ADDRESS] = []; + } + $errs[self::FIELD_FIXED_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_AGE])) { + $v = $this->getFixedAge(); + foreach($validationRules[self::FIELD_FIXED_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_AGE])) { + $errs[self::FIELD_FIXED_AGE] = []; + } + $errs[self::FIELD_FIXED_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ANNOTATION])) { + $v = $this->getFixedAnnotation(); + foreach($validationRules[self::FIELD_FIXED_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ANNOTATION])) { + $errs[self::FIELD_FIXED_ANNOTATION] = []; + } + $errs[self::FIELD_FIXED_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ATTACHMENT])) { + $v = $this->getFixedAttachment(); + foreach($validationRules[self::FIELD_FIXED_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ATTACHMENT])) { + $errs[self::FIELD_FIXED_ATTACHMENT] = []; + } + $errs[self::FIELD_FIXED_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_BASE_64BINARY])) { + $v = $this->getFixedBase64Binary(); + foreach($validationRules[self::FIELD_FIXED_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_BASE_64BINARY])) { + $errs[self::FIELD_FIXED_BASE_64BINARY] = []; + } + $errs[self::FIELD_FIXED_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_BOOLEAN])) { + $v = $this->getFixedBoolean(); + foreach($validationRules[self::FIELD_FIXED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_BOOLEAN])) { + $errs[self::FIELD_FIXED_BOOLEAN] = []; + } + $errs[self::FIELD_FIXED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CODE])) { + $v = $this->getFixedCode(); + foreach($validationRules[self::FIELD_FIXED_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CODE])) { + $errs[self::FIELD_FIXED_CODE] = []; + } + $errs[self::FIELD_FIXED_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CODEABLE_CONCEPT])) { + $v = $this->getFixedCodeableConcept(); + foreach($validationRules[self::FIELD_FIXED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_FIXED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_FIXED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CODING])) { + $v = $this->getFixedCoding(); + foreach($validationRules[self::FIELD_FIXED_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CODING])) { + $errs[self::FIELD_FIXED_CODING] = []; + } + $errs[self::FIELD_FIXED_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_CONTACT_POINT])) { + $v = $this->getFixedContactPoint(); + foreach($validationRules[self::FIELD_FIXED_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_CONTACT_POINT])) { + $errs[self::FIELD_FIXED_CONTACT_POINT] = []; + } + $errs[self::FIELD_FIXED_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_COUNT])) { + $v = $this->getFixedCount(); + foreach($validationRules[self::FIELD_FIXED_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_COUNT])) { + $errs[self::FIELD_FIXED_COUNT] = []; + } + $errs[self::FIELD_FIXED_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DATE])) { + $v = $this->getFixedDate(); + foreach($validationRules[self::FIELD_FIXED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DATE])) { + $errs[self::FIELD_FIXED_DATE] = []; + } + $errs[self::FIELD_FIXED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DATE_TIME])) { + $v = $this->getFixedDateTime(); + foreach($validationRules[self::FIELD_FIXED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DATE_TIME])) { + $errs[self::FIELD_FIXED_DATE_TIME] = []; + } + $errs[self::FIELD_FIXED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DECIMAL])) { + $v = $this->getFixedDecimal(); + foreach($validationRules[self::FIELD_FIXED_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DECIMAL])) { + $errs[self::FIELD_FIXED_DECIMAL] = []; + } + $errs[self::FIELD_FIXED_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DISTANCE])) { + $v = $this->getFixedDistance(); + foreach($validationRules[self::FIELD_FIXED_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DISTANCE])) { + $errs[self::FIELD_FIXED_DISTANCE] = []; + } + $errs[self::FIELD_FIXED_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_DURATION])) { + $v = $this->getFixedDuration(); + foreach($validationRules[self::FIELD_FIXED_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_DURATION])) { + $errs[self::FIELD_FIXED_DURATION] = []; + } + $errs[self::FIELD_FIXED_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_HUMAN_NAME])) { + $v = $this->getFixedHumanName(); + foreach($validationRules[self::FIELD_FIXED_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_HUMAN_NAME])) { + $errs[self::FIELD_FIXED_HUMAN_NAME] = []; + } + $errs[self::FIELD_FIXED_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_ID])) { + $v = $this->getFixedId(); + foreach($validationRules[self::FIELD_FIXED_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_ID])) { + $errs[self::FIELD_FIXED_ID] = []; + } + $errs[self::FIELD_FIXED_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_IDENTIFIER])) { + $v = $this->getFixedIdentifier(); + foreach($validationRules[self::FIELD_FIXED_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_IDENTIFIER])) { + $errs[self::FIELD_FIXED_IDENTIFIER] = []; + } + $errs[self::FIELD_FIXED_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_INSTANT])) { + $v = $this->getFixedInstant(); + foreach($validationRules[self::FIELD_FIXED_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_INSTANT])) { + $errs[self::FIELD_FIXED_INSTANT] = []; + } + $errs[self::FIELD_FIXED_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_INTEGER])) { + $v = $this->getFixedInteger(); + foreach($validationRules[self::FIELD_FIXED_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_INTEGER])) { + $errs[self::FIELD_FIXED_INTEGER] = []; + } + $errs[self::FIELD_FIXED_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_MARKDOWN])) { + $v = $this->getFixedMarkdown(); + foreach($validationRules[self::FIELD_FIXED_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_MARKDOWN])) { + $errs[self::FIELD_FIXED_MARKDOWN] = []; + } + $errs[self::FIELD_FIXED_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_META])) { + $v = $this->getFixedMeta(); + foreach($validationRules[self::FIELD_FIXED_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_META])) { + $errs[self::FIELD_FIXED_META] = []; + } + $errs[self::FIELD_FIXED_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_MONEY])) { + $v = $this->getFixedMoney(); + foreach($validationRules[self::FIELD_FIXED_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_MONEY])) { + $errs[self::FIELD_FIXED_MONEY] = []; + } + $errs[self::FIELD_FIXED_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_OID])) { + $v = $this->getFixedOid(); + foreach($validationRules[self::FIELD_FIXED_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_OID])) { + $errs[self::FIELD_FIXED_OID] = []; + } + $errs[self::FIELD_FIXED_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_PERIOD])) { + $v = $this->getFixedPeriod(); + foreach($validationRules[self::FIELD_FIXED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_PERIOD])) { + $errs[self::FIELD_FIXED_PERIOD] = []; + } + $errs[self::FIELD_FIXED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_POSITIVE_INT])) { + $v = $this->getFixedPositiveInt(); + foreach($validationRules[self::FIELD_FIXED_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_POSITIVE_INT])) { + $errs[self::FIELD_FIXED_POSITIVE_INT] = []; + } + $errs[self::FIELD_FIXED_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_QUANTITY])) { + $v = $this->getFixedQuantity(); + foreach($validationRules[self::FIELD_FIXED_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_QUANTITY])) { + $errs[self::FIELD_FIXED_QUANTITY] = []; + } + $errs[self::FIELD_FIXED_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_RANGE])) { + $v = $this->getFixedRange(); + foreach($validationRules[self::FIELD_FIXED_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_RANGE])) { + $errs[self::FIELD_FIXED_RANGE] = []; + } + $errs[self::FIELD_FIXED_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_RATIO])) { + $v = $this->getFixedRatio(); + foreach($validationRules[self::FIELD_FIXED_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_RATIO])) { + $errs[self::FIELD_FIXED_RATIO] = []; + } + $errs[self::FIELD_FIXED_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_REFERENCE])) { + $v = $this->getFixedReference(); + foreach($validationRules[self::FIELD_FIXED_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_REFERENCE])) { + $errs[self::FIELD_FIXED_REFERENCE] = []; + } + $errs[self::FIELD_FIXED_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_SAMPLED_DATA])) { + $v = $this->getFixedSampledData(); + foreach($validationRules[self::FIELD_FIXED_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_SAMPLED_DATA])) { + $errs[self::FIELD_FIXED_SAMPLED_DATA] = []; + } + $errs[self::FIELD_FIXED_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_SIGNATURE])) { + $v = $this->getFixedSignature(); + foreach($validationRules[self::FIELD_FIXED_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_SIGNATURE])) { + $errs[self::FIELD_FIXED_SIGNATURE] = []; + } + $errs[self::FIELD_FIXED_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_STRING])) { + $v = $this->getFixedString(); + foreach($validationRules[self::FIELD_FIXED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_STRING])) { + $errs[self::FIELD_FIXED_STRING] = []; + } + $errs[self::FIELD_FIXED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_TIME])) { + $v = $this->getFixedTime(); + foreach($validationRules[self::FIELD_FIXED_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_TIME])) { + $errs[self::FIELD_FIXED_TIME] = []; + } + $errs[self::FIELD_FIXED_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_TIMING])) { + $v = $this->getFixedTiming(); + foreach($validationRules[self::FIELD_FIXED_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_TIMING])) { + $errs[self::FIELD_FIXED_TIMING] = []; + } + $errs[self::FIELD_FIXED_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_UNSIGNED_INT])) { + $v = $this->getFixedUnsignedInt(); + foreach($validationRules[self::FIELD_FIXED_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_UNSIGNED_INT])) { + $errs[self::FIELD_FIXED_UNSIGNED_INT] = []; + } + $errs[self::FIELD_FIXED_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_URI])) { + $v = $this->getFixedUri(); + foreach($validationRules[self::FIELD_FIXED_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_FIXED_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_URI])) { + $errs[self::FIELD_FIXED_URI] = []; + } + $errs[self::FIELD_FIXED_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_MODIFIER])) { + $v = $this->getIsModifier(); + foreach($validationRules[self::FIELD_IS_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_IS_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_MODIFIER])) { + $errs[self::FIELD_IS_MODIFIER] = []; + } + $errs[self::FIELD_IS_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_SUMMARY])) { + $v = $this->getIsSummary(); + foreach($validationRules[self::FIELD_IS_SUMMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_IS_SUMMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_SUMMARY])) { + $errs[self::FIELD_IS_SUMMARY] = []; + } + $errs[self::FIELD_IS_SUMMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAPPING])) { + $v = $this->getMapping(); + foreach($validationRules[self::FIELD_MAPPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAPPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAPPING])) { + $errs[self::FIELD_MAPPING] = []; + } + $errs[self::FIELD_MAPPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_LENGTH])) { + $v = $this->getMaxLength(); + foreach($validationRules[self::FIELD_MAX_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_LENGTH])) { + $errs[self::FIELD_MAX_LENGTH] = []; + } + $errs[self::FIELD_MAX_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_DATE])) { + $v = $this->getMaxValueDate(); + foreach($validationRules[self::FIELD_MAX_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_DATE])) { + $errs[self::FIELD_MAX_VALUE_DATE] = []; + } + $errs[self::FIELD_MAX_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_DATE_TIME])) { + $v = $this->getMaxValueDateTime(); + foreach($validationRules[self::FIELD_MAX_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_DATE_TIME])) { + $errs[self::FIELD_MAX_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_MAX_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_DECIMAL])) { + $v = $this->getMaxValueDecimal(); + foreach($validationRules[self::FIELD_MAX_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_DECIMAL])) { + $errs[self::FIELD_MAX_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_MAX_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_INSTANT])) { + $v = $this->getMaxValueInstant(); + foreach($validationRules[self::FIELD_MAX_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_INSTANT])) { + $errs[self::FIELD_MAX_VALUE_INSTANT] = []; + } + $errs[self::FIELD_MAX_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_INTEGER])) { + $v = $this->getMaxValueInteger(); + foreach($validationRules[self::FIELD_MAX_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_INTEGER])) { + $errs[self::FIELD_MAX_VALUE_INTEGER] = []; + } + $errs[self::FIELD_MAX_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_POSITIVE_INT])) { + $v = $this->getMaxValuePositiveInt(); + foreach($validationRules[self::FIELD_MAX_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_MAX_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_MAX_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_QUANTITY])) { + $v = $this->getMaxValueQuantity(); + foreach($validationRules[self::FIELD_MAX_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_QUANTITY])) { + $errs[self::FIELD_MAX_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_MAX_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_TIME])) { + $v = $this->getMaxValueTime(); + foreach($validationRules[self::FIELD_MAX_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_TIME])) { + $errs[self::FIELD_MAX_VALUE_TIME] = []; + } + $errs[self::FIELD_MAX_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { + $v = $this->getMaxValueUnsignedInt(); + foreach($validationRules[self::FIELD_MAX_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MAX_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_MAX_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_MAX_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEANING_WHEN_MISSING])) { + $v = $this->getMeaningWhenMissing(); + foreach($validationRules[self::FIELD_MEANING_WHEN_MISSING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MEANING_WHEN_MISSING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEANING_WHEN_MISSING])) { + $errs[self::FIELD_MEANING_WHEN_MISSING] = []; + } + $errs[self::FIELD_MEANING_WHEN_MISSING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_DATE])) { + $v = $this->getMinValueDate(); + foreach($validationRules[self::FIELD_MIN_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_DATE])) { + $errs[self::FIELD_MIN_VALUE_DATE] = []; + } + $errs[self::FIELD_MIN_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_DATE_TIME])) { + $v = $this->getMinValueDateTime(); + foreach($validationRules[self::FIELD_MIN_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_DATE_TIME])) { + $errs[self::FIELD_MIN_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_MIN_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_DECIMAL])) { + $v = $this->getMinValueDecimal(); + foreach($validationRules[self::FIELD_MIN_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_DECIMAL])) { + $errs[self::FIELD_MIN_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_MIN_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_INSTANT])) { + $v = $this->getMinValueInstant(); + foreach($validationRules[self::FIELD_MIN_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_INSTANT])) { + $errs[self::FIELD_MIN_VALUE_INSTANT] = []; + } + $errs[self::FIELD_MIN_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_INTEGER])) { + $v = $this->getMinValueInteger(); + foreach($validationRules[self::FIELD_MIN_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_INTEGER])) { + $errs[self::FIELD_MIN_VALUE_INTEGER] = []; + } + $errs[self::FIELD_MIN_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_POSITIVE_INT])) { + $v = $this->getMinValuePositiveInt(); + foreach($validationRules[self::FIELD_MIN_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_MIN_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_MIN_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_QUANTITY])) { + $v = $this->getMinValueQuantity(); + foreach($validationRules[self::FIELD_MIN_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_QUANTITY])) { + $errs[self::FIELD_MIN_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_MIN_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_TIME])) { + $v = $this->getMinValueTime(); + foreach($validationRules[self::FIELD_MIN_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_TIME])) { + $errs[self::FIELD_MIN_VALUE_TIME] = []; + } + $errs[self::FIELD_MIN_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { + $v = $this->getMinValueUnsignedInt(); + foreach($validationRules[self::FIELD_MIN_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MIN_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_MIN_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_MIN_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MUST_SUPPORT])) { + $v = $this->getMustSupport(); + foreach($validationRules[self::FIELD_MUST_SUPPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_MUST_SUPPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MUST_SUPPORT])) { + $errs[self::FIELD_MUST_SUPPORT] = []; + } + $errs[self::FIELD_MUST_SUPPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDER_MEANING])) { + $v = $this->getOrderMeaning(); + foreach($validationRules[self::FIELD_ORDER_MEANING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_ORDER_MEANING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDER_MEANING])) { + $errs[self::FIELD_ORDER_MEANING] = []; + } + $errs[self::FIELD_ORDER_MEANING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ADDRESS])) { + $v = $this->getPatternAddress(); + foreach($validationRules[self::FIELD_PATTERN_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ADDRESS])) { + $errs[self::FIELD_PATTERN_ADDRESS] = []; + } + $errs[self::FIELD_PATTERN_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_AGE])) { + $v = $this->getPatternAge(); + foreach($validationRules[self::FIELD_PATTERN_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_AGE])) { + $errs[self::FIELD_PATTERN_AGE] = []; + } + $errs[self::FIELD_PATTERN_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ANNOTATION])) { + $v = $this->getPatternAnnotation(); + foreach($validationRules[self::FIELD_PATTERN_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ANNOTATION])) { + $errs[self::FIELD_PATTERN_ANNOTATION] = []; + } + $errs[self::FIELD_PATTERN_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ATTACHMENT])) { + $v = $this->getPatternAttachment(); + foreach($validationRules[self::FIELD_PATTERN_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ATTACHMENT])) { + $errs[self::FIELD_PATTERN_ATTACHMENT] = []; + } + $errs[self::FIELD_PATTERN_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_BASE_64BINARY])) { + $v = $this->getPatternBase64Binary(); + foreach($validationRules[self::FIELD_PATTERN_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_BASE_64BINARY])) { + $errs[self::FIELD_PATTERN_BASE_64BINARY] = []; + } + $errs[self::FIELD_PATTERN_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_BOOLEAN])) { + $v = $this->getPatternBoolean(); + foreach($validationRules[self::FIELD_PATTERN_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_BOOLEAN])) { + $errs[self::FIELD_PATTERN_BOOLEAN] = []; + } + $errs[self::FIELD_PATTERN_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CODE])) { + $v = $this->getPatternCode(); + foreach($validationRules[self::FIELD_PATTERN_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CODE])) { + $errs[self::FIELD_PATTERN_CODE] = []; + } + $errs[self::FIELD_PATTERN_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CODEABLE_CONCEPT])) { + $v = $this->getPatternCodeableConcept(); + foreach($validationRules[self::FIELD_PATTERN_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PATTERN_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PATTERN_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CODING])) { + $v = $this->getPatternCoding(); + foreach($validationRules[self::FIELD_PATTERN_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CODING])) { + $errs[self::FIELD_PATTERN_CODING] = []; + } + $errs[self::FIELD_PATTERN_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_CONTACT_POINT])) { + $v = $this->getPatternContactPoint(); + foreach($validationRules[self::FIELD_PATTERN_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_CONTACT_POINT])) { + $errs[self::FIELD_PATTERN_CONTACT_POINT] = []; + } + $errs[self::FIELD_PATTERN_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_COUNT])) { + $v = $this->getPatternCount(); + foreach($validationRules[self::FIELD_PATTERN_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_COUNT])) { + $errs[self::FIELD_PATTERN_COUNT] = []; + } + $errs[self::FIELD_PATTERN_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DATE])) { + $v = $this->getPatternDate(); + foreach($validationRules[self::FIELD_PATTERN_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DATE])) { + $errs[self::FIELD_PATTERN_DATE] = []; + } + $errs[self::FIELD_PATTERN_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DATE_TIME])) { + $v = $this->getPatternDateTime(); + foreach($validationRules[self::FIELD_PATTERN_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DATE_TIME])) { + $errs[self::FIELD_PATTERN_DATE_TIME] = []; + } + $errs[self::FIELD_PATTERN_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DECIMAL])) { + $v = $this->getPatternDecimal(); + foreach($validationRules[self::FIELD_PATTERN_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DECIMAL])) { + $errs[self::FIELD_PATTERN_DECIMAL] = []; + } + $errs[self::FIELD_PATTERN_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DISTANCE])) { + $v = $this->getPatternDistance(); + foreach($validationRules[self::FIELD_PATTERN_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DISTANCE])) { + $errs[self::FIELD_PATTERN_DISTANCE] = []; + } + $errs[self::FIELD_PATTERN_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_DURATION])) { + $v = $this->getPatternDuration(); + foreach($validationRules[self::FIELD_PATTERN_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_DURATION])) { + $errs[self::FIELD_PATTERN_DURATION] = []; + } + $errs[self::FIELD_PATTERN_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_HUMAN_NAME])) { + $v = $this->getPatternHumanName(); + foreach($validationRules[self::FIELD_PATTERN_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_HUMAN_NAME])) { + $errs[self::FIELD_PATTERN_HUMAN_NAME] = []; + } + $errs[self::FIELD_PATTERN_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_ID])) { + $v = $this->getPatternId(); + foreach($validationRules[self::FIELD_PATTERN_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_ID])) { + $errs[self::FIELD_PATTERN_ID] = []; + } + $errs[self::FIELD_PATTERN_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_IDENTIFIER])) { + $v = $this->getPatternIdentifier(); + foreach($validationRules[self::FIELD_PATTERN_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_IDENTIFIER])) { + $errs[self::FIELD_PATTERN_IDENTIFIER] = []; + } + $errs[self::FIELD_PATTERN_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_INSTANT])) { + $v = $this->getPatternInstant(); + foreach($validationRules[self::FIELD_PATTERN_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_INSTANT])) { + $errs[self::FIELD_PATTERN_INSTANT] = []; + } + $errs[self::FIELD_PATTERN_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_INTEGER])) { + $v = $this->getPatternInteger(); + foreach($validationRules[self::FIELD_PATTERN_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_INTEGER])) { + $errs[self::FIELD_PATTERN_INTEGER] = []; + } + $errs[self::FIELD_PATTERN_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_MARKDOWN])) { + $v = $this->getPatternMarkdown(); + foreach($validationRules[self::FIELD_PATTERN_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_MARKDOWN])) { + $errs[self::FIELD_PATTERN_MARKDOWN] = []; + } + $errs[self::FIELD_PATTERN_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_META])) { + $v = $this->getPatternMeta(); + foreach($validationRules[self::FIELD_PATTERN_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_META])) { + $errs[self::FIELD_PATTERN_META] = []; + } + $errs[self::FIELD_PATTERN_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_MONEY])) { + $v = $this->getPatternMoney(); + foreach($validationRules[self::FIELD_PATTERN_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_MONEY])) { + $errs[self::FIELD_PATTERN_MONEY] = []; + } + $errs[self::FIELD_PATTERN_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_OID])) { + $v = $this->getPatternOid(); + foreach($validationRules[self::FIELD_PATTERN_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_OID])) { + $errs[self::FIELD_PATTERN_OID] = []; + } + $errs[self::FIELD_PATTERN_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_PERIOD])) { + $v = $this->getPatternPeriod(); + foreach($validationRules[self::FIELD_PATTERN_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_PERIOD])) { + $errs[self::FIELD_PATTERN_PERIOD] = []; + } + $errs[self::FIELD_PATTERN_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_POSITIVE_INT])) { + $v = $this->getPatternPositiveInt(); + foreach($validationRules[self::FIELD_PATTERN_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_POSITIVE_INT])) { + $errs[self::FIELD_PATTERN_POSITIVE_INT] = []; + } + $errs[self::FIELD_PATTERN_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_QUANTITY])) { + $v = $this->getPatternQuantity(); + foreach($validationRules[self::FIELD_PATTERN_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_QUANTITY])) { + $errs[self::FIELD_PATTERN_QUANTITY] = []; + } + $errs[self::FIELD_PATTERN_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_RANGE])) { + $v = $this->getPatternRange(); + foreach($validationRules[self::FIELD_PATTERN_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_RANGE])) { + $errs[self::FIELD_PATTERN_RANGE] = []; + } + $errs[self::FIELD_PATTERN_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_RATIO])) { + $v = $this->getPatternRatio(); + foreach($validationRules[self::FIELD_PATTERN_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_RATIO])) { + $errs[self::FIELD_PATTERN_RATIO] = []; + } + $errs[self::FIELD_PATTERN_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_REFERENCE])) { + $v = $this->getPatternReference(); + foreach($validationRules[self::FIELD_PATTERN_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_REFERENCE])) { + $errs[self::FIELD_PATTERN_REFERENCE] = []; + } + $errs[self::FIELD_PATTERN_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_SAMPLED_DATA])) { + $v = $this->getPatternSampledData(); + foreach($validationRules[self::FIELD_PATTERN_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_SAMPLED_DATA])) { + $errs[self::FIELD_PATTERN_SAMPLED_DATA] = []; + } + $errs[self::FIELD_PATTERN_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_SIGNATURE])) { + $v = $this->getPatternSignature(); + foreach($validationRules[self::FIELD_PATTERN_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_SIGNATURE])) { + $errs[self::FIELD_PATTERN_SIGNATURE] = []; + } + $errs[self::FIELD_PATTERN_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_STRING])) { + $v = $this->getPatternString(); + foreach($validationRules[self::FIELD_PATTERN_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_STRING])) { + $errs[self::FIELD_PATTERN_STRING] = []; + } + $errs[self::FIELD_PATTERN_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_TIME])) { + $v = $this->getPatternTime(); + foreach($validationRules[self::FIELD_PATTERN_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_TIME])) { + $errs[self::FIELD_PATTERN_TIME] = []; + } + $errs[self::FIELD_PATTERN_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_TIMING])) { + $v = $this->getPatternTiming(); + foreach($validationRules[self::FIELD_PATTERN_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_TIMING])) { + $errs[self::FIELD_PATTERN_TIMING] = []; + } + $errs[self::FIELD_PATTERN_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_UNSIGNED_INT])) { + $v = $this->getPatternUnsignedInt(); + foreach($validationRules[self::FIELD_PATTERN_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_UNSIGNED_INT])) { + $errs[self::FIELD_PATTERN_UNSIGNED_INT] = []; + } + $errs[self::FIELD_PATTERN_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATTERN_URI])) { + $v = $this->getPatternUri(); + foreach($validationRules[self::FIELD_PATTERN_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_PATTERN_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATTERN_URI])) { + $errs[self::FIELD_PATTERN_URI] = []; + } + $errs[self::FIELD_PATTERN_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPRESENTATION])) { + $v = $this->getRepresentation(); + foreach($validationRules[self::FIELD_REPRESENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_REPRESENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPRESENTATION])) { + $errs[self::FIELD_REPRESENTATION] = []; + } + $errs[self::FIELD_REPRESENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SHORT])) { + $v = $this->getShort(); + foreach($validationRules[self::FIELD_SHORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_SHORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SHORT])) { + $errs[self::FIELD_SHORT] = []; + } + $errs[self::FIELD_SHORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLICE_NAME])) { + $v = $this->getSliceName(); + foreach($validationRules[self::FIELD_SLICE_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_SLICE_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLICE_NAME])) { + $errs[self::FIELD_SLICE_NAME] = []; + } + $errs[self::FIELD_SLICE_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLICING])) { + $v = $this->getSlicing(); + foreach($validationRules[self::FIELD_SLICING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_SLICING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLICING])) { + $errs[self::FIELD_SLICING] = []; + } + $errs[self::FIELD_SLICING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php index 5eae008a01..f11972d49e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRElementDefinitionBase extends FHIRElement * Validation map for fields in type ElementDefinition.Base * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionBase Constructor @@ -360,11 +360,101 @@ public function setPath($path = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BASE, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BASE, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BASE, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php index b61e1a2a0c..1c1f900361 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -152,7 +152,7 @@ class FHIRElementDefinitionBinding extends FHIRElement * Validation map for fields in type ElementDefinition.Binding * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionBinding Constructor @@ -427,11 +427,118 @@ public function setValueSetUri($valueSetUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStrength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRENGTH] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSetReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSetUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRENGTH])) { + $v = $this->getStrength(); + foreach($validationRules[self::FIELD_STRENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_STRENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRENGTH])) { + $errs[self::FIELD_STRENGTH] = []; + } + $errs[self::FIELD_STRENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET_REFERENCE])) { + $v = $this->getValueSetReference(); + foreach($validationRules[self::FIELD_VALUE_SET_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_VALUE_SET_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET_REFERENCE])) { + $errs[self::FIELD_VALUE_SET_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_SET_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET_URI])) { + $v = $this->getValueSetUri(); + foreach($validationRules[self::FIELD_VALUE_SET_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_BINDING, self::FIELD_VALUE_SET_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET_URI])) { + $errs[self::FIELD_VALUE_SET_URI] = []; + } + $errs[self::FIELD_VALUE_SET_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php index c9e54621d3..0da0fd9c14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -189,7 +189,7 @@ class FHIRElementDefinitionConstraint extends FHIRElement * Validation map for fields in type ElementDefinition.Constraint * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionConstraint Constructor @@ -665,11 +665,169 @@ public function setXpath($xpath = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getHuman())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HUMAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getKey())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequirements())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUIREMENTS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HUMAN])) { + $v = $this->getHuman(); + foreach($validationRules[self::FIELD_HUMAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_HUMAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HUMAN])) { + $errs[self::FIELD_HUMAN] = []; + } + $errs[self::FIELD_HUMAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KEY])) { + $v = $this->getKey(); + foreach($validationRules[self::FIELD_KEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_KEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KEY])) { + $errs[self::FIELD_KEY] = []; + } + $errs[self::FIELD_KEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUIREMENTS])) { + $v = $this->getRequirements(); + foreach($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_REQUIREMENTS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUIREMENTS])) { + $errs[self::FIELD_REQUIREMENTS] = []; + } + $errs[self::FIELD_REQUIREMENTS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH])) { + $v = $this->getXpath(); + foreach($validationRules[self::FIELD_XPATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_CONSTRAINT, self::FIELD_XPATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH])) { + $errs[self::FIELD_XPATH] = []; + } + $errs[self::FIELD_XPATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php index cc992f4c9f..c6e03228b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRElementDefinitionDiscriminator extends FHIRElement * Validation map for fields in type ElementDefinition.Discriminator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionDiscriminator Constructor @@ -269,11 +269,84 @@ public function setType(FHIRDiscriminatorType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getPath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_PATH])) { + $v = $this->getPath(); + foreach($validationRules[self::FIELD_PATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_DISCRIMINATOR, self::FIELD_PATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATH])) { + $errs[self::FIELD_PATH] = []; + } + $errs[self::FIELD_PATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_DISCRIMINATOR, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExample.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExample.php index 175fa2e439..2ea34defae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExample.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExample.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -685,7 +685,7 @@ class FHIRElementDefinitionExample extends FHIRElement * Validation map for fields in type ElementDefinition.Example * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionExample Constructor @@ -2729,11 +2729,713 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLabel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LABEL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LABEL])) { + $v = $this->getLabel(); + foreach($validationRules[self::FIELD_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LABEL])) { + $errs[self::FIELD_LABEL] = []; + } + $errs[self::FIELD_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_AGE])) { + $v = $this->getValueAge(); + foreach($validationRules[self::FIELD_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_AGE])) { + $errs[self::FIELD_VALUE_AGE] = []; + } + $errs[self::FIELD_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_COUNT])) { + $v = $this->getValueCount(); + foreach($validationRules[self::FIELD_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_COUNT])) { + $errs[self::FIELD_VALUE_COUNT] = []; + } + $errs[self::FIELD_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DISTANCE])) { + $v = $this->getValueDistance(); + foreach($validationRules[self::FIELD_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DISTANCE])) { + $errs[self::FIELD_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_EXAMPLE, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php index 9df925532f..1d7cf3eef2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRElementDefinitionMapping extends FHIRElement * Validation map for fields in type ElementDefinition.Mapping * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionMapping Constructor @@ -438,11 +438,118 @@ public function setMap($map = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTITY])) { + $v = $this->getIdentity(); + foreach($validationRules[self::FIELD_IDENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_IDENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTITY])) { + $errs[self::FIELD_IDENTITY] = []; + } + $errs[self::FIELD_IDENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAP])) { + $v = $this->getMap(); + foreach($validationRules[self::FIELD_MAP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_MAPPING, self::FIELD_MAP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAP])) { + $errs[self::FIELD_MAP] = []; + } + $errs[self::FIELD_MAP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php index 1ed8e3fbc5..df525164cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRElementDefinitionSlicing extends FHIRElement * Validation map for fields in type ElementDefinition.Slicing * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionSlicing Constructor @@ -452,11 +452,120 @@ public function setRules(FHIRSlicingRules $rules = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDiscriminator())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DISCRIMINATOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrdered())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED] = $fieldErrs; + } + } + if (null !== ($v = $this->getRules())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RULES] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCRIMINATOR])) { + $v = $this->getDiscriminator(); + foreach($validationRules[self::FIELD_DISCRIMINATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_DISCRIMINATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCRIMINATOR])) { + $errs[self::FIELD_DISCRIMINATOR] = []; + } + $errs[self::FIELD_DISCRIMINATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED])) { + $v = $this->getOrdered(); + foreach($validationRules[self::FIELD_ORDERED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_ORDERED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED])) { + $errs[self::FIELD_ORDERED] = []; + } + $errs[self::FIELD_ORDERED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULES])) { + $v = $this->getRules(); + foreach($validationRules[self::FIELD_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_SLICING, self::FIELD_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULES])) { + $errs[self::FIELD_RULES] = []; + } + $errs[self::FIELD_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php index 8330c97ad3..499fab63e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -169,7 +169,7 @@ class FHIRElementDefinitionType extends FHIRElement * Validation map for fields in type ElementDefinition.Type * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRElementDefinitionType Constructor @@ -571,11 +571,137 @@ public function setVersioning(FHIRReferenceVersionRules $versioning = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAggregation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGGREGATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersioning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSIONING] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGGREGATION])) { + $v = $this->getAggregation(); + foreach($validationRules[self::FIELD_AGGREGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_AGGREGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGGREGATION])) { + $errs[self::FIELD_AGGREGATION] = []; + } + $errs[self::FIELD_AGGREGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_PROFILE])) { + $v = $this->getTargetProfile(); + foreach($validationRules[self::FIELD_TARGET_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_TARGET_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_PROFILE])) { + $errs[self::FIELD_TARGET_PROFILE] = []; + } + $errs[self::FIELD_TARGET_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSIONING])) { + $v = $this->getVersioning(); + foreach($validationRules[self::FIELD_VERSIONING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT_DEFINITION_DOT_TYPE, self::FIELD_VERSIONING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSIONING])) { + $errs[self::FIELD_VERSIONING] = []; + } + $errs[self::FIELD_VERSIONING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterLocationStatus.php index 28f0d8db7b..a681a4aa66 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREncounterLocationStatus extends FHIRElement * Validation map for fields in type EncounterLocationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterLocationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_LOCATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterStatus.php index eaec43d614..2395007acc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREncounterStatus extends FHIRElement * Validation map for fields in type EncounterStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounterStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREndpointStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREndpointStatus.php index caf5909500..a09d289a1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREndpointStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREndpointStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREndpointStatus extends FHIRElement * Validation map for fields in type EndpointStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREndpointStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREpisodeOfCareStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREpisodeOfCareStatus.php index bc9eb2192e..f51133f957 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREpisodeOfCareStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREpisodeOfCareStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREpisodeOfCareStatus extends FHIRElement * Validation map for fields in type EpisodeOfCareStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCareStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventCapabilityMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventCapabilityMode.php index 18f23ee714..06378e2984 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventCapabilityMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventCapabilityMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREventCapabilityMode extends FHIRElement * Validation map for fields in type EventCapabilityMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREventCapabilityMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_CAPABILITY_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventStatus.php index 35cb507a78..b15589b6ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREventStatus extends FHIRElement * Validation map for fields in type EventStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREventStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventTiming.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventTiming.php index ad4ea59450..db0ff347ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREventTiming extends FHIRElement * Validation map for fields in type EventTiming * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREventTiming Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EVENT_TIMING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExplanationOfBenefitStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExplanationOfBenefitStatus.php index de7bc8efd6..9d561610ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExplanationOfBenefitStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExplanationOfBenefitStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRExplanationOfBenefitStatus extends FHIRElement * Validation map for fields in type ExplanationOfBenefitStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefitStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtension.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtension.php index f4ac3bfb0d..0442736344 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtension.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtension.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -646,7 +646,7 @@ class FHIRExtension extends FHIRElement * Validation map for fields in type Extension * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExtension Constructor @@ -2658,11 +2658,713 @@ public function setValueUri($valueUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAnnotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ANNOTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBase64Binary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCoding())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueContactPoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDecimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DECIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDistance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DISTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueHumanName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInstant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INSTANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_INTEGER] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMarkdown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MARKDOWN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_META] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueMoney())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_MONEY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueOid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_OID] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePositiveInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUnsignedInt())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ADDRESS])) { + $v = $this->getValueAddress(); + foreach($validationRules[self::FIELD_VALUE_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ADDRESS])) { + $errs[self::FIELD_VALUE_ADDRESS] = []; + } + $errs[self::FIELD_VALUE_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_AGE])) { + $v = $this->getValueAge(); + foreach($validationRules[self::FIELD_VALUE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_AGE])) { + $errs[self::FIELD_VALUE_AGE] = []; + } + $errs[self::FIELD_VALUE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ANNOTATION])) { + $v = $this->getValueAnnotation(); + foreach($validationRules[self::FIELD_VALUE_ANNOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ANNOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ANNOTATION])) { + $errs[self::FIELD_VALUE_ANNOTATION] = []; + } + $errs[self::FIELD_VALUE_ANNOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BASE_64BINARY])) { + $v = $this->getValueBase64Binary(); + foreach($validationRules[self::FIELD_VALUE_BASE_64BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_BASE_64BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BASE_64BINARY])) { + $errs[self::FIELD_VALUE_BASE_64BINARY] = []; + } + $errs[self::FIELD_VALUE_BASE_64BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODE])) { + $v = $this->getValueCode(); + foreach($validationRules[self::FIELD_VALUE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODE])) { + $errs[self::FIELD_VALUE_CODE] = []; + } + $errs[self::FIELD_VALUE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODING])) { + $v = $this->getValueCoding(); + foreach($validationRules[self::FIELD_VALUE_CODING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CODING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODING])) { + $errs[self::FIELD_VALUE_CODING] = []; + } + $errs[self::FIELD_VALUE_CODING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CONTACT_POINT])) { + $v = $this->getValueContactPoint(); + foreach($validationRules[self::FIELD_VALUE_CONTACT_POINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_CONTACT_POINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CONTACT_POINT])) { + $errs[self::FIELD_VALUE_CONTACT_POINT] = []; + } + $errs[self::FIELD_VALUE_CONTACT_POINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_COUNT])) { + $v = $this->getValueCount(); + foreach($validationRules[self::FIELD_VALUE_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_COUNT])) { + $errs[self::FIELD_VALUE_COUNT] = []; + } + $errs[self::FIELD_VALUE_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE])) { + $v = $this->getValueDate(); + foreach($validationRules[self::FIELD_VALUE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE])) { + $errs[self::FIELD_VALUE_DATE] = []; + } + $errs[self::FIELD_VALUE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DECIMAL])) { + $v = $this->getValueDecimal(); + foreach($validationRules[self::FIELD_VALUE_DECIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DECIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DECIMAL])) { + $errs[self::FIELD_VALUE_DECIMAL] = []; + } + $errs[self::FIELD_VALUE_DECIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DISTANCE])) { + $v = $this->getValueDistance(); + foreach($validationRules[self::FIELD_VALUE_DISTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DISTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DISTANCE])) { + $errs[self::FIELD_VALUE_DISTANCE] = []; + } + $errs[self::FIELD_VALUE_DISTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DURATION])) { + $v = $this->getValueDuration(); + foreach($validationRules[self::FIELD_VALUE_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DURATION])) { + $errs[self::FIELD_VALUE_DURATION] = []; + } + $errs[self::FIELD_VALUE_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_HUMAN_NAME])) { + $v = $this->getValueHumanName(); + foreach($validationRules[self::FIELD_VALUE_HUMAN_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_HUMAN_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_HUMAN_NAME])) { + $errs[self::FIELD_VALUE_HUMAN_NAME] = []; + } + $errs[self::FIELD_VALUE_HUMAN_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ID])) { + $v = $this->getValueId(); + foreach($validationRules[self::FIELD_VALUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ID])) { + $errs[self::FIELD_VALUE_ID] = []; + } + $errs[self::FIELD_VALUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_IDENTIFIER])) { + $v = $this->getValueIdentifier(); + foreach($validationRules[self::FIELD_VALUE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_IDENTIFIER])) { + $errs[self::FIELD_VALUE_IDENTIFIER] = []; + } + $errs[self::FIELD_VALUE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INSTANT])) { + $v = $this->getValueInstant(); + foreach($validationRules[self::FIELD_VALUE_INSTANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_INSTANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INSTANT])) { + $errs[self::FIELD_VALUE_INSTANT] = []; + } + $errs[self::FIELD_VALUE_INSTANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_INTEGER])) { + $v = $this->getValueInteger(); + foreach($validationRules[self::FIELD_VALUE_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_INTEGER])) { + $errs[self::FIELD_VALUE_INTEGER] = []; + } + $errs[self::FIELD_VALUE_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MARKDOWN])) { + $v = $this->getValueMarkdown(); + foreach($validationRules[self::FIELD_VALUE_MARKDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_MARKDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MARKDOWN])) { + $errs[self::FIELD_VALUE_MARKDOWN] = []; + } + $errs[self::FIELD_VALUE_MARKDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_META])) { + $v = $this->getValueMeta(); + foreach($validationRules[self::FIELD_VALUE_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_META])) { + $errs[self::FIELD_VALUE_META] = []; + } + $errs[self::FIELD_VALUE_META][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_MONEY])) { + $v = $this->getValueMoney(); + foreach($validationRules[self::FIELD_VALUE_MONEY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_MONEY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_MONEY])) { + $errs[self::FIELD_VALUE_MONEY] = []; + } + $errs[self::FIELD_VALUE_MONEY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_OID])) { + $v = $this->getValueOid(); + foreach($validationRules[self::FIELD_VALUE_OID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_OID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_OID])) { + $errs[self::FIELD_VALUE_OID] = []; + } + $errs[self::FIELD_VALUE_OID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_POSITIVE_INT])) { + $v = $this->getValuePositiveInt(); + foreach($validationRules[self::FIELD_VALUE_POSITIVE_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_POSITIVE_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_POSITIVE_INT])) { + $errs[self::FIELD_VALUE_POSITIVE_INT] = []; + } + $errs[self::FIELD_VALUE_POSITIVE_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_REFERENCE])) { + $v = $this->getValueReference(); + foreach($validationRules[self::FIELD_VALUE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_REFERENCE])) { + $errs[self::FIELD_VALUE_REFERENCE] = []; + } + $errs[self::FIELD_VALUE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SIGNATURE])) { + $v = $this->getValueSignature(); + foreach($validationRules[self::FIELD_VALUE_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SIGNATURE])) { + $errs[self::FIELD_VALUE_SIGNATURE] = []; + } + $errs[self::FIELD_VALUE_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIMING])) { + $v = $this->getValueTiming(); + foreach($validationRules[self::FIELD_VALUE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIMING])) { + $errs[self::FIELD_VALUE_TIMING] = []; + } + $errs[self::FIELD_VALUE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_UNSIGNED_INT])) { + $v = $this->getValueUnsignedInt(); + foreach($validationRules[self::FIELD_VALUE_UNSIGNED_INT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_UNSIGNED_INT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_UNSIGNED_INT])) { + $errs[self::FIELD_VALUE_UNSIGNED_INT] = []; + } + $errs[self::FIELD_VALUE_UNSIGNED_INT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_URI])) { + $v = $this->getValueUri(); + foreach($validationRules[self::FIELD_VALUE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION, self::FIELD_VALUE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_URI])) { + $errs[self::FIELD_VALUE_URI] = []; + } + $errs[self::FIELD_VALUE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtensionContext.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtensionContext.php index 99b07cf9f3..b8a45be68c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtensionContext.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtensionContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRExtensionContext extends FHIRElement * Validation map for fields in type ExtensionContext * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExtensionContext Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRAllTypes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRAllTypes.php index b44c85a37c..780a85f94a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRAllTypes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRAllTypes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRFHIRAllTypes extends FHIRElement * Validation map for fields in type FHIRAllTypes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFHIRAllTypes Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FHIRALL_TYPES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDefinedType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDefinedType.php index 61c0129379..0174adffdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDefinedType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDefinedType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRFHIRDefinedType extends FHIRElement * Validation map for fields in type FHIRDefinedType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFHIRDefinedType Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FHIRDEFINED_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDeviceStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDeviceStatus.php index 5920015bb6..6af9d417c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDeviceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDeviceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFHIRDeviceStatus extends FHIRElement * Validation map for fields in type FHIRDeviceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFHIRDeviceStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FHIRDEVICE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRSubstanceStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRSubstanceStatus.php index d60fff99b5..afb427ea34 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRSubstanceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRSubstanceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFHIRSubstanceStatus extends FHIRElement * Validation map for fields in type FHIRSubstanceStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFHIRSubstanceStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FHIRSUBSTANCE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFamilyHistoryStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFamilyHistoryStatus.php index e98a95a1c6..7c0ea1185c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFamilyHistoryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFamilyHistoryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFamilyHistoryStatus extends FHIRElement * Validation map for fields in type FamilyHistoryStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyHistoryStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFilterOperator.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFilterOperator.php index 7a89cbcd08..e700399a86 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFilterOperator.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFilterOperator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFilterOperator extends FHIRElement * Validation map for fields in type FilterOperator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFilterOperator Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFinancialResourceStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFinancialResourceStatusCodes.php index e03c254b63..141cf631e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFinancialResourceStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFinancialResourceStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRFinancialResourceStatusCodes extends FHIRElement * Validation map for fields in type FinancialResourceStatusCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFinancialResourceStatusCodes Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FINANCIAL_RESOURCE_STATUS_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFlagStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFlagStatus.php index c504a04183..bf82ac182a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFlagStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFlagStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRFlagStatus extends FHIRElement * Validation map for fields in type FlagStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFlagStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGoalStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGoalStatus.php index 4e79c3423c..17389ce70a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGoalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGoalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGoalStatus extends FHIRElement * Validation map for fields in type GoalStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGoalStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGraphCompartmentRule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGraphCompartmentRule.php index d7697abe75..0a504ced23 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGraphCompartmentRule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGraphCompartmentRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGraphCompartmentRule extends FHIRElement * Validation map for fields in type GraphCompartmentRule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGraphCompartmentRule Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_COMPARTMENT_RULE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGroupType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGroupType.php index a1af432bc1..16e450df80 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGroupType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGroupType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGroupType extends FHIRElement * Validation map for fields in type GroupType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroupType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidanceResponseStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidanceResponseStatus.php index ff1b9a5628..09c1e5e010 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidanceResponseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidanceResponseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGuidanceResponseStatus extends FHIRElement * Validation map for fields in type GuidanceResponseStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuidanceResponseStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuideDependencyType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuideDependencyType.php index ccea41c2c6..fc7e830814 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuideDependencyType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuideDependencyType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGuideDependencyType extends FHIRElement * Validation map for fields in type GuideDependencyType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuideDependencyType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDE_DEPENDENCY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidePageKind.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidePageKind.php index 86d51194a6..ccb8fb1074 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidePageKind.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidePageKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGuidePageKind extends FHIRElement * Validation map for fields in type GuidePageKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuidePageKind Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDE_PAGE_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHTTPVerb.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHTTPVerb.php index 27e911c9ba..f7c5af2bfd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHTTPVerb.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHTTPVerb.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRHTTPVerb extends FHIRElement * Validation map for fields in type HTTPVerb * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHTTPVerb Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HTTPVERB, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHumanName.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHumanName.php index b6ca95f70a..87d0004dd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHumanName.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHumanName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -178,7 +178,7 @@ class FHIRHumanName extends FHIRElement * Validation map for fields in type HumanName * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHumanName Constructor @@ -743,11 +743,175 @@ public function setUse(FHIRNameUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getFamily())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FAMILY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GIVEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrefix())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PREFIX, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSuffix())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUFFIX, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_FAMILY])) { + $v = $this->getFamily(); + foreach($validationRules[self::FIELD_FAMILY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_FAMILY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FAMILY])) { + $errs[self::FIELD_FAMILY] = []; + } + $errs[self::FIELD_FAMILY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GIVEN])) { + $v = $this->getGiven(); + foreach($validationRules[self::FIELD_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GIVEN])) { + $errs[self::FIELD_GIVEN] = []; + } + $errs[self::FIELD_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREFIX])) { + $v = $this->getPrefix(); + foreach($validationRules[self::FIELD_PREFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_PREFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREFIX])) { + $errs[self::FIELD_PREFIX] = []; + } + $errs[self::FIELD_PREFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUFFIX])) { + $v = $this->getSuffix(); + foreach($validationRules[self::FIELD_SUFFIX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_SUFFIX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUFFIX])) { + $errs[self::FIELD_SUFFIX] = []; + } + $errs[self::FIELD_SUFFIX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HUMAN_NAME, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRId.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRId.php index 50e6111845..a840a90029 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRId.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRId extends FHIRElement * Validation map for fields in type id * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRId Constructor @@ -174,11 +174,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifier.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifier.php index 48c2f2b280..b4c255d9a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -164,7 +164,7 @@ class FHIRIdentifier extends FHIRElement * Validation map for fields in type Identifier * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentifier Constructor @@ -497,11 +497,152 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssigner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSIGNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSIGNER])) { + $v = $this->getAssigner(); + foreach($validationRules[self::FIELD_ASSIGNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_ASSIGNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSIGNER])) { + $errs[self::FIELD_ASSIGNER] = []; + } + $errs[self::FIELD_ASSIGNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifierUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifierUse.php index 70c3bc0281..0bcf016d19 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifierUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifierUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRIdentifierUse extends FHIRElement * Validation map for fields in type IdentifierUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentifierUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentityAssuranceLevel.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentityAssuranceLevel.php index fbbc456ffc..03525c3119 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentityAssuranceLevel.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentityAssuranceLevel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRIdentityAssuranceLevel extends FHIRElement * Validation map for fields in type IdentityAssuranceLevel * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIdentityAssuranceLevel Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IDENTITY_ASSURANCE_LEVEL, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRImmunizationStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRImmunizationStatusCodes.php index 859d7f0ea2..b7a6782a16 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRImmunizationStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRImmunizationStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRImmunizationStatusCodes extends FHIRElement * Validation map for fields in type ImmunizationStatusCodes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunizationStatusCodes Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_STATUS_CODES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstanceAvailability.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstanceAvailability.php index 80df322886..64417816a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstanceAvailability.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstanceAvailability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRInstanceAvailability extends FHIRElement * Validation map for fields in type InstanceAvailability * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInstanceAvailability Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANCE_AVAILABILITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstant.php index 1c8470bfa6..5a224f3872 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRInstant extends FHIRElement * Validation map for fields in type instant * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInstant Constructor @@ -173,11 +173,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInteger.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInteger.php index 8b7ba924ab..a5cbd9c46a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInteger.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInteger.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRInteger extends FHIRElement * Validation map for fields in type integer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInteger Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INTEGER, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueSeverity.php index 149ea71c98..8d6a0cf1c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRIssueSeverity extends FHIRElement * Validation map for fields in type IssueSeverity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIssueSeverity Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueType.php index b8cfd4ee22..4d91d69391 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRIssueType extends FHIRElement * Validation map for fields in type IssueType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRIssueType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ISSUE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkType.php index 12e36f0bf9..81ae46c5e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRLinkType extends FHIRElement * Validation map for fields in type LinkType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLinkType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINK_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkageType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkageType.php index ba753e4fe0..04801fa243 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkageType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkageType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRLinkageType extends FHIRElement * Validation map for fields in type LinkageType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLinkageType Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListMode.php index cd3ee57a5e..bb18025040 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRListMode extends FHIRElement * Validation map for fields in type ListMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListStatus.php index 3019f2cccb..24698d1b85 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRListStatus extends FHIRElement * Validation map for fields in type ListStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRListStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationMode.php index 0106f8707c..ca4a6ed319 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRLocationMode extends FHIRElement * Validation map for fields in type LocationMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationMode Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationStatus.php index 220544e4bc..ff1908b484 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRLocationStatus extends FHIRElement * Validation map for fields in type LocationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMarkdown.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMarkdown.php index d7560339b1..5c9794a501 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMarkdown.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMarkdown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRMarkdown extends FHIRElement * Validation map for fields in type markdown * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMarkdown Constructor @@ -177,11 +177,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKDOWN, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasmntPrinciple.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasmntPrinciple.php index 4e5125ef0c..00c70e0016 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasmntPrinciple.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasmntPrinciple.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMeasmntPrinciple extends FHIRElement * Validation map for fields in type MeasmntPrinciple * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasmntPrinciple Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASMNT_PRINCIPLE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportStatus.php index e20c730924..1b4f54f930 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMeasureReportStatus extends FHIRElement * Validation map for fields in type MeasureReportStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportType.php index 7a722c4ec6..e6d5dd2930 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMeasureReportType extends FHIRElement * Validation map for fields in type MeasureReportType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReportType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationAdministrationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationAdministrationStatus.php index cee8299646..d7e64a176e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationAdministrationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationAdministrationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationAdministrationStatus extends FHIRElement * Validation map for fields in type MedicationAdministrationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministrationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationDispenseStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationDispenseStatus.php index 042d2d8815..88dab256c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationDispenseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationDispenseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationDispenseStatus extends FHIRElement * Validation map for fields in type MedicationDispenseStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispenseStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestIntent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestIntent.php index 793aedfaf5..68523e5abd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationRequestIntent extends FHIRElement * Validation map for fields in type MedicationRequestIntent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequestIntent Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_INTENT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestPriority.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestPriority.php index d4e1f9edaf..beef545b1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationRequestPriority extends FHIRElement * Validation map for fields in type MedicationRequestPriority * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequestPriority Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_PRIORITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestStatus.php index 3781ee759a..3b155028a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMedicationRequestStatus extends FHIRElement * Validation map for fields in type MedicationRequestStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequestStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementStatus.php index b633250eae..960d89c91c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationStatementStatus extends FHIRElement * Validation map for fields in type MedicationStatementStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatementStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementTaken.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementTaken.php index 5eafc33a84..c168282747 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementTaken.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementTaken.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMedicationStatementTaken extends FHIRElement * Validation map for fields in type MedicationStatementTaken * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatementTaken Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_TAKEN, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatus.php index 5f8ab84b99..fb86320700 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationStatus extends FHIRElement * Validation map for fields in type MedicationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMessageSignificanceCategory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMessageSignificanceCategory.php index 7356e0a6cf..69c55d3814 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMessageSignificanceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMessageSignificanceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMessageSignificanceCategory extends FHIRElement * Validation map for fields in type MessageSignificanceCategory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageSignificanceCategory Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeta.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeta.php index cdfcb454eb..87a7e201c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeta.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeta.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -162,7 +162,7 @@ class FHIRMeta extends FHIRElement * Validation map for fields in type Meta * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeta Constructor @@ -602,11 +602,141 @@ public function setVersionId($versionId = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getLastUpdated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_UPDATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTag())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TAG, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersionId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION_ID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_LAST_UPDATED])) { + $v = $this->getLastUpdated(); + foreach($validationRules[self::FIELD_LAST_UPDATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_LAST_UPDATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_UPDATED])) { + $errs[self::FIELD_LAST_UPDATED] = []; + } + $errs[self::FIELD_LAST_UPDATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY])) { + $v = $this->getSecurity(); + foreach($validationRules[self::FIELD_SECURITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_SECURITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY])) { + $errs[self::FIELD_SECURITY] = []; + } + $errs[self::FIELD_SECURITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TAG])) { + $v = $this->getTag(); + foreach($validationRules[self::FIELD_TAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_TAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TAG])) { + $errs[self::FIELD_TAG] = []; + } + $errs[self::FIELD_TAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION_ID])) { + $v = $this->getVersionId(); + foreach($validationRules[self::FIELD_VERSION_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_META, self::FIELD_VERSION_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION_ID])) { + $errs[self::FIELD_VERSION_ID] = []; + } + $errs[self::FIELD_VERSION_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNameUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNameUse.php index 24c6322d42..7d1c725fda 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNameUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNameUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNameUse extends FHIRElement * Validation map for fields in type NameUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNameUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAME_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemIdentifierType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemIdentifierType.php index 50da55c493..b0d65b7c7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemIdentifierType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemIdentifierType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNamingSystemIdentifierType extends FHIRElement * Validation map for fields in type NamingSystemIdentifierType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNamingSystemIdentifierType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_IDENTIFIER_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemType.php index 15b1d82c1d..a0a3faccf5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNamingSystemType extends FHIRElement * Validation map for fields in type NamingSystemType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNamingSystemType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrative.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrative.php index fcca3dda87..8cb6e2402e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrative.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrative.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRNarrative extends FHIRElement * Validation map for fields in type Narrative * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNarrative Constructor @@ -238,11 +238,84 @@ public function setStatus(FHIRNarrativeStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDiv())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIV] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DIV])) { + $v = $this->getDiv(); + foreach($validationRules[self::FIELD_DIV] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE, self::FIELD_DIV, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIV])) { + $errs[self::FIELD_DIV] = []; + } + $errs[self::FIELD_DIV][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrativeStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrativeStatus.php index 9b98d97e13..66e09608d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrativeStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrativeStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRNarrativeStatus extends FHIRElement * Validation map for fields in type NarrativeStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNarrativeStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNoteType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNoteType.php index 58f7daacc9..f9c9faa4a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNoteType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNoteType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRNoteType extends FHIRElement * Validation map for fields in type NoteType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNoteType Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NOTE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNutritionOrderStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNutritionOrderStatus.php index 5a632cb218..7ff9850eb5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNutritionOrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNutritionOrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRNutritionOrderStatus extends FHIRElement * Validation map for fields in type NutritionOrderStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrderStatus Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationRelationshipType.php index 69f0ee3369..a5ff4c748e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRObservationRelationshipType extends FHIRElement * Validation map for fields in type ObservationRelationshipType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationRelationshipType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELATIONSHIP_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationStatus.php index cad0b82286..0941f2c3a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRObservationStatus extends FHIRElement * Validation map for fields in type ObservationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROid.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROid.php index 76fcc6d1c6..3d0ec28d0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROid.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIROid extends FHIRElement * Validation map for fields in type oid * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROid Constructor @@ -172,11 +172,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationKind.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationKind.php index baf12c3b9b..fb81bb27da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationKind.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIROperationKind extends FHIRElement * Validation map for fields in type OperationKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationKind Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationParameterUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationParameterUse.php index abe19795ab..aad7bfc904 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationParameterUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationParameterUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIROperationParameterUse extends FHIRElement * Validation map for fields in type OperationParameterUse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationParameterUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_PARAMETER_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParameterDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParameterDefinition.php index 5ffbb3a00b..0ad86915ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParameterDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParameterDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -186,7 +186,7 @@ class FHIRParameterDefinition extends FHIRElement * Validation map for fields in type ParameterDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParameterDefinition Constructor @@ -646,11 +646,169 @@ public function setUse($use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDocumentation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENTATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getMin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DOCUMENTATION])) { + $v = $this->getDocumentation(); + foreach($validationRules[self::FIELD_DOCUMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_DOCUMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENTATION])) { + $errs[self::FIELD_DOCUMENTATION] = []; + } + $errs[self::FIELD_DOCUMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAX])) { + $v = $this->getMax(); + foreach($validationRules[self::FIELD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAX])) { + $errs[self::FIELD_MAX] = []; + } + $errs[self::FIELD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MIN])) { + $v = $this->getMin(); + foreach($validationRules[self::FIELD_MIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_MIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MIN])) { + $errs[self::FIELD_MIN] = []; + } + $errs[self::FIELD_MIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETER_DEFINITION, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipantRequired.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipantRequired.php index f7634c2fd2..a2fdf452a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipantRequired.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipantRequired.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRParticipantRequired extends FHIRElement * Validation map for fields in type ParticipantRequired * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParticipantRequired Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARTICIPANT_REQUIRED, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipationStatus.php index e1b58fa2b9..5772037c8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRParticipationStatus extends FHIRElement * Validation map for fields in type ParticipationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParticipationStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARTICIPATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPeriod.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPeriod.php index 1621a73ca1..0fccbc0530 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPeriod.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPeriod.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRPeriod extends FHIRElement * Validation map for fields in type Period * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPeriod Constructor @@ -299,11 +299,84 @@ public function setStart($start = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERIOD, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERIOD, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPositiveInt.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPositiveInt.php index ae19f5fd7b..2ac7bc4e9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPositiveInt.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPositiveInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRPositiveInt extends FHIRElement * Validation map for fields in type positiveInt * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPositiveInt Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POSITIVE_INT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyRepresentation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyRepresentation.php index 7bbc76b28c..fd233436b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRPropertyRepresentation extends FHIRElement * Validation map for fields in type PropertyRepresentation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPropertyRepresentation Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyType.php index 2f51b5d413..09b1dc6986 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRPropertyType extends FHIRElement * Validation map for fields in type PropertyType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPropertyType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROPERTY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRProvenanceEntityRole.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRProvenanceEntityRole.php index 8f7f82d978..fd04ccde2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRProvenanceEntityRole.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRProvenanceEntityRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRProvenanceEntityRole extends FHIRElement * Validation map for fields in type ProvenanceEntityRole * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProvenanceEntityRole Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPublicationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPublicationStatus.php index a5ac6e4c2e..2d6ebf13df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPublicationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPublicationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRPublicationStatus extends FHIRElement * Validation map for fields in type PublicationStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPublicationStatus Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PUBLICATION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQualityType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQualityType.php index d4fdbdc20f..025e7c132b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQualityType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQualityType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQualityType extends FHIRElement * Validation map for fields in type qualityType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQualityType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUALITY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity.php index 95b4a0442e..f28d09844f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRQuantity extends FHIRElement * Validation map for fields in type Quantity * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuantity Constructor @@ -503,11 +503,135 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComparator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRAge.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRAge.php index 9b53733159..05b1238f64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRAge.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRAge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRAge extends FHIRQuantity * Validation map for fields in type Age * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAge Constructor @@ -127,11 +127,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRCount.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRCount.php index bffd02474d..d3f1fdfe94 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRCount.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRCount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRCount extends FHIRQuantity * Validation map for fields in type Count * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCount Constructor @@ -129,11 +129,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDistance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDistance.php index 1b407b6c59..57790e6b04 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDistance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDistance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDistance extends FHIRQuantity * Validation map for fields in type Distance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDistance Constructor @@ -127,11 +127,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDuration.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDuration.php index 06d8c4c6a5..24d88e3e92 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDuration.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDuration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDuration extends FHIRQuantity * Validation map for fields in type Duration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDuration Constructor @@ -127,11 +127,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRMoney.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRMoney.php index ee2b3cf7ef..fa9bdef2a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRMoney.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRMoney.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMoney extends FHIRQuantity * Validation map for fields in type Money * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMoney Constructor @@ -127,11 +127,110 @@ public function _getFHIRXMLElementDefinition() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantityComparator.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantityComparator.php index 31993da0fd..9eeefc4fc8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantityComparator.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantityComparator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuantityComparator extends FHIRElement * Validation map for fields in type QuantityComparator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuantityComparator Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireItemType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireItemType.php index aec3727912..c61ac56834 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireItemType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireItemType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRQuestionnaireItemType extends FHIRElement * Validation map for fields in type QuestionnaireItemType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireItemType Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_ITEM_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireResponseStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireResponseStatus.php index 9c45bdbc7f..1bfcdbcec1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireResponseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireResponseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuestionnaireResponseStatus extends FHIRElement * Validation map for fields in type QuestionnaireResponseStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponseStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRange.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRange.php index f85040e07f..d9f34c4899 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRange.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRRange extends FHIRElement * Validation map for fields in type Range * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRange Constructor @@ -237,11 +237,84 @@ public function setLow(FHIRQuantity $low = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getHigh())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIGH] = $fieldErrs; + } + } + if (null !== ($v = $this->getLow())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOW] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_HIGH])) { + $v = $this->getHigh(); + foreach($validationRules[self::FIELD_HIGH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RANGE, self::FIELD_HIGH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIGH])) { + $errs[self::FIELD_HIGH] = []; + } + $errs[self::FIELD_HIGH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOW])) { + $v = $this->getLow(); + foreach($validationRules[self::FIELD_LOW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RANGE, self::FIELD_LOW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOW])) { + $errs[self::FIELD_LOW] = []; + } + $errs[self::FIELD_LOW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRatio.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRatio.php index 05c1d8b710..c2de96e992 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRatio.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRatio.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRRatio extends FHIRElement * Validation map for fields in type Ratio * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRatio Constructor @@ -238,11 +238,84 @@ public function setNumerator(FHIRQuantity $numerator = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDenominator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DENOMINATOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumerator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMERATOR] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DENOMINATOR])) { + $v = $this->getDenominator(); + foreach($validationRules[self::FIELD_DENOMINATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RATIO, self::FIELD_DENOMINATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DENOMINATOR])) { + $errs[self::FIELD_DENOMINATOR] = []; + } + $errs[self::FIELD_DENOMINATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMERATOR])) { + $v = $this->getNumerator(); + foreach($validationRules[self::FIELD_NUMERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RATIO, self::FIELD_NUMERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMERATOR])) { + $errs[self::FIELD_NUMERATOR] = []; + } + $errs[self::FIELD_NUMERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReference.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReference.php index 6d78b4545c..563d3cfc1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReference.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIRReference extends FHIRElement * Validation map for fields in type Reference * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReference Constructor @@ -363,11 +363,101 @@ public function setReference($reference = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceHandlingPolicy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceHandlingPolicy.php index d87ea2d585..175a958c4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceHandlingPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceHandlingPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRReferenceHandlingPolicy extends FHIRElement * Validation map for fields in type ReferenceHandlingPolicy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReferenceHandlingPolicy Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE_HANDLING_POLICY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceVersionRules.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceVersionRules.php index 60f9640a12..5a81855750 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceVersionRules.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceVersionRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRReferenceVersionRules extends FHIRElement * Validation map for fields in type ReferenceVersionRules * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReferenceVersionRules Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERENCE_VERSION_RULES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifact.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifact.php index dd64b213a4..2a133d9d40 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifact.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -166,7 +166,7 @@ class FHIRRelatedArtifact extends FHIRElement * Validation map for fields in type RelatedArtifact * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRelatedArtifact Constructor @@ -523,11 +523,152 @@ public function setUrl($url = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCitation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CITATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplay())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocument())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getResource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CITATION])) { + $v = $this->getCitation(); + foreach($validationRules[self::FIELD_CITATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_CITATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CITATION])) { + $errs[self::FIELD_CITATION] = []; + } + $errs[self::FIELD_CITATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY])) { + $v = $this->getDisplay(); + foreach($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_DISPLAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY])) { + $errs[self::FIELD_DISPLAY] = []; + } + $errs[self::FIELD_DISPLAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENT])) { + $v = $this->getDocument(); + foreach($validationRules[self::FIELD_DOCUMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_DOCUMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENT])) { + $errs[self::FIELD_DOCUMENT] = []; + } + $errs[self::FIELD_DOCUMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifactType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifactType.php index c4c55f0137..2432533104 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifactType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifactType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRelatedArtifactType extends FHIRElement * Validation map for fields in type RelatedArtifactType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRelatedArtifactType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRemittanceOutcome.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRemittanceOutcome.php index 5975462c0c..ca63b36882 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRemittanceOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRemittanceOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRRemittanceOutcome extends FHIRElement * Validation map for fields in type RemittanceOutcome * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRemittanceOutcome Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REMITTANCE_OUTCOME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRepositoryType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRepositoryType.php index 46077f3bbf..4bd94d8d64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRepositoryType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRepositoryType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRepositoryType extends FHIRElement * Validation map for fields in type repositoryType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRepositoryType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REPOSITORY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestIntent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestIntent.php index 33d403460b..be1bfb24c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRequestIntent extends FHIRElement * Validation map for fields in type RequestIntent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestIntent Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_INTENT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestPriority.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestPriority.php index 039aab148d..aeaf78e1f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRequestPriority extends FHIRElement * Validation map for fields in type RequestPriority * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestPriority Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_PRIORITY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestStatus.php index 5330811915..1f98202eb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRequestStatus extends FHIRElement * Validation map for fields in type RequestStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchStudyStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchStudyStatus.php index a615590e35..7b4ebacfde 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchStudyStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchStudyStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResearchStudyStatus extends FHIRElement * Validation map for fields in type ResearchStudyStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchStudyStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchSubjectStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchSubjectStatus.php index 2ffd928ed5..58fb2a62ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchSubjectStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchSubjectStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResearchSubjectStatus extends FHIRElement * Validation map for fields in type ResearchSubjectStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchSubjectStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceType.php index 1b91bdc276..ea7abff1f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResourceType extends FHIRElement * Validation map for fields in type ResourceType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceVersionPolicy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceVersionPolicy.php index 2b4eb79ece..115030df05 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceVersionPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceVersionPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResourceVersionPolicy extends FHIRElement * Validation map for fields in type ResourceVersionPolicy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceVersionPolicy Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE_VERSION_POLICY, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResponseType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResponseType.php index d159c45758..2a2d67762f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResponseType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResponseType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRResponseType extends FHIRElement * Validation map for fields in type ResponseType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResponseType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRestfulCapabilityMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRestfulCapabilityMode.php index 482b48dba8..c2317a2f0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRestfulCapabilityMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRestfulCapabilityMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRestfulCapabilityMode extends FHIRElement * Validation map for fields in type RestfulCapabilityMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRestfulCapabilityMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESTFUL_CAPABILITY_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledData.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledData.php index b4de1b88e9..8dfb304662 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledData.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -187,7 +187,7 @@ class FHIRSampledData extends FHIRElement * Validation map for fields in type SampledData * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSampledData Constructor @@ -651,11 +651,169 @@ public function setUpperLimit($upperLimit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getDimensions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIMENSIONS] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getLowerLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOWER_LIMIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getUpperLimit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UPPER_LIMIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIMENSIONS])) { + $v = $this->getDimensions(); + foreach($validationRules[self::FIELD_DIMENSIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_DIMENSIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIMENSIONS])) { + $errs[self::FIELD_DIMENSIONS] = []; + } + $errs[self::FIELD_DIMENSIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR])) { + $v = $this->getFactor(); + foreach($validationRules[self::FIELD_FACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_FACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR])) { + $errs[self::FIELD_FACTOR] = []; + } + $errs[self::FIELD_FACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOWER_LIMIT])) { + $v = $this->getLowerLimit(); + foreach($validationRules[self::FIELD_LOWER_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_LOWER_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOWER_LIMIT])) { + $errs[self::FIELD_LOWER_LIMIT] = []; + } + $errs[self::FIELD_LOWER_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UPPER_LIMIT])) { + $v = $this->getUpperLimit(); + foreach($validationRules[self::FIELD_UPPER_LIMIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA, self::FIELD_UPPER_LIMIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UPPER_LIMIT])) { + $errs[self::FIELD_UPPER_LIMIT] = []; + } + $errs[self::FIELD_UPPER_LIMIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledDataDataType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledDataDataType.php index 3f54acaf7d..8b3a818332 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledDataDataType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledDataDataType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRSampledDataDataType extends FHIRElement * Validation map for fields in type SampledDataDataType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSampledDataDataType Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchComparator.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchComparator.php index 8fe0afa2b9..eaa15876e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchComparator.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchComparator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSearchComparator extends FHIRElement * Validation map for fields in type SearchComparator * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchComparator Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_COMPARATOR, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchEntryMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchEntryMode.php index d1f20815a5..33b5680cee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchEntryMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchEntryMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSearchEntryMode extends FHIRElement * Validation map for fields in type SearchEntryMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchEntryMode Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_ENTRY_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchModifierCode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchModifierCode.php index a823aca2ea..ae6309c05c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchModifierCode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchModifierCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSearchModifierCode extends FHIRElement * Validation map for fields in type SearchModifierCode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchModifierCode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_MODIFIER_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchParamType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchParamType.php index fb0d07c2c4..12910d75f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchParamType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchParamType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRSearchParamType extends FHIRElement * Validation map for fields in type SearchParamType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSearchParamType Constructor @@ -165,11 +165,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSignature.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSignature.php index e2e2db283f..16259c1c2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSignature.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSignature.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -202,7 +202,7 @@ class FHIRSignature extends FHIRElement * Validation map for fields in type Signature * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_TYPE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -726,11 +726,188 @@ public function setWhoUri($whoUri = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBlob())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BLOB] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOfReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnBehalfOfUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ON_BEHALF_OF_URI] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getWhen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhoReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhoUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHO_URI] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BLOB])) { + $v = $this->getBlob(); + foreach($validationRules[self::FIELD_BLOB] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_BLOB, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BLOB])) { + $errs[self::FIELD_BLOB] = []; + } + $errs[self::FIELD_BLOB][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF_REFERENCE])) { + $v = $this->getOnBehalfOfReference(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_ON_BEHALF_OF_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF_REFERENCE])) { + $errs[self::FIELD_ON_BEHALF_OF_REFERENCE] = []; + } + $errs[self::FIELD_ON_BEHALF_OF_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ON_BEHALF_OF_URI])) { + $v = $this->getOnBehalfOfUri(); + foreach($validationRules[self::FIELD_ON_BEHALF_OF_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_ON_BEHALF_OF_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ON_BEHALF_OF_URI])) { + $errs[self::FIELD_ON_BEHALF_OF_URI] = []; + } + $errs[self::FIELD_ON_BEHALF_OF_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN])) { + $v = $this->getWhen(); + foreach($validationRules[self::FIELD_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN])) { + $errs[self::FIELD_WHEN] = []; + } + $errs[self::FIELD_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO_REFERENCE])) { + $v = $this->getWhoReference(); + foreach($validationRules[self::FIELD_WHO_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_WHO_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO_REFERENCE])) { + $errs[self::FIELD_WHO_REFERENCE] = []; + } + $errs[self::FIELD_WHO_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHO_URI])) { + $v = $this->getWhoUri(); + foreach($validationRules[self::FIELD_WHO_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SIGNATURE, self::FIELD_WHO_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHO_URI])) { + $errs[self::FIELD_WHO_URI] = []; + } + $errs[self::FIELD_WHO_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlicingRules.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlicingRules.php index 44470ad3ba..056d4dc99d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlicingRules.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlicingRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSlicingRules extends FHIRElement * Validation map for fields in type SlicingRules * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSlicingRules Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLICING_RULES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlotStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlotStatus.php index a3c94371fa..535db723d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlotStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlotStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSlotStatus extends FHIRElement * Validation map for fields in type SlotStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSlotStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSpecimenStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSpecimenStatus.php index dfa39e93e0..d3ee9d3cba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSpecimenStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSpecimenStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSpecimenStatus extends FHIRElement * Validation map for fields in type SpecimenStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimenStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRString.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRString.php index a92aca3e4d..8b2d5b3817 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRString.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRString.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRString extends FHIRElement * Validation map for fields in type string * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRString Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureDefinitionKind.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureDefinitionKind.php index 46f94da939..42ad1587ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureDefinitionKind.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureDefinitionKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureDefinitionKind extends FHIRElement * Validation map for fields in type StructureDefinitionKind * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinitionKind Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_KIND, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapContextType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapContextType.php index cb595f17bb..a4596a79d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapContextType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapContextType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapContextType extends FHIRElement * Validation map for fields in type StructureMapContextType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapContextType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_CONTEXT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapGroupTypeMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapGroupTypeMode.php index 28b23fdf91..a5c9907ade 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapGroupTypeMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapGroupTypeMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRStructureMapGroupTypeMode extends FHIRElement * Validation map for fields in type StructureMapGroupTypeMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapGroupTypeMode Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_GROUP_TYPE_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapInputMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapInputMode.php index ca479cd7b8..2b0e9f9e58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapInputMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapInputMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapInputMode extends FHIRElement * Validation map for fields in type StructureMapInputMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapInputMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_INPUT_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapModelMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapModelMode.php index 23c32de973..3be8dfde77 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapModelMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapModelMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapModelMode extends FHIRElement * Validation map for fields in type StructureMapModelMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapModelMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_MODEL_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapSourceListMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapSourceListMode.php index c636f80f80..7ef414305d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapSourceListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapSourceListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapSourceListMode extends FHIRElement * Validation map for fields in type StructureMapSourceListMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapSourceListMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_SOURCE_LIST_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTargetListMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTargetListMode.php index 63da001743..69454da850 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTargetListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTargetListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapTargetListMode extends FHIRElement * Validation map for fields in type StructureMapTargetListMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapTargetListMode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TARGET_LIST_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTransform.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTransform.php index 8b96bdc627..8aa2b9ddf6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTransform.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTransform.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRStructureMapTransform extends FHIRElement * Validation map for fields in type StructureMapTransform * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureMapTransform Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TRANSFORM, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionChannelType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionChannelType.php index ada47c61dd..5e92cb351f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionChannelType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionChannelType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSubscriptionChannelType extends FHIRElement * Validation map for fields in type SubscriptionChannelType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscriptionChannelType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_CHANNEL_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionStatus.php index bebe78da3e..a57950c80f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSubscriptionStatus extends FHIRElement * Validation map for fields in type SubscriptionStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscriptionStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyDeliveryStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyDeliveryStatus.php index aae504de35..55bf076484 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyDeliveryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyDeliveryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSupplyDeliveryStatus extends FHIRElement * Validation map for fields in type SupplyDeliveryStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyDeliveryStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyRequestStatus.php index 3cb7fd4252..87905f2d23 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSupplyRequestStatus extends FHIRElement * Validation map for fields in type SupplyRequestStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyRequestStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemRestfulInteraction.php index 3d84c7a274..76ca0e8684 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSystemRestfulInteraction extends FHIRElement * Validation map for fields in type SystemRestfulInteraction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSystemRestfulInteraction Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SYSTEM_RESTFUL_INTERACTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemVersionProcessingMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemVersionProcessingMode.php index 0c5f57fa32..1ce5e15450 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemVersionProcessingMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemVersionProcessingMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSystemVersionProcessingMode extends FHIRElement * Validation map for fields in type SystemVersionProcessingMode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSystemVersionProcessingMode Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SYSTEM_VERSION_PROCESSING_MODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTaskStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTaskStatus.php index 5e933af66e..3b3458d2fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTaskStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTaskStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTaskStatus extends FHIRElement * Validation map for fields in type TaskStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTaskStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportActionResult.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportActionResult.php index 29b128d9c0..79e72c6592 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportActionResult.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportActionResult.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTestReportActionResult extends FHIRElement * Validation map for fields in type TestReportActionResult * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportActionResult Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_ACTION_RESULT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportParticipantType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportParticipantType.php index 935dd92765..8fd63578ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportParticipantType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportParticipantType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTestReportParticipantType extends FHIRElement * Validation map for fields in type TestReportParticipantType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportParticipantType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_PARTICIPANT_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportResult.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportResult.php index 398a68f7be..3d234a816c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportResult.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportResult.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTestReportResult extends FHIRElement * Validation map for fields in type TestReportResult * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportResult Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_RESULT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportStatus.php index f76b3ff3c5..afd45d79a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTestReportStatus extends FHIRElement * Validation map for fields in type TestReportStatus * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReportStatus Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT_STATUS, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestScriptRequestMethodCode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestScriptRequestMethodCode.php index 59c69be262..3191e239c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestScriptRequestMethodCode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestScriptRequestMethodCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTestScriptRequestMethodCode extends FHIRElement * Validation map for fields in type TestScriptRequestMethodCode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScriptRequestMethodCode Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_REQUEST_METHOD_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTime.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTime.php index c7d9d83a07..28563b0f90 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTime.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTime extends FHIRElement * Validation map for fields in type time * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTime Constructor @@ -170,11 +170,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming.php index 84e17123b1..041e1b2614 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRTiming extends FHIRElement * Validation map for fields in type Timing * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTiming Constructor @@ -387,11 +387,103 @@ public function setRepeat(FHIRTimingRepeat $repeat = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRepeat())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPEAT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPEAT])) { + $v = $this->getRepeat(); + foreach($validationRules[self::FIELD_REPEAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING, self::FIELD_REPEAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPEAT])) { + $errs[self::FIELD_REPEAT] = []; + } + $errs[self::FIELD_REPEAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming/FHIRTimingRepeat.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming/FHIRTimingRepeat.php index 711b3850e5..a3ba955319 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming/FHIRTimingRepeat.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming/FHIRTimingRepeat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -331,7 +331,7 @@ class FHIRTimingRepeat extends FHIRElement * Validation map for fields in type Timing.Repeat * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTimingRepeat Constructor @@ -1462,11 +1462,345 @@ public function setWhen(array $when = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBoundsDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BOUNDS_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getBoundsPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BOUNDS_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getBoundsRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BOUNDS_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCountMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT_MAX] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDayOfWeek())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DAY_OF_WEEK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDurationMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getDurationUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION_UNIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrequency())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FREQUENCY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrequencyMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FREQUENCY_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getOffset())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OFFSET] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriodMax())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD_MAX] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriodUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD_UNIT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTimeOfDay())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TIME_OF_DAY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getWhen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_WHEN, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_BOUNDS_DURATION])) { + $v = $this->getBoundsDuration(); + foreach($validationRules[self::FIELD_BOUNDS_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_BOUNDS_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BOUNDS_DURATION])) { + $errs[self::FIELD_BOUNDS_DURATION] = []; + } + $errs[self::FIELD_BOUNDS_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BOUNDS_PERIOD])) { + $v = $this->getBoundsPeriod(); + foreach($validationRules[self::FIELD_BOUNDS_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_BOUNDS_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BOUNDS_PERIOD])) { + $errs[self::FIELD_BOUNDS_PERIOD] = []; + } + $errs[self::FIELD_BOUNDS_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BOUNDS_RANGE])) { + $v = $this->getBoundsRange(); + foreach($validationRules[self::FIELD_BOUNDS_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_BOUNDS_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BOUNDS_RANGE])) { + $errs[self::FIELD_BOUNDS_RANGE] = []; + } + $errs[self::FIELD_BOUNDS_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT])) { + $v = $this->getCount(); + foreach($validationRules[self::FIELD_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT])) { + $errs[self::FIELD_COUNT] = []; + } + $errs[self::FIELD_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT_MAX])) { + $v = $this->getCountMax(); + foreach($validationRules[self::FIELD_COUNT_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_COUNT_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT_MAX])) { + $errs[self::FIELD_COUNT_MAX] = []; + } + $errs[self::FIELD_COUNT_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAY_OF_WEEK])) { + $v = $this->getDayOfWeek(); + foreach($validationRules[self::FIELD_DAY_OF_WEEK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DAY_OF_WEEK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAY_OF_WEEK])) { + $errs[self::FIELD_DAY_OF_WEEK] = []; + } + $errs[self::FIELD_DAY_OF_WEEK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION_MAX])) { + $v = $this->getDurationMax(); + foreach($validationRules[self::FIELD_DURATION_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DURATION_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION_MAX])) { + $errs[self::FIELD_DURATION_MAX] = []; + } + $errs[self::FIELD_DURATION_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION_UNIT])) { + $v = $this->getDurationUnit(); + foreach($validationRules[self::FIELD_DURATION_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_DURATION_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION_UNIT])) { + $errs[self::FIELD_DURATION_UNIT] = []; + } + $errs[self::FIELD_DURATION_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FREQUENCY])) { + $v = $this->getFrequency(); + foreach($validationRules[self::FIELD_FREQUENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_FREQUENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FREQUENCY])) { + $errs[self::FIELD_FREQUENCY] = []; + } + $errs[self::FIELD_FREQUENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FREQUENCY_MAX])) { + $v = $this->getFrequencyMax(); + foreach($validationRules[self::FIELD_FREQUENCY_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_FREQUENCY_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FREQUENCY_MAX])) { + $errs[self::FIELD_FREQUENCY_MAX] = []; + } + $errs[self::FIELD_FREQUENCY_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OFFSET])) { + $v = $this->getOffset(); + foreach($validationRules[self::FIELD_OFFSET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_OFFSET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OFFSET])) { + $errs[self::FIELD_OFFSET] = []; + } + $errs[self::FIELD_OFFSET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD_MAX])) { + $v = $this->getPeriodMax(); + foreach($validationRules[self::FIELD_PERIOD_MAX] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_PERIOD_MAX, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD_MAX])) { + $errs[self::FIELD_PERIOD_MAX] = []; + } + $errs[self::FIELD_PERIOD_MAX][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD_UNIT])) { + $v = $this->getPeriodUnit(); + foreach($validationRules[self::FIELD_PERIOD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_PERIOD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD_UNIT])) { + $errs[self::FIELD_PERIOD_UNIT] = []; + } + $errs[self::FIELD_PERIOD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIME_OF_DAY])) { + $v = $this->getTimeOfDay(); + foreach($validationRules[self::FIELD_TIME_OF_DAY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_TIME_OF_DAY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIME_OF_DAY])) { + $errs[self::FIELD_TIME_OF_DAY] = []; + } + $errs[self::FIELD_TIME_OF_DAY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN])) { + $v = $this->getWhen(); + foreach($validationRules[self::FIELD_WHEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIMING_DOT_REPEAT, self::FIELD_WHEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN])) { + $errs[self::FIELD_WHEN] = []; + } + $errs[self::FIELD_WHEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerDefinition.php index cd89aa18d3..8515a96e85 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -182,7 +182,7 @@ class FHIRTriggerDefinition extends FHIRElement * Validation map for fields in type TriggerDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTriggerDefinition Constructor @@ -586,11 +586,169 @@ public function setType(FHIRTriggerType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getEventData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventTimingDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_TIMING_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventTimingReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_TIMING_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_TIMING_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_EVENT_DATA])) { + $v = $this->getEventData(); + foreach($validationRules[self::FIELD_EVENT_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_EVENT_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_DATA])) { + $errs[self::FIELD_EVENT_DATA] = []; + } + $errs[self::FIELD_EVENT_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_NAME])) { + $v = $this->getEventName(); + foreach($validationRules[self::FIELD_EVENT_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_EVENT_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_NAME])) { + $errs[self::FIELD_EVENT_NAME] = []; + } + $errs[self::FIELD_EVENT_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_TIMING_DATE])) { + $v = $this->getEventTimingDate(); + foreach($validationRules[self::FIELD_EVENT_TIMING_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_EVENT_TIMING_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_TIMING_DATE])) { + $errs[self::FIELD_EVENT_TIMING_DATE] = []; + } + $errs[self::FIELD_EVENT_TIMING_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_TIMING_DATE_TIME])) { + $v = $this->getEventTimingDateTime(); + foreach($validationRules[self::FIELD_EVENT_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_EVENT_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_TIMING_DATE_TIME])) { + $errs[self::FIELD_EVENT_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_EVENT_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_TIMING_REFERENCE])) { + $v = $this->getEventTimingReference(); + foreach($validationRules[self::FIELD_EVENT_TIMING_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_EVENT_TIMING_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_TIMING_REFERENCE])) { + $errs[self::FIELD_EVENT_TIMING_REFERENCE] = []; + } + $errs[self::FIELD_EVENT_TIMING_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_TIMING_TIMING])) { + $v = $this->getEventTimingTiming(); + foreach($validationRules[self::FIELD_EVENT_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_EVENT_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_TIMING_TIMING])) { + $errs[self::FIELD_EVENT_TIMING_TIMING] = []; + } + $errs[self::FIELD_EVENT_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerType.php index 8e5b16a8ab..53c4722491 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTriggerType extends FHIRElement * Validation map for fields in type TriggerType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTriggerType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TRIGGER_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeDerivationRule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeDerivationRule.php index 33ef1218f0..2595c4715e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeDerivationRule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeDerivationRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTypeDerivationRule extends FHIRElement * Validation map for fields in type TypeDerivationRule * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTypeDerivationRule Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TYPE_DERIVATION_RULE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeRestfulInteraction.php index 863569c942..c489109839 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRTypeRestfulInteraction extends FHIRElement * Validation map for fields in type TypeRestfulInteraction * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTypeRestfulInteraction Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TYPE_RESTFUL_INTERACTION, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUDIEntryType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUDIEntryType.php index 3828d930fb..e4137524fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUDIEntryType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUDIEntryType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRUDIEntryType extends FHIRElement * Validation map for fields in type UDIEntryType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUDIEntryType Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UDIENTRY_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnitsOfTime.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnitsOfTime.php index 19b137ca98..8aeaed8119 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnitsOfTime.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnitsOfTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRUnitsOfTime extends FHIRElement * Validation map for fields in type UnitsOfTime * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUnitsOfTime Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnknownContentCode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnknownContentCode.php index 16deaf295b..a61a4c5308 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnknownContentCode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnknownContentCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRUnknownContentCode extends FHIRElement * Validation map for fields in type UnknownContentCode * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUnknownContentCode Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNKNOWN_CONTENT_CODE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnsignedInt.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnsignedInt.php index d41615d322..f44b1f8e3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnsignedInt.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnsignedInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRUnsignedInt extends FHIRElement * Validation map for fields in type unsignedInt * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUnsignedInt Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUri.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUri.php index 00f5b54687..57fe015bf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUri.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUri.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRUri extends FHIRElement * Validation map for fields in type uri * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUri Constructor @@ -171,11 +171,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_URI, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUsageContext.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUsageContext.php index e8d375a257..160f8376b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUsageContext.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUsageContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRUsageContext extends FHIRElement * Validation map for fields in type UsageContext * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUsageContext Constructor @@ -347,11 +347,118 @@ public function setValueRange(FHIRRange $valueRange = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USAGE_CONTEXT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USAGE_CONTEXT, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USAGE_CONTEXT, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USAGE_CONTEXT, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUse.php index a53ef617ba..a2ca49306a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRUse extends FHIRElement * Validation map for fields in type Use * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUse Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_USE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUuid.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUuid.php index fc58b2cdf2..62daf170f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUuid.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUuid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRUuid extends FHIRElement * Validation map for fields in type uuid * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUuid Constructor @@ -172,11 +172,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UUID, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionBase.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionBase.php index 77a9f11359..2ef7837e05 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRVisionBase extends FHIRElement * Validation map for fields in type VisionBase * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionBase Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_BASE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionEyes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionEyes.php index f44570a279..a72abca7a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionEyes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionEyes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRVisionEyes extends FHIRElement * Validation map for fields in type VisionEyes * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionEyes Constructor @@ -166,11 +166,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_EYES, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRXPathUsageType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRXPathUsageType.php index 4c1d86e5bd..2820641f37 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRXPathUsageType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRXPathUsageType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRXPathUsageType extends FHIRElement * Validation map for fields in type XPathUsageType * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRXPathUsageType Constructor @@ -167,11 +167,67 @@ public function setValue($value = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getValue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_VALUE])) { + $v = $this->getValue(); + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_XPATH_USAGE_TYPE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIdPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIdPrimitive.php index 334534e25d..d560f167ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIdPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIdPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRIdPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRIdPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type id-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[A-Za-z0-9\\-\\.]{1,64}$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -170,11 +172,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRInstantPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRInstantPrimitive.php index 10deeb6f8d..9dd25194da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRInstantPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRInstantPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRInstantPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANT_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRInstantPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type instant-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRInstantPrimitive Constructor @@ -173,7 +175,7 @@ public function _getDateTime() if (null === $v) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -184,11 +186,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INSTANT_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIntegerPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIntegerPrimitive.php index fca82f8d67..0351ef3a8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIntegerPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIntegerPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INTEGER_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type integer-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^-?([0]|([1-9][0-9]*))$/', ], @@ -181,11 +183,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_INTEGER_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRMarkdownPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRMarkdownPrimitive.php index 1e67117c71..5ee89b0f61 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRMarkdownPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRMarkdownPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRMarkdownPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MARKDOWN_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRMarkdownPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type markdown-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, ], @@ -168,11 +170,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MARKDOWN_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIROidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIROidPrimitive.php index 35d8603393..fab0351acb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIROidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIROidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIROidPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIROidPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type oid-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^urn:oid:(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))*$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,11 +171,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRPositiveIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRPositiveIntPrimitive.php index 6a4265e2f6..1bd705ae14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRPositiveIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRPositiveIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRPositiveIntPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_POSITIVE_INT_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRPositiveIntPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type positiveInt-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[1-9][0-9]*$/', ], @@ -181,11 +183,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_POSITIVE_INT_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource.php index 79d74f38ff..260115f703 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -76,6 +76,7 @@ class FHIRResource implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE; @@ -149,7 +150,7 @@ class FHIRResource implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInter * Validation map for fields in type Resource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResource Constructor @@ -460,11 +461,46 @@ public function setMeta(FHIRMeta $meta = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getImplicitRules())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLICIT_RULES] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeta())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_META] = $fieldErrs; + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBinary.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBinary.php index 3091928d11..11bdd62b33 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBinary.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBinary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRBinary extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Binary * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBinary Constructor @@ -339,11 +339,125 @@ public function setSecurityContext(FHIRReference $securityContext = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSecurityContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SECURITY_CONTEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINARY, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_TYPE])) { + $v = $this->getContentType(); + foreach($validationRules[self::FIELD_CONTENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINARY, self::FIELD_CONTENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_TYPE])) { + $errs[self::FIELD_CONTENT_TYPE] = []; + } + $errs[self::FIELD_CONTENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_CONTEXT])) { + $v = $this->getSecurityContext(); + foreach($validationRules[self::FIELD_SECURITY_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BINARY, self::FIELD_SECURITY_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_CONTEXT])) { + $errs[self::FIELD_SECURITY_CONTEXT] = []; + } + $errs[self::FIELD_SECURITY_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBundle.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBundle.php index 0849554e47..f27ddbd515 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBundle.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBundle.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -167,7 +167,7 @@ class FHIRBundle extends FHIRResource implements PHPFHIRContainedTypeInterface * Validation map for fields in type Bundle * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBundle Constructor @@ -551,11 +551,180 @@ public function setType(FHIRBundleType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTRY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSignature())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SIGNATURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ENTRY])) { + $v = $this->getEntry(); + foreach($validationRules[self::FIELD_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY])) { + $errs[self::FIELD_ENTRY] = []; + } + $errs[self::FIELD_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNATURE])) { + $v = $this->getSignature(); + foreach($validationRules[self::FIELD_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNATURE])) { + $errs[self::FIELD_SIGNATURE] = []; + } + $errs[self::FIELD_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BUNDLE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource.php index 26396bf9b1..da857a684e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -151,7 +151,7 @@ class FHIRDomainResource extends FHIRResource * Validation map for fields in type DomainResource * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDomainResource Constructor @@ -513,11 +513,148 @@ public function setText(FHIRNarrative $text = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContained())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINED, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXTENSION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getModifierExtension())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER_EXTENSION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getText())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEXT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAccount.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAccount.php index 43774bea26..ec05c75b1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAccount.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAccount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -250,7 +250,7 @@ class FHIRAccount extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Account * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAccount Constructor @@ -932,11 +932,332 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBalance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BALANCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCoverage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COVERAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGuarantor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GUARANTOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOwner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BALANCE])) { + $v = $this->getBalance(); + foreach($validationRules[self::FIELD_BALANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_BALANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BALANCE])) { + $errs[self::FIELD_BALANCE] = []; + } + $errs[self::FIELD_BALANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GUARANTOR])) { + $v = $this->getGuarantor(); + foreach($validationRules[self::FIELD_GUARANTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_GUARANTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GUARANTOR])) { + $errs[self::FIELD_GUARANTOR] = []; + } + $errs[self::FIELD_GUARANTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNER])) { + $v = $this->getOwner(); + foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_OWNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNER])) { + $errs[self::FIELD_OWNER] = []; + } + $errs[self::FIELD_OWNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACCOUNT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php index 297769ddd9..e59b43c1f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -672,7 +672,7 @@ class FHIRActivityDefinition extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type ActivityDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRActivityDefinition Constructor @@ -3143,11 +3143,792 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContributor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRIBUTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDosage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDynamicValue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DYNAMIC_VALUE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLibrary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIBRARY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProductCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getProductReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRODUCT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTransform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TRANSFORM] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRIBUTOR])) { + $v = $this->getContributor(); + foreach($validationRules[self::FIELD_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRIBUTOR])) { + $errs[self::FIELD_CONTRIBUTOR] = []; + } + $errs[self::FIELD_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DYNAMIC_VALUE])) { + $v = $this->getDynamicValue(); + foreach($validationRules[self::FIELD_DYNAMIC_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_DYNAMIC_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DYNAMIC_VALUE])) { + $errs[self::FIELD_DYNAMIC_VALUE] = []; + } + $errs[self::FIELD_DYNAMIC_VALUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIBRARY])) { + $v = $this->getLibrary(); + foreach($validationRules[self::FIELD_LIBRARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_LIBRARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIBRARY])) { + $errs[self::FIELD_LIBRARY] = []; + } + $errs[self::FIELD_LIBRARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $v = $this->getProductCodeableConcept(); + foreach($validationRules[self::FIELD_PRODUCT_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PRODUCT_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PRODUCT_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCT_REFERENCE])) { + $v = $this->getProductReference(); + foreach($validationRules[self::FIELD_PRODUCT_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PRODUCT_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCT_REFERENCE])) { + $errs[self::FIELD_PRODUCT_REFERENCE] = []; + } + $errs[self::FIELD_PRODUCT_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_RANGE])) { + $v = $this->getTimingRange(); + foreach($validationRules[self::FIELD_TIMING_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TIMING_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_RANGE])) { + $errs[self::FIELD_TIMING_RANGE] = []; + } + $errs[self::FIELD_TIMING_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRANSFORM])) { + $v = $this->getTransform(); + foreach($validationRules[self::FIELD_TRANSFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_TRANSFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRANSFORM])) { + $errs[self::FIELD_TRANSFORM] = []; + } + $errs[self::FIELD_TRANSFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ACTIVITY_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php index b5a872d89e..b30b451511 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -308,7 +308,7 @@ class FHIRAdverseEvent extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type AdverseEvent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAdverseEvent Constructor @@ -1234,11 +1234,404 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEventParticipant())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT_PARTICIPANT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReaction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferenceDocument())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_DOCUMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSeriousness())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERIOUSNESS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStudy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STUDY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubjectMedicalHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT_MEDICAL_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSuspectEntity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUSPECT_ENTITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_PARTICIPANT])) { + $v = $this->getEventParticipant(); + foreach($validationRules[self::FIELD_EVENT_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_EVENT_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_PARTICIPANT])) { + $errs[self::FIELD_EVENT_PARTICIPANT] = []; + } + $errs[self::FIELD_EVENT_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REACTION])) { + $v = $this->getReaction(); + foreach($validationRules[self::FIELD_REACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_REACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REACTION])) { + $errs[self::FIELD_REACTION] = []; + } + $errs[self::FIELD_REACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_DOCUMENT])) { + $v = $this->getReferenceDocument(); + foreach($validationRules[self::FIELD_REFERENCE_DOCUMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_REFERENCE_DOCUMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_DOCUMENT])) { + $errs[self::FIELD_REFERENCE_DOCUMENT] = []; + } + $errs[self::FIELD_REFERENCE_DOCUMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIOUSNESS])) { + $v = $this->getSeriousness(); + foreach($validationRules[self::FIELD_SERIOUSNESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_SERIOUSNESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIOUSNESS])) { + $errs[self::FIELD_SERIOUSNESS] = []; + } + $errs[self::FIELD_SERIOUSNESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY])) { + $v = $this->getStudy(); + foreach($validationRules[self::FIELD_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY])) { + $errs[self::FIELD_STUDY] = []; + } + $errs[self::FIELD_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_MEDICAL_HISTORY])) { + $v = $this->getSubjectMedicalHistory(); + foreach($validationRules[self::FIELD_SUBJECT_MEDICAL_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_SUBJECT_MEDICAL_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_MEDICAL_HISTORY])) { + $errs[self::FIELD_SUBJECT_MEDICAL_HISTORY] = []; + } + $errs[self::FIELD_SUBJECT_MEDICAL_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUSPECT_ENTITY])) { + $v = $this->getSuspectEntity(); + foreach($validationRules[self::FIELD_SUSPECT_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_SUSPECT_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUSPECT_ENTITY])) { + $errs[self::FIELD_SUSPECT_ENTITY] = []; + } + $errs[self::FIELD_SUSPECT_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php index e28fce65ec..40eec7e0e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -366,7 +366,7 @@ class FHIRAllergyIntolerance extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type AllergyIntolerance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAllergyIntolerance Constructor @@ -1504,11 +1504,453 @@ public function setVerificationStatus(FHIRAllergyIntoleranceVerificationStatus $ } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAssertedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERTED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsserter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClinicalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCriticality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITICALITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastOccurrence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_OCCURRENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOnsetAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReaction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getVerificationStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERIFICATION_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ASSERTED_DATE])) { + $v = $this->getAssertedDate(); + foreach($validationRules[self::FIELD_ASSERTED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ASSERTED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERTED_DATE])) { + $errs[self::FIELD_ASSERTED_DATE] = []; + } + $errs[self::FIELD_ASSERTED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSERTER])) { + $v = $this->getAsserter(); + foreach($validationRules[self::FIELD_ASSERTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ASSERTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERTER])) { + $errs[self::FIELD_ASSERTER] = []; + } + $errs[self::FIELD_ASSERTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLINICAL_STATUS])) { + $v = $this->getClinicalStatus(); + foreach($validationRules[self::FIELD_CLINICAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CLINICAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLINICAL_STATUS])) { + $errs[self::FIELD_CLINICAL_STATUS] = []; + } + $errs[self::FIELD_CLINICAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITICALITY])) { + $v = $this->getCriticality(); + foreach($validationRules[self::FIELD_CRITICALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_CRITICALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITICALITY])) { + $errs[self::FIELD_CRITICALITY] = []; + } + $errs[self::FIELD_CRITICALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_OCCURRENCE])) { + $v = $this->getLastOccurrence(); + foreach($validationRules[self::FIELD_LAST_OCCURRENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_LAST_OCCURRENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_OCCURRENCE])) { + $errs[self::FIELD_LAST_OCCURRENCE] = []; + } + $errs[self::FIELD_LAST_OCCURRENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_AGE])) { + $v = $this->getOnsetAge(); + foreach($validationRules[self::FIELD_ONSET_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_AGE])) { + $errs[self::FIELD_ONSET_AGE] = []; + } + $errs[self::FIELD_ONSET_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_DATE_TIME])) { + $v = $this->getOnsetDateTime(); + foreach($validationRules[self::FIELD_ONSET_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_DATE_TIME])) { + $errs[self::FIELD_ONSET_DATE_TIME] = []; + } + $errs[self::FIELD_ONSET_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_PERIOD])) { + $v = $this->getOnsetPeriod(); + foreach($validationRules[self::FIELD_ONSET_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_PERIOD])) { + $errs[self::FIELD_ONSET_PERIOD] = []; + } + $errs[self::FIELD_ONSET_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_RANGE])) { + $v = $this->getOnsetRange(); + foreach($validationRules[self::FIELD_ONSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_RANGE])) { + $errs[self::FIELD_ONSET_RANGE] = []; + } + $errs[self::FIELD_ONSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_STRING])) { + $v = $this->getOnsetString(); + foreach($validationRules[self::FIELD_ONSET_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_ONSET_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_STRING])) { + $errs[self::FIELD_ONSET_STRING] = []; + } + $errs[self::FIELD_ONSET_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REACTION])) { + $v = $this->getReaction(); + foreach($validationRules[self::FIELD_REACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_REACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REACTION])) { + $errs[self::FIELD_REACTION] = []; + } + $errs[self::FIELD_REACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERIFICATION_STATUS])) { + $v = $this->getVerificationStatus(); + foreach($validationRules[self::FIELD_VERIFICATION_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE, self::FIELD_VERIFICATION_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERIFICATION_STATUS])) { + $errs[self::FIELD_VERIFICATION_STATUS] = []; + } + $errs[self::FIELD_VERIFICATION_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointment.php index c04c6850e3..d47f306fad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -386,7 +386,7 @@ class FHIRAppointment extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type Appointment * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PARTICIPANT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1829,11 +1829,482 @@ public function setSupportingInformation(array $supportingInformation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAppointmentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIncomingReferral())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INCOMING_REFERRAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIndication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INDICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMinutesDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MINUTES_DURATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRequestedPeriod())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUESTED_PERIOD, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getServiceCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getServiceType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSlot())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SLOT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT_TYPE])) { + $v = $this->getAppointmentType(); + foreach($validationRules[self::FIELD_APPOINTMENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_APPOINTMENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT_TYPE])) { + $errs[self::FIELD_APPOINTMENT_TYPE] = []; + } + $errs[self::FIELD_APPOINTMENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCOMING_REFERRAL])) { + $v = $this->getIncomingReferral(); + foreach($validationRules[self::FIELD_INCOMING_REFERRAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_INCOMING_REFERRAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCOMING_REFERRAL])) { + $errs[self::FIELD_INCOMING_REFERRAL] = []; + } + $errs[self::FIELD_INCOMING_REFERRAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION])) { + $v = $this->getIndication(); + foreach($validationRules[self::FIELD_INDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_INDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION])) { + $errs[self::FIELD_INDICATION] = []; + } + $errs[self::FIELD_INDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MINUTES_DURATION])) { + $v = $this->getMinutesDuration(); + foreach($validationRules[self::FIELD_MINUTES_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_MINUTES_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MINUTES_DURATION])) { + $errs[self::FIELD_MINUTES_DURATION] = []; + } + $errs[self::FIELD_MINUTES_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTED_PERIOD])) { + $v = $this->getRequestedPeriod(); + foreach($validationRules[self::FIELD_REQUESTED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_REQUESTED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTED_PERIOD])) { + $errs[self::FIELD_REQUESTED_PERIOD] = []; + } + $errs[self::FIELD_REQUESTED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_CATEGORY])) { + $v = $this->getServiceCategory(); + foreach($validationRules[self::FIELD_SERVICE_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SERVICE_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_CATEGORY])) { + $errs[self::FIELD_SERVICE_CATEGORY] = []; + } + $errs[self::FIELD_SERVICE_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_TYPE])) { + $v = $this->getServiceType(); + foreach($validationRules[self::FIELD_SERVICE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SERVICE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_TYPE])) { + $errs[self::FIELD_SERVICE_TYPE] = []; + } + $errs[self::FIELD_SERVICE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SLOT])) { + $v = $this->getSlot(); + foreach($validationRules[self::FIELD_SLOT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SLOT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SLOT])) { + $errs[self::FIELD_SLOT] = []; + } + $errs[self::FIELD_SLOT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php index 90b67475a5..cfb711155e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -206,7 +206,7 @@ class FHIRAppointmentResponse extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type AppointmentResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRAppointmentResponse Constructor @@ -742,11 +742,262 @@ public function setStart($start = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getParticipantStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARTICIPANT_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipantType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT])) { + $v = $this->getAppointment(); + foreach($validationRules[self::FIELD_APPOINTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_APPOINTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT])) { + $errs[self::FIELD_APPOINTMENT] = []; + } + $errs[self::FIELD_APPOINTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_STATUS])) { + $v = $this->getParticipantStatus(); + foreach($validationRules[self::FIELD_PARTICIPANT_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_PARTICIPANT_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_STATUS])) { + $errs[self::FIELD_PARTICIPANT_STATUS] = []; + } + $errs[self::FIELD_PARTICIPANT_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT_TYPE])) { + $v = $this->getParticipantType(); + foreach($validationRules[self::FIELD_PARTICIPANT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_PARTICIPANT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT_TYPE])) { + $errs[self::FIELD_PARTICIPANT_TYPE] = []; + } + $errs[self::FIELD_PARTICIPANT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_APPOINTMENT_RESPONSE, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php index fac3d19845..cf798b6d14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -225,7 +225,7 @@ class FHIRAuditEvent extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type AuditEvent * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_AGENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -885,11 +885,300 @@ public function setType(FHIRCoding $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEntity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcomeDesc())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME_DESC] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPurposeOfEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE_OF_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubtype())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBTYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_DESC])) { + $v = $this->getOutcomeDesc(); + foreach($validationRules[self::FIELD_OUTCOME_DESC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_OUTCOME_DESC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_DESC])) { + $errs[self::FIELD_OUTCOME_DESC] = []; + } + $errs[self::FIELD_OUTCOME_DESC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE_OF_EVENT])) { + $v = $this->getPurposeOfEvent(); + foreach($validationRules[self::FIELD_PURPOSE_OF_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_PURPOSE_OF_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE_OF_EVENT])) { + $errs[self::FIELD_PURPOSE_OF_EVENT] = []; + } + $errs[self::FIELD_PURPOSE_OF_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED])) { + $v = $this->getRecorded(); + foreach($validationRules[self::FIELD_RECORDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_RECORDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED])) { + $errs[self::FIELD_RECORDED] = []; + } + $errs[self::FIELD_RECORDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTYPE])) { + $v = $this->getSubtype(); + foreach($validationRules[self::FIELD_SUBTYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_SUBTYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTYPE])) { + $errs[self::FIELD_SUBTYPE] = []; + } + $errs[self::FIELD_SUBTYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBasic.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBasic.php index cb7672ae89..1538b734ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBasic.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBasic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -158,7 +158,7 @@ class FHIRBasic extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Basic * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBasic Constructor @@ -464,11 +464,209 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASIC, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBodySite.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBodySite.php index 820828ef59..87cba71c62 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBodySite.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBodySite.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -182,7 +182,7 @@ class FHIRBodySite extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type BodySite * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRBodySite Constructor @@ -655,11 +655,247 @@ public function setQualifier(array $qualifier = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getQualifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUALIFIER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGE])) { + $v = $this->getImage(); + foreach($validationRules[self::FIELD_IMAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_IMAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGE])) { + $errs[self::FIELD_IMAGE] = []; + } + $errs[self::FIELD_IMAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFIER])) { + $v = $this->getQualifier(); + foreach($validationRules[self::FIELD_QUALIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BODY_SITE, self::FIELD_QUALIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFIER])) { + $errs[self::FIELD_QUALIFIER] = []; + } + $errs[self::FIELD_QUALIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php index c03849895b..b4fb7e413b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -524,7 +524,7 @@ class FHIRCapabilityStatement extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type CapabilityStatement * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_FORMAT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -2579,11 +2579,603 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAcceptUnknown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCEPT_UNKNOWN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDocument())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOCUMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFhirVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FHIR_VERSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFormat())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FORMAT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getImplementation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLEMENTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getImplementationGuide())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPLEMENTATION_GUIDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstantiates())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANTIATES, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMessaging())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MESSAGING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPatchFormat())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PATCH_FORMAT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSoftware())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOFTWARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCEPT_UNKNOWN])) { + $v = $this->getAcceptUnknown(); + foreach($validationRules[self::FIELD_ACCEPT_UNKNOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_ACCEPT_UNKNOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCEPT_UNKNOWN])) { + $errs[self::FIELD_ACCEPT_UNKNOWN] = []; + } + $errs[self::FIELD_ACCEPT_UNKNOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOCUMENT])) { + $v = $this->getDocument(); + foreach($validationRules[self::FIELD_DOCUMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_DOCUMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOCUMENT])) { + $errs[self::FIELD_DOCUMENT] = []; + } + $errs[self::FIELD_DOCUMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORMAT])) { + $v = $this->getFormat(); + foreach($validationRules[self::FIELD_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORMAT])) { + $errs[self::FIELD_FORMAT] = []; + } + $errs[self::FIELD_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLEMENTATION])) { + $v = $this->getImplementation(); + foreach($validationRules[self::FIELD_IMPLEMENTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_IMPLEMENTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLEMENTATION])) { + $errs[self::FIELD_IMPLEMENTATION] = []; + } + $errs[self::FIELD_IMPLEMENTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLEMENTATION_GUIDE])) { + $v = $this->getImplementationGuide(); + foreach($validationRules[self::FIELD_IMPLEMENTATION_GUIDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_IMPLEMENTATION_GUIDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLEMENTATION_GUIDE])) { + $errs[self::FIELD_IMPLEMENTATION_GUIDE] = []; + } + $errs[self::FIELD_IMPLEMENTATION_GUIDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANTIATES])) { + $v = $this->getInstantiates(); + foreach($validationRules[self::FIELD_INSTANTIATES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_INSTANTIATES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANTIATES])) { + $errs[self::FIELD_INSTANTIATES] = []; + } + $errs[self::FIELD_INSTANTIATES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MESSAGING])) { + $v = $this->getMessaging(); + foreach($validationRules[self::FIELD_MESSAGING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_MESSAGING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MESSAGING])) { + $errs[self::FIELD_MESSAGING] = []; + } + $errs[self::FIELD_MESSAGING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATCH_FORMAT])) { + $v = $this->getPatchFormat(); + foreach($validationRules[self::FIELD_PATCH_FORMAT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_PATCH_FORMAT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATCH_FORMAT])) { + $errs[self::FIELD_PATCH_FORMAT] = []; + } + $errs[self::FIELD_PATCH_FORMAT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REST])) { + $v = $this->getRest(); + foreach($validationRules[self::FIELD_REST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_REST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REST])) { + $errs[self::FIELD_REST] = []; + } + $errs[self::FIELD_REST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOFTWARE])) { + $v = $this->getSoftware(); + foreach($validationRules[self::FIELD_SOFTWARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_SOFTWARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOFTWARE])) { + $errs[self::FIELD_SOFTWARE] = []; + } + $errs[self::FIELD_SOFTWARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCarePlan.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCarePlan.php index 95261b66ba..914cf0f659 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCarePlan.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCarePlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -357,7 +357,7 @@ class FHIRCarePlan extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type CarePlan * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCarePlan Constructor @@ -1753,11 +1753,488 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getActivity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTIVITY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAddresses())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESSES, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCareTeam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGoal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVITY])) { + $v = $this->getActivity(); + foreach($validationRules[self::FIELD_ACTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_ACTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVITY])) { + $errs[self::FIELD_ACTIVITY] = []; + } + $errs[self::FIELD_ACTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESSES])) { + $v = $this->getAddresses(); + foreach($validationRules[self::FIELD_ADDRESSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_ADDRESSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESSES])) { + $errs[self::FIELD_ADDRESSES] = []; + } + $errs[self::FIELD_ADDRESSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM])) { + $v = $this->getCareTeam(); + foreach($validationRules[self::FIELD_CARE_TEAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_CARE_TEAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM])) { + $errs[self::FIELD_CARE_TEAM] = []; + } + $errs[self::FIELD_CARE_TEAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL])) { + $v = $this->getGoal(); + foreach($validationRules[self::FIELD_GOAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_GOAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL])) { + $errs[self::FIELD_GOAL] = []; + } + $errs[self::FIELD_GOAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_PLAN, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCareTeam.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCareTeam.php index 18cc51483c..ca676b08d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -249,7 +249,7 @@ class FHIRCareTeam extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type CareTeam * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCareTeam Constructor @@ -1064,11 +1064,340 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getManagingOrganization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MANAGING_ORGANIZATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CARE_TEAM, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRChargeItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRChargeItem.php index 7dbd8d4b2d..fea7bfa1fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRChargeItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRChargeItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -431,7 +431,7 @@ class FHIRChargeItem extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type ChargeItem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRChargeItem Constructor @@ -1926,11 +1926,565 @@ public function setSupportingInformation(array $supportingInformation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAccount())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACCOUNT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBodysite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODYSITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEnteredDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFactorOverride())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACTOR_OVERRIDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getOverrideReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OVERRIDE_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPerformingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriceOverride())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRICE_OVERRIDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequestingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTING_ORGANIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getService())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACCOUNT])) { + $v = $this->getAccount(); + foreach($validationRules[self::FIELD_ACCOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_ACCOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCOUNT])) { + $errs[self::FIELD_ACCOUNT] = []; + } + $errs[self::FIELD_ACCOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODYSITE])) { + $v = $this->getBodysite(); + foreach($validationRules[self::FIELD_BODYSITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_BODYSITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODYSITE])) { + $errs[self::FIELD_BODYSITE] = []; + } + $errs[self::FIELD_BODYSITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERED_DATE])) { + $v = $this->getEnteredDate(); + foreach($validationRules[self::FIELD_ENTERED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_ENTERED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERED_DATE])) { + $errs[self::FIELD_ENTERED_DATE] = []; + } + $errs[self::FIELD_ENTERED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACTOR_OVERRIDE])) { + $v = $this->getFactorOverride(); + foreach($validationRules[self::FIELD_FACTOR_OVERRIDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_FACTOR_OVERRIDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACTOR_OVERRIDE])) { + $errs[self::FIELD_FACTOR_OVERRIDE] = []; + } + $errs[self::FIELD_FACTOR_OVERRIDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OVERRIDE_REASON])) { + $v = $this->getOverrideReason(); + foreach($validationRules[self::FIELD_OVERRIDE_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_OVERRIDE_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OVERRIDE_REASON])) { + $errs[self::FIELD_OVERRIDE_REASON] = []; + } + $errs[self::FIELD_OVERRIDE_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMING_ORGANIZATION])) { + $v = $this->getPerformingOrganization(); + foreach($validationRules[self::FIELD_PERFORMING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_PERFORMING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMING_ORGANIZATION])) { + $errs[self::FIELD_PERFORMING_ORGANIZATION] = []; + } + $errs[self::FIELD_PERFORMING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRICE_OVERRIDE])) { + $v = $this->getPriceOverride(); + foreach($validationRules[self::FIELD_PRICE_OVERRIDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_PRICE_OVERRIDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRICE_OVERRIDE])) { + $errs[self::FIELD_PRICE_OVERRIDE] = []; + } + $errs[self::FIELD_PRICE_OVERRIDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTING_ORGANIZATION])) { + $v = $this->getRequestingOrganization(); + foreach($validationRules[self::FIELD_REQUESTING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_REQUESTING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTING_ORGANIZATION])) { + $errs[self::FIELD_REQUESTING_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUESTING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE])) { + $v = $this->getService(); + foreach($validationRules[self::FIELD_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE])) { + $errs[self::FIELD_SERVICE] = []; + } + $errs[self::FIELD_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaim.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaim.php index 3ce31e8532..5d7812fab4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaim.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaim.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -484,7 +484,7 @@ class FHIRClaim extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Claim * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaim Constructor @@ -2066,11 +2066,650 @@ public function setUse(FHIRUse $use = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccident())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCIDENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBillablePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BILLABLE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareTeam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEmploymentImpacted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EMPLOYMENT_IMPACTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFacility())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFundsReserve())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FUNDS_RESERVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getHospitalization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HOSPITALIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INFORMATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcedure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferral())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCIDENT])) { + $v = $this->getAccident(); + foreach($validationRules[self::FIELD_ACCIDENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCIDENT])) { + $errs[self::FIELD_ACCIDENT] = []; + } + $errs[self::FIELD_ACCIDENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BILLABLE_PERIOD])) { + $v = $this->getBillablePeriod(); + foreach($validationRules[self::FIELD_BILLABLE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_BILLABLE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BILLABLE_PERIOD])) { + $errs[self::FIELD_BILLABLE_PERIOD] = []; + } + $errs[self::FIELD_BILLABLE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM])) { + $v = $this->getCareTeam(); + foreach($validationRules[self::FIELD_CARE_TEAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CARE_TEAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM])) { + $errs[self::FIELD_CARE_TEAM] = []; + } + $errs[self::FIELD_CARE_TEAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EMPLOYMENT_IMPACTED])) { + $v = $this->getEmploymentImpacted(); + foreach($validationRules[self::FIELD_EMPLOYMENT_IMPACTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_EMPLOYMENT_IMPACTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EMPLOYMENT_IMPACTED])) { + $errs[self::FIELD_EMPLOYMENT_IMPACTED] = []; + } + $errs[self::FIELD_EMPLOYMENT_IMPACTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY])) { + $v = $this->getFacility(); + foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FACILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY])) { + $errs[self::FIELD_FACILITY] = []; + } + $errs[self::FIELD_FACILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FUNDS_RESERVE])) { + $v = $this->getFundsReserve(); + foreach($validationRules[self::FIELD_FUNDS_RESERVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FUNDS_RESERVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FUNDS_RESERVE])) { + $errs[self::FIELD_FUNDS_RESERVE] = []; + } + $errs[self::FIELD_FUNDS_RESERVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HOSPITALIZATION])) { + $v = $this->getHospitalization(); + foreach($validationRules[self::FIELD_HOSPITALIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_HOSPITALIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HOSPITALIZATION])) { + $errs[self::FIELD_HOSPITALIZATION] = []; + } + $errs[self::FIELD_HOSPITALIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORMATION])) { + $v = $this->getInformation(); + foreach($validationRules[self::FIELD_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORMATION])) { + $errs[self::FIELD_INFORMATION] = []; + } + $errs[self::FIELD_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION])) { + $v = $this->getOriginalPrescription(); + foreach($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_PRESCRIPTION])) { + $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = []; + } + $errs[self::FIELD_ORIGINAL_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE])) { + $v = $this->getPayee(); + foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PAYEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE])) { + $errs[self::FIELD_PAYEE] = []; + } + $errs[self::FIELD_PAYEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIPTION])) { + $v = $this->getPrescription(); + foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIPTION])) { + $errs[self::FIELD_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL])) { + $v = $this->getReferral(); + foreach($validationRules[self::FIELD_REFERRAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_REFERRAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL])) { + $errs[self::FIELD_REFERRAL] = []; + } + $errs[self::FIELD_REFERRAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE])) { + $v = $this->getUse(); + foreach($validationRules[self::FIELD_USE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_USE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE])) { + $errs[self::FIELD_USE] = []; + } + $errs[self::FIELD_USE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php index bbc535b4b0..9910c792cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -382,7 +382,7 @@ class FHIRClaimResponse extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type ClaimResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClaimResponse Constructor @@ -1605,11 +1605,527 @@ public function setUnallocDeductable(FHIRMoney $unallocDeductable = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAddItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCommunicationRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getError())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ERROR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayeeType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcessNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESS_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReserved())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESERVED] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotalBenefit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL_BENEFIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotalCost())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL_COST] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnallocDeductable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNALLOC_DEDUCTABLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADD_ITEM])) { + $v = $this->getAddItem(); + foreach($validationRules[self::FIELD_ADD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ADD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADD_ITEM])) { + $errs[self::FIELD_ADD_ITEM] = []; + } + $errs[self::FIELD_ADD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION_REQUEST])) { + $v = $this->getCommunicationRequest(); + foreach($validationRules[self::FIELD_COMMUNICATION_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_COMMUNICATION_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION_REQUEST])) { + $errs[self::FIELD_COMMUNICATION_REQUEST] = []; + } + $errs[self::FIELD_COMMUNICATION_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ERROR])) { + $v = $this->getError(); + foreach($validationRules[self::FIELD_ERROR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ERROR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ERROR])) { + $errs[self::FIELD_ERROR] = []; + } + $errs[self::FIELD_ERROR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE_TYPE])) { + $v = $this->getPayeeType(); + foreach($validationRules[self::FIELD_PAYEE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PAYEE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE_TYPE])) { + $errs[self::FIELD_PAYEE_TYPE] = []; + } + $errs[self::FIELD_PAYEE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT])) { + $v = $this->getPayment(); + foreach($validationRules[self::FIELD_PAYMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PAYMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT])) { + $errs[self::FIELD_PAYMENT] = []; + } + $errs[self::FIELD_PAYMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESS_NOTE])) { + $v = $this->getProcessNote(); + foreach($validationRules[self::FIELD_PROCESS_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_PROCESS_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESS_NOTE])) { + $errs[self::FIELD_PROCESS_NOTE] = []; + } + $errs[self::FIELD_PROCESS_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESERVED])) { + $v = $this->getReserved(); + foreach($validationRules[self::FIELD_RESERVED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_RESERVED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESERVED])) { + $errs[self::FIELD_RESERVED] = []; + } + $errs[self::FIELD_RESERVED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL_BENEFIT])) { + $v = $this->getTotalBenefit(); + foreach($validationRules[self::FIELD_TOTAL_BENEFIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_TOTAL_BENEFIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL_BENEFIT])) { + $errs[self::FIELD_TOTAL_BENEFIT] = []; + } + $errs[self::FIELD_TOTAL_BENEFIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL_COST])) { + $v = $this->getTotalCost(); + foreach($validationRules[self::FIELD_TOTAL_COST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_TOTAL_COST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL_COST])) { + $errs[self::FIELD_TOTAL_COST] = []; + } + $errs[self::FIELD_TOTAL_COST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNALLOC_DEDUCTABLE])) { + $v = $this->getUnallocDeductable(); + foreach($validationRules[self::FIELD_UNALLOC_DEDUCTABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM_RESPONSE, self::FIELD_UNALLOC_DEDUCTABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNALLOC_DEDUCTABLE])) { + $errs[self::FIELD_UNALLOC_DEDUCTABLE] = []; + } + $errs[self::FIELD_UNALLOC_DEDUCTABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php index 6bb878319a..e071ee3b0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -377,7 +377,7 @@ class FHIRClinicalImpression extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type ClinicalImpression * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRClinicalImpression Constructor @@ -1713,11 +1713,480 @@ public function setSummary($summary = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAssessor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSESSOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFinding())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FINDING, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInvestigation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INVESTIGATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrevious())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PREVIOUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProblem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROBLEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPrognosisCodeableConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGNOSIS_CODEABLE_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPrognosisReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGNOSIS_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProtocol())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROTOCOL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSummary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUMMARY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSESSOR])) { + $v = $this->getAssessor(); + foreach($validationRules[self::FIELD_ASSESSOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_ASSESSOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSESSOR])) { + $errs[self::FIELD_ASSESSOR] = []; + } + $errs[self::FIELD_ASSESSOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FINDING])) { + $v = $this->getFinding(); + foreach($validationRules[self::FIELD_FINDING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_FINDING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FINDING])) { + $errs[self::FIELD_FINDING] = []; + } + $errs[self::FIELD_FINDING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INVESTIGATION])) { + $v = $this->getInvestigation(); + foreach($validationRules[self::FIELD_INVESTIGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_INVESTIGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INVESTIGATION])) { + $errs[self::FIELD_INVESTIGATION] = []; + } + $errs[self::FIELD_INVESTIGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREVIOUS])) { + $v = $this->getPrevious(); + foreach($validationRules[self::FIELD_PREVIOUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PREVIOUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREVIOUS])) { + $errs[self::FIELD_PREVIOUS] = []; + } + $errs[self::FIELD_PREVIOUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROBLEM])) { + $v = $this->getProblem(); + foreach($validationRules[self::FIELD_PROBLEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROBLEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROBLEM])) { + $errs[self::FIELD_PROBLEM] = []; + } + $errs[self::FIELD_PROBLEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT])) { + $v = $this->getPrognosisCodeableConcept(); + foreach($validationRules[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROGNOSIS_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT])) { + $errs[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGNOSIS_REFERENCE])) { + $v = $this->getPrognosisReference(); + foreach($validationRules[self::FIELD_PROGNOSIS_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROGNOSIS_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGNOSIS_REFERENCE])) { + $errs[self::FIELD_PROGNOSIS_REFERENCE] = []; + } + $errs[self::FIELD_PROGNOSIS_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUMMARY])) { + $v = $this->getSummary(); + foreach($validationRules[self::FIELD_SUMMARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_SUMMARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUMMARY])) { + $errs[self::FIELD_SUMMARY] = []; + } + $errs[self::FIELD_SUMMARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php index 8a7380deda..dd3ce8e04e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -473,7 +473,7 @@ class FHIRCodeSystem extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type CodeSystem * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCodeSystem Constructor @@ -2189,11 +2189,559 @@ public function setVersionNeeded($versionNeeded = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCaseSensitive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CASE_SENSITIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompositional())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSITIONAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getConcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONCEPT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFilter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FILTER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getHierarchyMeaning())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HIERARCHY_MEANING] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProperty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROPERTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersionNeeded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION_NEEDED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CASE_SENSITIVE])) { + $v = $this->getCaseSensitive(); + foreach($validationRules[self::FIELD_CASE_SENSITIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_CASE_SENSITIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CASE_SENSITIVE])) { + $errs[self::FIELD_CASE_SENSITIVE] = []; + } + $errs[self::FIELD_CASE_SENSITIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPOSITIONAL])) { + $v = $this->getCompositional(); + foreach($validationRules[self::FIELD_COMPOSITIONAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_COMPOSITIONAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPOSITIONAL])) { + $errs[self::FIELD_COMPOSITIONAL] = []; + } + $errs[self::FIELD_COMPOSITIONAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCEPT])) { + $v = $this->getConcept(); + foreach($validationRules[self::FIELD_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCEPT])) { + $errs[self::FIELD_CONCEPT] = []; + } + $errs[self::FIELD_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COUNT])) { + $v = $this->getCount(); + foreach($validationRules[self::FIELD_COUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_COUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COUNT])) { + $errs[self::FIELD_COUNT] = []; + } + $errs[self::FIELD_COUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FILTER])) { + $v = $this->getFilter(); + foreach($validationRules[self::FIELD_FILTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_FILTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FILTER])) { + $errs[self::FIELD_FILTER] = []; + } + $errs[self::FIELD_FILTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HIERARCHY_MEANING])) { + $v = $this->getHierarchyMeaning(); + foreach($validationRules[self::FIELD_HIERARCHY_MEANING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_HIERARCHY_MEANING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HIERARCHY_MEANING])) { + $errs[self::FIELD_HIERARCHY_MEANING] = []; + } + $errs[self::FIELD_HIERARCHY_MEANING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROPERTY])) { + $v = $this->getProperty(); + foreach($validationRules[self::FIELD_PROPERTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_PROPERTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROPERTY])) { + $errs[self::FIELD_PROPERTY] = []; + } + $errs[self::FIELD_PROPERTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SET])) { + $v = $this->getValueSet(); + foreach($validationRules[self::FIELD_VALUE_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_VALUE_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SET])) { + $errs[self::FIELD_VALUE_SET] = []; + } + $errs[self::FIELD_VALUE_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION_NEEDED])) { + $v = $this->getVersionNeeded(); + foreach($validationRules[self::FIELD_VERSION_NEEDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM, self::FIELD_VERSION_NEEDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION_NEEDED])) { + $errs[self::FIELD_VERSION_NEEDED] = []; + } + $errs[self::FIELD_VERSION_NEEDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunication.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunication.php index f268c9c802..6c35ef781f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -364,7 +364,7 @@ class FHIRCommunication extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type Communication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunication Constructor @@ -1749,11 +1749,486 @@ public function setTopic(array $topic = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMedium())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEDIUM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNotDone())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_DONE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotDoneReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_DONE_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPayload())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYLOAD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReceived())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIUM])) { + $v = $this->getMedium(); + foreach($validationRules[self::FIELD_MEDIUM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_MEDIUM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIUM])) { + $errs[self::FIELD_MEDIUM] = []; + } + $errs[self::FIELD_MEDIUM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_DONE])) { + $v = $this->getNotDone(); + foreach($validationRules[self::FIELD_NOT_DONE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_NOT_DONE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_DONE])) { + $errs[self::FIELD_NOT_DONE] = []; + } + $errs[self::FIELD_NOT_DONE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_DONE_REASON])) { + $v = $this->getNotDoneReason(); + foreach($validationRules[self::FIELD_NOT_DONE_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_NOT_DONE_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_DONE_REASON])) { + $errs[self::FIELD_NOT_DONE_REASON] = []; + } + $errs[self::FIELD_NOT_DONE_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD])) { + $v = $this->getPayload(); + foreach($validationRules[self::FIELD_PAYLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_PAYLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD])) { + $errs[self::FIELD_PAYLOAD] = []; + } + $errs[self::FIELD_PAYLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVED])) { + $v = $this->getReceived(); + foreach($validationRules[self::FIELD_RECEIVED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_RECEIVED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVED])) { + $errs[self::FIELD_RECEIVED] = []; + } + $errs[self::FIELD_RECEIVED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENDER])) { + $v = $this->getSender(); + foreach($validationRules[self::FIELD_SENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_SENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENDER])) { + $errs[self::FIELD_SENDER] = []; + } + $errs[self::FIELD_SENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENT])) { + $v = $this->getSent(); + foreach($validationRules[self::FIELD_SENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_SENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENT])) { + $errs[self::FIELD_SENT] = []; + } + $errs[self::FIELD_SENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php index 8f689920be..d1bad9cb84 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -374,7 +374,7 @@ class FHIRCommunicationRequest extends FHIRDomainResource implements PHPFHIRCont * Validation map for fields in type CommunicationRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCommunicationRequest Constructor @@ -1736,11 +1736,501 @@ public function setTopic(array $topic = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMedium())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEDIUM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPayload())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYLOAD, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDIUM])) { + $v = $this->getMedium(); + foreach($validationRules[self::FIELD_MEDIUM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_MEDIUM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDIUM])) { + $errs[self::FIELD_MEDIUM] = []; + } + $errs[self::FIELD_MEDIUM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD])) { + $v = $this->getPayload(); + foreach($validationRules[self::FIELD_PAYLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_PAYLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD])) { + $errs[self::FIELD_PAYLOAD] = []; + } + $errs[self::FIELD_PAYLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENDER])) { + $v = $this->getSender(); + foreach($validationRules[self::FIELD_SENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_SENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENDER])) { + $errs[self::FIELD_SENDER] = []; + } + $errs[self::FIELD_SENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php index 16fddf6487..2a3f0c23c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -320,7 +320,7 @@ class FHIRCompartmentDefinition extends FHIRDomainResource implements PHPFHIRCon * Validation map for fields in type CompartmentDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCompartmentDefinition Constructor @@ -1390,11 +1390,385 @@ public function setUseContext(array $useContext = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSearch())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEARCH])) { + $v = $this->getSearch(); + foreach($validationRules[self::FIELD_SEARCH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_SEARCH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEARCH])) { + $errs[self::FIELD_SEARCH] = []; + } + $errs[self::FIELD_SEARCH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPARTMENT_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRComposition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRComposition.php index ab7cc50d69..f6777a4abb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRComposition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRComposition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -316,7 +316,7 @@ class FHIRComposition extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type Composition * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_AUTHOR => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1264,11 +1264,387 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAttester())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ATTESTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if (null !== ($v = $this->getConfidentiality())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONFIDENTIALITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCustodian())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CUSTODIAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatesTo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATES_TO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSection())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ATTESTER])) { + $v = $this->getAttester(); + foreach($validationRules[self::FIELD_ATTESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_ATTESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ATTESTER])) { + $errs[self::FIELD_ATTESTER] = []; + } + $errs[self::FIELD_ATTESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONFIDENTIALITY])) { + $v = $this->getConfidentiality(); + foreach($validationRules[self::FIELD_CONFIDENTIALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CONFIDENTIALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONFIDENTIALITY])) { + $errs[self::FIELD_CONFIDENTIALITY] = []; + } + $errs[self::FIELD_CONFIDENTIALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CUSTODIAN])) { + $v = $this->getCustodian(); + foreach($validationRules[self::FIELD_CUSTODIAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_CUSTODIAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CUSTODIAN])) { + $errs[self::FIELD_CUSTODIAN] = []; + } + $errs[self::FIELD_CUSTODIAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATES_TO])) { + $v = $this->getRelatesTo(); + foreach($validationRules[self::FIELD_RELATES_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_RELATES_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATES_TO])) { + $errs[self::FIELD_RELATES_TO] = []; + } + $errs[self::FIELD_RELATES_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECTION])) { + $v = $this->getSection(); + foreach($validationRules[self::FIELD_SECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_SECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECTION])) { + $errs[self::FIELD_SECTION] = []; + } + $errs[self::FIELD_SECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COMPOSITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConceptMap.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConceptMap.php index db29b281f0..2159098b92 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConceptMap.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConceptMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -402,7 +402,7 @@ class FHIRConceptMap extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type ConceptMap * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConceptMap Constructor @@ -1749,11 +1749,470 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTargetUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_REFERENCE])) { + $v = $this->getSourceReference(); + foreach($validationRules[self::FIELD_SOURCE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_SOURCE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_REFERENCE])) { + $errs[self::FIELD_SOURCE_REFERENCE] = []; + } + $errs[self::FIELD_SOURCE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_URI])) { + $v = $this->getSourceUri(); + foreach($validationRules[self::FIELD_SOURCE_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_SOURCE_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_URI])) { + $errs[self::FIELD_SOURCE_URI] = []; + } + $errs[self::FIELD_SOURCE_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_REFERENCE])) { + $v = $this->getTargetReference(); + foreach($validationRules[self::FIELD_TARGET_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_TARGET_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_REFERENCE])) { + $errs[self::FIELD_TARGET_REFERENCE] = []; + } + $errs[self::FIELD_TARGET_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET_URI])) { + $v = $this->getTargetUri(); + foreach($validationRules[self::FIELD_TARGET_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_TARGET_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET_URI])) { + $errs[self::FIELD_TARGET_URI] = []; + } + $errs[self::FIELD_TARGET_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCondition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCondition.php index 8dd448851a..78f962329c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -449,7 +449,7 @@ class FHIRCondition extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Condition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCondition Constructor @@ -1871,11 +1871,557 @@ public function setVerificationStatus(FHIRConditionVerificationStatus $verificat } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbatementAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAbatementString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABATEMENT_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getAssertedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERTED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsserter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSERTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClinicalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEvidence())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVIDENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOnsetAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getOnsetString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ONSET_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getVerificationStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERIFICATION_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_AGE])) { + $v = $this->getAbatementAge(); + foreach($validationRules[self::FIELD_ABATEMENT_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_AGE])) { + $errs[self::FIELD_ABATEMENT_AGE] = []; + } + $errs[self::FIELD_ABATEMENT_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_BOOLEAN])) { + $v = $this->getAbatementBoolean(); + foreach($validationRules[self::FIELD_ABATEMENT_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_BOOLEAN])) { + $errs[self::FIELD_ABATEMENT_BOOLEAN] = []; + } + $errs[self::FIELD_ABATEMENT_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_DATE_TIME])) { + $v = $this->getAbatementDateTime(); + foreach($validationRules[self::FIELD_ABATEMENT_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_DATE_TIME])) { + $errs[self::FIELD_ABATEMENT_DATE_TIME] = []; + } + $errs[self::FIELD_ABATEMENT_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_PERIOD])) { + $v = $this->getAbatementPeriod(); + foreach($validationRules[self::FIELD_ABATEMENT_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_PERIOD])) { + $errs[self::FIELD_ABATEMENT_PERIOD] = []; + } + $errs[self::FIELD_ABATEMENT_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_RANGE])) { + $v = $this->getAbatementRange(); + foreach($validationRules[self::FIELD_ABATEMENT_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_RANGE])) { + $errs[self::FIELD_ABATEMENT_RANGE] = []; + } + $errs[self::FIELD_ABATEMENT_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ABATEMENT_STRING])) { + $v = $this->getAbatementString(); + foreach($validationRules[self::FIELD_ABATEMENT_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABATEMENT_STRING])) { + $errs[self::FIELD_ABATEMENT_STRING] = []; + } + $errs[self::FIELD_ABATEMENT_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSERTED_DATE])) { + $v = $this->getAssertedDate(); + foreach($validationRules[self::FIELD_ASSERTED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ASSERTED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERTED_DATE])) { + $errs[self::FIELD_ASSERTED_DATE] = []; + } + $errs[self::FIELD_ASSERTED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSERTER])) { + $v = $this->getAsserter(); + foreach($validationRules[self::FIELD_ASSERTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ASSERTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSERTER])) { + $errs[self::FIELD_ASSERTER] = []; + } + $errs[self::FIELD_ASSERTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLINICAL_STATUS])) { + $v = $this->getClinicalStatus(); + foreach($validationRules[self::FIELD_CLINICAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CLINICAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLINICAL_STATUS])) { + $errs[self::FIELD_CLINICAL_STATUS] = []; + } + $errs[self::FIELD_CLINICAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVIDENCE])) { + $v = $this->getEvidence(); + foreach($validationRules[self::FIELD_EVIDENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_EVIDENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVIDENCE])) { + $errs[self::FIELD_EVIDENCE] = []; + } + $errs[self::FIELD_EVIDENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_AGE])) { + $v = $this->getOnsetAge(); + foreach($validationRules[self::FIELD_ONSET_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_AGE])) { + $errs[self::FIELD_ONSET_AGE] = []; + } + $errs[self::FIELD_ONSET_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_DATE_TIME])) { + $v = $this->getOnsetDateTime(); + foreach($validationRules[self::FIELD_ONSET_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_DATE_TIME])) { + $errs[self::FIELD_ONSET_DATE_TIME] = []; + } + $errs[self::FIELD_ONSET_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_PERIOD])) { + $v = $this->getOnsetPeriod(); + foreach($validationRules[self::FIELD_ONSET_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_PERIOD])) { + $errs[self::FIELD_ONSET_PERIOD] = []; + } + $errs[self::FIELD_ONSET_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_RANGE])) { + $v = $this->getOnsetRange(); + foreach($validationRules[self::FIELD_ONSET_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_RANGE])) { + $errs[self::FIELD_ONSET_RANGE] = []; + } + $errs[self::FIELD_ONSET_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ONSET_STRING])) { + $v = $this->getOnsetString(); + foreach($validationRules[self::FIELD_ONSET_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ONSET_STRING])) { + $errs[self::FIELD_ONSET_STRING] = []; + } + $errs[self::FIELD_ONSET_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STAGE])) { + $v = $this->getStage(); + foreach($validationRules[self::FIELD_STAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_STAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STAGE])) { + $errs[self::FIELD_STAGE] = []; + } + $errs[self::FIELD_STAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERIFICATION_STATUS])) { + $v = $this->getVerificationStatus(); + foreach($validationRules[self::FIELD_VERIFICATION_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_VERIFICATION_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERIFICATION_STATUS])) { + $errs[self::FIELD_VERIFICATION_STATUS] = []; + } + $errs[self::FIELD_VERIFICATION_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConsent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConsent.php index 691c6ad2bd..36103485c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConsent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConsent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -369,7 +369,7 @@ class FHIRConsent extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Consent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRConsent Constructor @@ -1655,11 +1655,482 @@ public function setStatus(FHIRConsentState $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getActor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getConsentingParty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONSENTING_PARTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getData())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDataPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExcept())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCEPT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOrganization())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ORGANIZATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POLICY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPolicyRule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POLICY_RULE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPurpose())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PURPOSE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSourceAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSourceReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONSENTING_PARTY])) { + $v = $this->getConsentingParty(); + foreach($validationRules[self::FIELD_CONSENTING_PARTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_CONSENTING_PARTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONSENTING_PARTY])) { + $errs[self::FIELD_CONSENTING_PARTY] = []; + } + $errs[self::FIELD_CONSENTING_PARTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA])) { + $v = $this->getData(); + foreach($validationRules[self::FIELD_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA])) { + $errs[self::FIELD_DATA] = []; + } + $errs[self::FIELD_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_PERIOD])) { + $v = $this->getDataPeriod(); + foreach($validationRules[self::FIELD_DATA_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_DATA_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_PERIOD])) { + $errs[self::FIELD_DATA_PERIOD] = []; + } + $errs[self::FIELD_DATA_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCEPT])) { + $v = $this->getExcept(); + foreach($validationRules[self::FIELD_EXCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_EXCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCEPT])) { + $errs[self::FIELD_EXCEPT] = []; + } + $errs[self::FIELD_EXCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY])) { + $v = $this->getPolicy(); + foreach($validationRules[self::FIELD_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY])) { + $errs[self::FIELD_POLICY] = []; + } + $errs[self::FIELD_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY_RULE])) { + $v = $this->getPolicyRule(); + foreach($validationRules[self::FIELD_POLICY_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_POLICY_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY_RULE])) { + $errs[self::FIELD_POLICY_RULE] = []; + } + $errs[self::FIELD_POLICY_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_ATTACHMENT])) { + $v = $this->getSourceAttachment(); + foreach($validationRules[self::FIELD_SOURCE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_SOURCE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_ATTACHMENT])) { + $errs[self::FIELD_SOURCE_ATTACHMENT] = []; + } + $errs[self::FIELD_SOURCE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_IDENTIFIER])) { + $v = $this->getSourceIdentifier(); + foreach($validationRules[self::FIELD_SOURCE_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_SOURCE_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_IDENTIFIER])) { + $errs[self::FIELD_SOURCE_IDENTIFIER] = []; + } + $errs[self::FIELD_SOURCE_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE_REFERENCE])) { + $v = $this->getSourceReference(); + foreach($validationRules[self::FIELD_SOURCE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_SOURCE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE_REFERENCE])) { + $errs[self::FIELD_SOURCE_REFERENCE] = []; + } + $errs[self::FIELD_SOURCE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONSENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRContract.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRContract.php index 93d2c87d5f..1edec86616 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRContract.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRContract.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -422,7 +422,7 @@ class FHIRContract extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Contract * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRContract Constructor @@ -2030,11 +2030,560 @@ public function setValuedItem(array $valuedItem = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getActionReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION_REASON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getApplies())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPLIES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthority())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHORITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBindingAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBindingReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINDING_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContentDerivative())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT_DERIVATIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDecisionType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECISION_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDomain())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOMAIN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFriendly())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FRIENDLY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLegal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LEGAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSigner())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SIGNER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSubject())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTerm())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TERM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getValuedItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VALUED_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTION_REASON])) { + $v = $this->getActionReason(); + foreach($validationRules[self::FIELD_ACTION_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_ACTION_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION_REASON])) { + $errs[self::FIELD_ACTION_REASON] = []; + } + $errs[self::FIELD_ACTION_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPLIES])) { + $v = $this->getApplies(); + foreach($validationRules[self::FIELD_APPLIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_APPLIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPLIES])) { + $errs[self::FIELD_APPLIES] = []; + } + $errs[self::FIELD_APPLIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORITY])) { + $v = $this->getAuthority(); + foreach($validationRules[self::FIELD_AUTHORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_AUTHORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORITY])) { + $errs[self::FIELD_AUTHORITY] = []; + } + $errs[self::FIELD_AUTHORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BINDING_ATTACHMENT])) { + $v = $this->getBindingAttachment(); + foreach($validationRules[self::FIELD_BINDING_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_BINDING_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING_ATTACHMENT])) { + $errs[self::FIELD_BINDING_ATTACHMENT] = []; + } + $errs[self::FIELD_BINDING_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BINDING_REFERENCE])) { + $v = $this->getBindingReference(); + foreach($validationRules[self::FIELD_BINDING_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_BINDING_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINDING_REFERENCE])) { + $errs[self::FIELD_BINDING_REFERENCE] = []; + } + $errs[self::FIELD_BINDING_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT_DERIVATIVE])) { + $v = $this->getContentDerivative(); + foreach($validationRules[self::FIELD_CONTENT_DERIVATIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_CONTENT_DERIVATIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT_DERIVATIVE])) { + $errs[self::FIELD_CONTENT_DERIVATIVE] = []; + } + $errs[self::FIELD_CONTENT_DERIVATIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECISION_TYPE])) { + $v = $this->getDecisionType(); + foreach($validationRules[self::FIELD_DECISION_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_DECISION_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECISION_TYPE])) { + $errs[self::FIELD_DECISION_TYPE] = []; + } + $errs[self::FIELD_DECISION_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOMAIN])) { + $v = $this->getDomain(); + foreach($validationRules[self::FIELD_DOMAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_DOMAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOMAIN])) { + $errs[self::FIELD_DOMAIN] = []; + } + $errs[self::FIELD_DOMAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FRIENDLY])) { + $v = $this->getFriendly(); + foreach($validationRules[self::FIELD_FRIENDLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_FRIENDLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRIENDLY])) { + $errs[self::FIELD_FRIENDLY] = []; + } + $errs[self::FIELD_FRIENDLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LEGAL])) { + $v = $this->getLegal(); + foreach($validationRules[self::FIELD_LEGAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_LEGAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LEGAL])) { + $errs[self::FIELD_LEGAL] = []; + } + $errs[self::FIELD_LEGAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNER])) { + $v = $this->getSigner(); + foreach($validationRules[self::FIELD_SIGNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SIGNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNER])) { + $errs[self::FIELD_SIGNER] = []; + } + $errs[self::FIELD_SIGNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TERM])) { + $v = $this->getTerm(); + foreach($validationRules[self::FIELD_TERM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_TERM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TERM])) { + $errs[self::FIELD_TERM] = []; + } + $errs[self::FIELD_TERM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUED_ITEM])) { + $v = $this->getValuedItem(); + foreach($validationRules[self::FIELD_VALUED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONTRACT, self::FIELD_VALUED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUED_ITEM])) { + $errs[self::FIELD_VALUED_ITEM] = []; + } + $errs[self::FIELD_VALUED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCoverage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCoverage.php index e272b210ec..00bd409c1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -313,7 +313,7 @@ class FHIRCoverage extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Coverage * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRCoverage Constructor @@ -1247,11 +1247,400 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBeneficiary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BENEFICIARY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContract())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDependent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEPENDENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getGrouping())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUPING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNetwork())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NETWORK] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPayor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPolicyHolder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POLICY_HOLDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubscriber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSCRIBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubscriberId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSCRIBER_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BENEFICIARY])) { + $v = $this->getBeneficiary(); + foreach($validationRules[self::FIELD_BENEFICIARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_BENEFICIARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFICIARY])) { + $errs[self::FIELD_BENEFICIARY] = []; + } + $errs[self::FIELD_BENEFICIARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRACT])) { + $v = $this->getContract(); + foreach($validationRules[self::FIELD_CONTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_CONTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRACT])) { + $errs[self::FIELD_CONTRACT] = []; + } + $errs[self::FIELD_CONTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDENT])) { + $v = $this->getDependent(); + foreach($validationRules[self::FIELD_DEPENDENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_DEPENDENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDENT])) { + $errs[self::FIELD_DEPENDENT] = []; + } + $errs[self::FIELD_DEPENDENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUPING])) { + $v = $this->getGrouping(); + foreach($validationRules[self::FIELD_GROUPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_GROUPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUPING])) { + $errs[self::FIELD_GROUPING] = []; + } + $errs[self::FIELD_GROUPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NETWORK])) { + $v = $this->getNetwork(); + foreach($validationRules[self::FIELD_NETWORK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_NETWORK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NETWORK])) { + $errs[self::FIELD_NETWORK] = []; + } + $errs[self::FIELD_NETWORK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDER])) { + $v = $this->getOrder(); + foreach($validationRules[self::FIELD_ORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_ORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDER])) { + $errs[self::FIELD_ORDER] = []; + } + $errs[self::FIELD_ORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYOR])) { + $v = $this->getPayor(); + foreach($validationRules[self::FIELD_PAYOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_PAYOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYOR])) { + $errs[self::FIELD_PAYOR] = []; + } + $errs[self::FIELD_PAYOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY_HOLDER])) { + $v = $this->getPolicyHolder(); + foreach($validationRules[self::FIELD_POLICY_HOLDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_POLICY_HOLDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY_HOLDER])) { + $errs[self::FIELD_POLICY_HOLDER] = []; + } + $errs[self::FIELD_POLICY_HOLDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEQUENCE])) { + $v = $this->getSequence(); + foreach($validationRules[self::FIELD_SEQUENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_SEQUENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEQUENCE])) { + $errs[self::FIELD_SEQUENCE] = []; + } + $errs[self::FIELD_SEQUENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSCRIBER])) { + $v = $this->getSubscriber(); + foreach($validationRules[self::FIELD_SUBSCRIBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_SUBSCRIBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSCRIBER])) { + $errs[self::FIELD_SUBSCRIBER] = []; + } + $errs[self::FIELD_SUBSCRIBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSCRIBER_ID])) { + $v = $this->getSubscriberId(); + foreach($validationRules[self::FIELD_SUBSCRIBER_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_SUBSCRIBER_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSCRIBER_ID])) { + $errs[self::FIELD_SUBSCRIBER_ID] = []; + } + $errs[self::FIELD_SUBSCRIBER_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_COVERAGE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDataElement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDataElement.php index 6ca72e7628..c906198186 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDataElement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDataElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -335,7 +335,7 @@ class FHIRDataElement extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type DataElement * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ELEMENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1502,11 +1502,406 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getElement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ELEMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMapping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStringency())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRINGENCY] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELEMENT])) { + $v = $this->getElement(); + foreach($validationRules[self::FIELD_ELEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_ELEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELEMENT])) { + $errs[self::FIELD_ELEMENT] = []; + } + $errs[self::FIELD_ELEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAPPING])) { + $v = $this->getMapping(); + foreach($validationRules[self::FIELD_MAPPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_MAPPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAPPING])) { + $errs[self::FIELD_MAPPING] = []; + } + $errs[self::FIELD_MAPPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRINGENCY])) { + $v = $this->getStringency(); + foreach($validationRules[self::FIELD_STRINGENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_STRINGENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRINGENCY])) { + $errs[self::FIELD_STRINGENCY] = []; + } + $errs[self::FIELD_STRINGENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php index 62bec13daf..de880b3e39 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -243,7 +243,7 @@ class FHIRDetectedIssue extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type DetectedIssue * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDetectedIssue Constructor @@ -899,11 +899,313 @@ public function setStatus(FHIRObservationStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetail())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETAIL] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getImplicated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPLICATED, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMitigation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MITIGATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSeverity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEVERITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICATED])) { + $v = $this->getImplicated(); + foreach($validationRules[self::FIELD_IMPLICATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_IMPLICATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICATED])) { + $errs[self::FIELD_IMPLICATED] = []; + } + $errs[self::FIELD_IMPLICATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MITIGATION])) { + $v = $this->getMitigation(); + foreach($validationRules[self::FIELD_MITIGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_MITIGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MITIGATION])) { + $errs[self::FIELD_MITIGATION] = []; + } + $errs[self::FIELD_MITIGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SEVERITY])) { + $v = $this->getSeverity(); + foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_SEVERITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SEVERITY])) { + $errs[self::FIELD_SEVERITY] = []; + } + $errs[self::FIELD_SEVERITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDevice.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDevice.php index 29514d19b6..92e7b64569 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -337,7 +337,7 @@ class FHIRDevice extends FHIRDomainResource implements PHPFHIRContainedTypeInter * Validation map for fields in type Device * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDevice Constructor @@ -1400,11 +1400,419 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExpirationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRATION_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufactureDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURE_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getModel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODEL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOwner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSafety())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SAFETY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUdi())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UDI] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPIRATION_DATE])) { + $v = $this->getExpirationDate(); + foreach($validationRules[self::FIELD_EXPIRATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_EXPIRATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRATION_DATE])) { + $errs[self::FIELD_EXPIRATION_DATE] = []; + } + $errs[self::FIELD_EXPIRATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURE_DATE])) { + $v = $this->getManufactureDate(); + foreach($validationRules[self::FIELD_MANUFACTURE_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MANUFACTURE_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURE_DATE])) { + $errs[self::FIELD_MANUFACTURE_DATE] = []; + } + $errs[self::FIELD_MANUFACTURE_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODEL])) { + $v = $this->getModel(); + foreach($validationRules[self::FIELD_MODEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_MODEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODEL])) { + $errs[self::FIELD_MODEL] = []; + } + $errs[self::FIELD_MODEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNER])) { + $v = $this->getOwner(); + foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_OWNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNER])) { + $errs[self::FIELD_OWNER] = []; + } + $errs[self::FIELD_OWNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SAFETY])) { + $v = $this->getSafety(); + foreach($validationRules[self::FIELD_SAFETY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_SAFETY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SAFETY])) { + $errs[self::FIELD_SAFETY] = []; + } + $errs[self::FIELD_SAFETY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UDI])) { + $v = $this->getUdi(); + foreach($validationRules[self::FIELD_UDI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_UDI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UDI])) { + $errs[self::FIELD_UDI] = []; + } + $errs[self::FIELD_UDI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php index baead09982..d4899c1e98 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -228,7 +228,7 @@ class FHIRDeviceComponent extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type DeviceComponent * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceComponent Constructor @@ -788,11 +788,296 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getLanguageCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LANGUAGE_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLastSystemChange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_SYSTEM_CHANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasurementPrinciple())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASUREMENT_PRINCIPLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOperationalStatus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OPERATIONAL_STATUS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getParameterGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARAMETER_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getParent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProductionSpecification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRODUCTION_SPECIFICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE_CODE])) { + $v = $this->getLanguageCode(); + foreach($validationRules[self::FIELD_LANGUAGE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_LANGUAGE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE_CODE])) { + $errs[self::FIELD_LANGUAGE_CODE] = []; + } + $errs[self::FIELD_LANGUAGE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_SYSTEM_CHANGE])) { + $v = $this->getLastSystemChange(); + foreach($validationRules[self::FIELD_LAST_SYSTEM_CHANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_LAST_SYSTEM_CHANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_SYSTEM_CHANGE])) { + $errs[self::FIELD_LAST_SYSTEM_CHANGE] = []; + } + $errs[self::FIELD_LAST_SYSTEM_CHANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASUREMENT_PRINCIPLE])) { + $v = $this->getMeasurementPrinciple(); + foreach($validationRules[self::FIELD_MEASUREMENT_PRINCIPLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_MEASUREMENT_PRINCIPLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASUREMENT_PRINCIPLE])) { + $errs[self::FIELD_MEASUREMENT_PRINCIPLE] = []; + } + $errs[self::FIELD_MEASUREMENT_PRINCIPLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATIONAL_STATUS])) { + $v = $this->getOperationalStatus(); + foreach($validationRules[self::FIELD_OPERATIONAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_OPERATIONAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATIONAL_STATUS])) { + $errs[self::FIELD_OPERATIONAL_STATUS] = []; + } + $errs[self::FIELD_OPERATIONAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER_GROUP])) { + $v = $this->getParameterGroup(); + foreach($validationRules[self::FIELD_PARAMETER_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_PARAMETER_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER_GROUP])) { + $errs[self::FIELD_PARAMETER_GROUP] = []; + } + $errs[self::FIELD_PARAMETER_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRODUCTION_SPECIFICATION])) { + $v = $this->getProductionSpecification(); + foreach($validationRules[self::FIELD_PRODUCTION_SPECIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_PRODUCTION_SPECIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRODUCTION_SPECIFICATION])) { + $errs[self::FIELD_PRODUCTION_SPECIFICATION] = []; + } + $errs[self::FIELD_PRODUCTION_SPECIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_COMPONENT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php index d56d3286d5..4fdb285714 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -243,7 +243,7 @@ class FHIRDeviceMetric extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type DeviceMetric * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceMetric Constructor @@ -798,11 +798,294 @@ public function setUnit(FHIRCodeableConcept $unit = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCalibration())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CALIBRATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getColor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasurementPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASUREMENT_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATIONAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getParent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNIT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CALIBRATION])) { + $v = $this->getCalibration(); + foreach($validationRules[self::FIELD_CALIBRATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_CALIBRATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CALIBRATION])) { + $errs[self::FIELD_CALIBRATION] = []; + } + $errs[self::FIELD_CALIBRATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLOR])) { + $v = $this->getColor(); + foreach($validationRules[self::FIELD_COLOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_COLOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLOR])) { + $errs[self::FIELD_COLOR] = []; + } + $errs[self::FIELD_COLOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASUREMENT_PERIOD])) { + $v = $this->getMeasurementPeriod(); + foreach($validationRules[self::FIELD_MEASUREMENT_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_MEASUREMENT_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASUREMENT_PERIOD])) { + $errs[self::FIELD_MEASUREMENT_PERIOD] = []; + } + $errs[self::FIELD_MEASUREMENT_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATIONAL_STATUS])) { + $v = $this->getOperationalStatus(); + foreach($validationRules[self::FIELD_OPERATIONAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_OPERATIONAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATIONAL_STATUS])) { + $errs[self::FIELD_OPERATIONAL_STATUS] = []; + } + $errs[self::FIELD_OPERATIONAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIT])) { + $v = $this->getUnit(); + foreach($validationRules[self::FIELD_UNIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC, self::FIELD_UNIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIT])) { + $errs[self::FIELD_UNIT] = []; + } + $errs[self::FIELD_UNIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php index 8c3444ea32..445cc6ae6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -419,7 +419,7 @@ class FHIRDeviceRequest extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type DeviceRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceRequest Constructor @@ -1838,11 +1838,548 @@ public function setSupportingInfo(array $supportingInfo = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCodeCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCodeReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformerType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPriorRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRIOR_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelevantHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELEVANT_HISTORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE_CODEABLE_CONCEPT])) { + $v = $this->getCodeCodeableConcept(); + foreach($validationRules[self::FIELD_CODE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_CODE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_CODE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_CODE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE_REFERENCE])) { + $v = $this->getCodeReference(); + foreach($validationRules[self::FIELD_CODE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_CODE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE_REFERENCE])) { + $errs[self::FIELD_CODE_REFERENCE] = []; + } + $errs[self::FIELD_CODE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER_TYPE])) { + $v = $this->getPerformerType(); + foreach($validationRules[self::FIELD_PERFORMER_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_PERFORMER_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER_TYPE])) { + $errs[self::FIELD_PERFORMER_TYPE] = []; + } + $errs[self::FIELD_PERFORMER_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIOR_REQUEST])) { + $v = $this->getPriorRequest(); + foreach($validationRules[self::FIELD_PRIOR_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_PRIOR_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIOR_REQUEST])) { + $errs[self::FIELD_PRIOR_REQUEST] = []; + } + $errs[self::FIELD_PRIOR_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEVANT_HISTORY])) { + $v = $this->getRelevantHistory(); + foreach($validationRules[self::FIELD_RELEVANT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_RELEVANT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEVANT_HISTORY])) { + $errs[self::FIELD_RELEVANT_HISTORY] = []; + } + $errs[self::FIELD_RELEVANT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_REQUEST, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php index a3024bd254..32e917962b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -271,7 +271,7 @@ class FHIRDeviceUseStatement extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type DeviceUseStatement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDeviceUseStatement Constructor @@ -1014,11 +1014,349 @@ public function setWhenUsed(FHIRPeriod $whenUsed = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIndication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INDICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecordedOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED_ON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimingTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMING_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenUsed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_USED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDICATION])) { + $v = $this->getIndication(); + foreach($validationRules[self::FIELD_INDICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_INDICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDICATION])) { + $errs[self::FIELD_INDICATION] = []; + } + $errs[self::FIELD_INDICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED_ON])) { + $v = $this->getRecordedOn(); + foreach($validationRules[self::FIELD_RECORDED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_RECORDED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED_ON])) { + $errs[self::FIELD_RECORDED_ON] = []; + } + $errs[self::FIELD_RECORDED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_DATE_TIME])) { + $v = $this->getTimingDateTime(); + foreach($validationRules[self::FIELD_TIMING_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_TIMING_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_DATE_TIME])) { + $errs[self::FIELD_TIMING_DATE_TIME] = []; + } + $errs[self::FIELD_TIMING_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_PERIOD])) { + $v = $this->getTimingPeriod(); + foreach($validationRules[self::FIELD_TIMING_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_TIMING_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_PERIOD])) { + $errs[self::FIELD_TIMING_PERIOD] = []; + } + $errs[self::FIELD_TIMING_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMING_TIMING])) { + $v = $this->getTimingTiming(); + foreach($validationRules[self::FIELD_TIMING_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_TIMING_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMING_TIMING])) { + $errs[self::FIELD_TIMING_TIMING] = []; + } + $errs[self::FIELD_TIMING_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_USED])) { + $v = $this->getWhenUsed(); + foreach($validationRules[self::FIELD_WHEN_USED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT, self::FIELD_WHEN_USED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_USED])) { + $errs[self::FIELD_WHEN_USED] = []; + } + $errs[self::FIELD_WHEN_USED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php index 5617c841bd..7ab1bd7be8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -353,7 +353,7 @@ class FHIRDiagnosticReport extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type DiagnosticReport * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRDiagnosticReport Constructor @@ -1566,11 +1566,446 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCodedDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODED_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getConclusion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCLUSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImagingStudy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGING_STUDY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPresentedForm())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRESENTED_FORM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getResult())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESULT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODED_DIAGNOSIS])) { + $v = $this->getCodedDiagnosis(); + foreach($validationRules[self::FIELD_CODED_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CODED_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODED_DIAGNOSIS])) { + $errs[self::FIELD_CODED_DIAGNOSIS] = []; + } + $errs[self::FIELD_CODED_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONCLUSION])) { + $v = $this->getConclusion(); + foreach($validationRules[self::FIELD_CONCLUSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CONCLUSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONCLUSION])) { + $errs[self::FIELD_CONCLUSION] = []; + } + $errs[self::FIELD_CONCLUSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGE])) { + $v = $this->getImage(); + foreach($validationRules[self::FIELD_IMAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IMAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGE])) { + $errs[self::FIELD_IMAGE] = []; + } + $errs[self::FIELD_IMAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGING_STUDY])) { + $v = $this->getImagingStudy(); + foreach($validationRules[self::FIELD_IMAGING_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IMAGING_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGING_STUDY])) { + $errs[self::FIELD_IMAGING_STUDY] = []; + } + $errs[self::FIELD_IMAGING_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESENTED_FORM])) { + $v = $this->getPresentedForm(); + foreach($validationRules[self::FIELD_PRESENTED_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_PRESENTED_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESENTED_FORM])) { + $errs[self::FIELD_PRESENTED_FORM] = []; + } + $errs[self::FIELD_PRESENTED_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php index 8caf7223d2..edff2f0a54 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -259,7 +259,7 @@ class FHIRDocumentManifest extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type DocumentManifest * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CONTENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1060,11 +1060,336 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMasterIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MASTER_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MASTER_IDENTIFIER])) { + $v = $this->getMasterIdentifier(); + foreach($validationRules[self::FIELD_MASTER_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_MASTER_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MASTER_IDENTIFIER])) { + $errs[self::FIELD_MASTER_IDENTIFIER] = []; + } + $errs[self::FIELD_MASTER_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_MANIFEST, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php index 5e25c14209..0678792012 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -323,7 +323,7 @@ class FHIRDocumentReference extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type DocumentReference * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_CONTENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1332,11 +1332,421 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthenticator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHENTICATOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAuthor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getCustodian())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CUSTODIAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOC_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIndexed())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDEXED] = $fieldErrs; + } + } + if (null !== ($v = $this->getMasterIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MASTER_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatesTo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATES_TO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSecurityLabel())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SECURITY_LABEL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHENTICATOR])) { + $v = $this->getAuthenticator(); + foreach($validationRules[self::FIELD_AUTHENTICATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_AUTHENTICATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHENTICATOR])) { + $errs[self::FIELD_AUTHENTICATOR] = []; + } + $errs[self::FIELD_AUTHENTICATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CUSTODIAN])) { + $v = $this->getCustodian(); + foreach($validationRules[self::FIELD_CUSTODIAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_CUSTODIAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CUSTODIAN])) { + $errs[self::FIELD_CUSTODIAN] = []; + } + $errs[self::FIELD_CUSTODIAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOC_STATUS])) { + $v = $this->getDocStatus(); + foreach($validationRules[self::FIELD_DOC_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_DOC_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOC_STATUS])) { + $errs[self::FIELD_DOC_STATUS] = []; + } + $errs[self::FIELD_DOC_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDEXED])) { + $v = $this->getIndexed(); + foreach($validationRules[self::FIELD_INDEXED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_INDEXED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDEXED])) { + $errs[self::FIELD_INDEXED] = []; + } + $errs[self::FIELD_INDEXED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MASTER_IDENTIFIER])) { + $v = $this->getMasterIdentifier(); + foreach($validationRules[self::FIELD_MASTER_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_MASTER_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MASTER_IDENTIFIER])) { + $errs[self::FIELD_MASTER_IDENTIFIER] = []; + } + $errs[self::FIELD_MASTER_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATES_TO])) { + $v = $this->getRelatesTo(); + foreach($validationRules[self::FIELD_RELATES_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_RELATES_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATES_TO])) { + $errs[self::FIELD_RELATES_TO] = []; + } + $errs[self::FIELD_RELATES_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SECURITY_LABEL])) { + $v = $this->getSecurityLabel(); + foreach($validationRules[self::FIELD_SECURITY_LABEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_SECURITY_LABEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SECURITY_LABEL])) { + $errs[self::FIELD_SECURITY_LABEL] = []; + } + $errs[self::FIELD_SECURITY_LABEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php index 75c95396bb..d4962a15e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -302,7 +302,7 @@ class FHIREligibilityRequest extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type EligibilityRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREligibilityRequest Constructor @@ -1086,11 +1086,396 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBenefitCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BENEFIT_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getBenefitSubCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BENEFIT_SUB_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getBusinessArrangement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFacility())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServicedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICED_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BENEFIT_CATEGORY])) { + $v = $this->getBenefitCategory(); + foreach($validationRules[self::FIELD_BENEFIT_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_BENEFIT_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFIT_CATEGORY])) { + $errs[self::FIELD_BENEFIT_CATEGORY] = []; + } + $errs[self::FIELD_BENEFIT_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BENEFIT_SUB_CATEGORY])) { + $v = $this->getBenefitSubCategory(); + foreach($validationRules[self::FIELD_BENEFIT_SUB_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_BENEFIT_SUB_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFIT_SUB_CATEGORY])) { + $errs[self::FIELD_BENEFIT_SUB_CATEGORY] = []; + } + $errs[self::FIELD_BENEFIT_SUB_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BUSINESS_ARRANGEMENT])) { + $v = $this->getBusinessArrangement(); + foreach($validationRules[self::FIELD_BUSINESS_ARRANGEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_BUSINESS_ARRANGEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BUSINESS_ARRANGEMENT])) { + $errs[self::FIELD_BUSINESS_ARRANGEMENT] = []; + } + $errs[self::FIELD_BUSINESS_ARRANGEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY])) { + $v = $this->getFacility(); + foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_FACILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY])) { + $errs[self::FIELD_FACILITY] = []; + } + $errs[self::FIELD_FACILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_DATE])) { + $v = $this->getServicedDate(); + foreach($validationRules[self::FIELD_SERVICED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_SERVICED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_DATE])) { + $errs[self::FIELD_SERVICED_DATE] = []; + } + $errs[self::FIELD_SERVICED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICED_PERIOD])) { + $v = $this->getServicedPeriod(); + foreach($validationRules[self::FIELD_SERVICED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_SERVICED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICED_PERIOD])) { + $errs[self::FIELD_SERVICED_PERIOD] = []; + } + $errs[self::FIELD_SERVICED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php index 182127cbf3..bbe7e0e8e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -259,7 +259,7 @@ class FHIREligibilityResponse extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type EligibilityResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREligibilityResponse Constructor @@ -993,11 +993,349 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getError())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ERROR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInforce())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INFORCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getInsurance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSURANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ERROR])) { + $v = $this->getError(); + foreach($validationRules[self::FIELD_ERROR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_ERROR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ERROR])) { + $errs[self::FIELD_ERROR] = []; + } + $errs[self::FIELD_ERROR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORCE])) { + $v = $this->getInforce(); + foreach($validationRules[self::FIELD_INFORCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_INFORCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORCE])) { + $errs[self::FIELD_INFORCE] = []; + } + $errs[self::FIELD_INFORCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREncounter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREncounter.php index dbf34c1dc0..b6e1077f5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREncounter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREncounter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -371,7 +371,7 @@ class FHIREncounter extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Encounter * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREncounter Constructor @@ -1669,11 +1669,501 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAccount())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACCOUNT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAppointment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getClass())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLASS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getClassHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CLASS_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEpisodeOfCare())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EPISODE_OF_CARE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getHospitalization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HOSPITALIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIncomingReferral())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INCOMING_REFERRAL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLength())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LENGTH] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getServiceProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStatusHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STATUS_HISTORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACCOUNT])) { + $v = $this->getAccount(); + foreach($validationRules[self::FIELD_ACCOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_ACCOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCOUNT])) { + $errs[self::FIELD_ACCOUNT] = []; + } + $errs[self::FIELD_ACCOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT])) { + $v = $this->getAppointment(); + foreach($validationRules[self::FIELD_APPOINTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_APPOINTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT])) { + $errs[self::FIELD_APPOINTMENT] = []; + } + $errs[self::FIELD_APPOINTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS])) { + $v = $this->getClass(); + foreach($validationRules[self::FIELD_CLASS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_CLASS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS])) { + $errs[self::FIELD_CLASS] = []; + } + $errs[self::FIELD_CLASS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLASS_HISTORY])) { + $v = $this->getClassHistory(); + foreach($validationRules[self::FIELD_CLASS_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_CLASS_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLASS_HISTORY])) { + $errs[self::FIELD_CLASS_HISTORY] = []; + } + $errs[self::FIELD_CLASS_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EPISODE_OF_CARE])) { + $v = $this->getEpisodeOfCare(); + foreach($validationRules[self::FIELD_EPISODE_OF_CARE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_EPISODE_OF_CARE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EPISODE_OF_CARE])) { + $errs[self::FIELD_EPISODE_OF_CARE] = []; + } + $errs[self::FIELD_EPISODE_OF_CARE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HOSPITALIZATION])) { + $v = $this->getHospitalization(); + foreach($validationRules[self::FIELD_HOSPITALIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_HOSPITALIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HOSPITALIZATION])) { + $errs[self::FIELD_HOSPITALIZATION] = []; + } + $errs[self::FIELD_HOSPITALIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCOMING_REFERRAL])) { + $v = $this->getIncomingReferral(); + foreach($validationRules[self::FIELD_INCOMING_REFERRAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_INCOMING_REFERRAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCOMING_REFERRAL])) { + $errs[self::FIELD_INCOMING_REFERRAL] = []; + } + $errs[self::FIELD_INCOMING_REFERRAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LENGTH])) { + $v = $this->getLength(); + foreach($validationRules[self::FIELD_LENGTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_LENGTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LENGTH])) { + $errs[self::FIELD_LENGTH] = []; + } + $errs[self::FIELD_LENGTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_PROVIDER])) { + $v = $this->getServiceProvider(); + foreach($validationRules[self::FIELD_SERVICE_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_SERVICE_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_PROVIDER])) { + $errs[self::FIELD_SERVICE_PROVIDER] = []; + } + $errs[self::FIELD_SERVICE_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_HISTORY])) { + $v = $this->getStatusHistory(); + foreach($validationRules[self::FIELD_STATUS_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_STATUS_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_HISTORY])) { + $errs[self::FIELD_STATUS_HISTORY] = []; + } + $errs[self::FIELD_STATUS_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENCOUNTER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREndpoint.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREndpoint.php index 63b2e45e31..c591bdb852 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREndpoint.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREndpoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -246,7 +246,7 @@ class FHIREndpoint extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Endpoint * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_PAYLOAD_TYPE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1041,11 +1041,319 @@ public function setStatus(FHIREndpointStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if (null !== ($v = $this->getConnectionType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONNECTION_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getHeader())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HEADER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPayloadMimeType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYLOAD_MIME_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPayloadType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PAYLOAD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONNECTION_TYPE])) { + $v = $this->getConnectionType(); + foreach($validationRules[self::FIELD_CONNECTION_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_CONNECTION_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONNECTION_TYPE])) { + $errs[self::FIELD_CONNECTION_TYPE] = []; + } + $errs[self::FIELD_CONNECTION_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEADER])) { + $v = $this->getHeader(); + foreach($validationRules[self::FIELD_HEADER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_HEADER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEADER])) { + $errs[self::FIELD_HEADER] = []; + } + $errs[self::FIELD_HEADER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD_MIME_TYPE])) { + $v = $this->getPayloadMimeType(); + foreach($validationRules[self::FIELD_PAYLOAD_MIME_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_PAYLOAD_MIME_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD_MIME_TYPE])) { + $errs[self::FIELD_PAYLOAD_MIME_TYPE] = []; + } + $errs[self::FIELD_PAYLOAD_MIME_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYLOAD_TYPE])) { + $v = $this->getPayloadType(); + foreach($validationRules[self::FIELD_PAYLOAD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_PAYLOAD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYLOAD_TYPE])) { + $errs[self::FIELD_PAYLOAD_TYPE] = []; + } + $errs[self::FIELD_PAYLOAD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENDPOINT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php index a27625838b..2aed4572f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -191,7 +191,7 @@ class FHIREnrollmentRequest extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type EnrollmentRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREnrollmentRequest Constructor @@ -617,11 +617,260 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COVERAGE])) { + $v = $this->getCoverage(); + foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE])) { + $errs[self::FIELD_COVERAGE] = []; + } + $errs[self::FIELD_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php index 9195a51904..a70bd2ab97 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -207,7 +207,7 @@ class FHIREnrollmentResponse extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type EnrollmentResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREnrollmentResponse Constructor @@ -696,11 +696,277 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ENROLLMENT_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php index a5bea6b189..2ce664bc31 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -248,7 +248,7 @@ class FHIREpisodeOfCare extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type EpisodeOfCare * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIREpisodeOfCare Constructor @@ -1039,11 +1039,340 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAccount())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACCOUNT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCareManager())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARE_MANAGER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferralRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERRAL_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStatusHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STATUS_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTeam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEAM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACCOUNT])) { + $v = $this->getAccount(); + foreach($validationRules[self::FIELD_ACCOUNT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_ACCOUNT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCOUNT])) { + $errs[self::FIELD_ACCOUNT] = []; + } + $errs[self::FIELD_ACCOUNT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_MANAGER])) { + $v = $this->getCareManager(); + foreach($validationRules[self::FIELD_CARE_MANAGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_CARE_MANAGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_MANAGER])) { + $errs[self::FIELD_CARE_MANAGER] = []; + } + $errs[self::FIELD_CARE_MANAGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL_REQUEST])) { + $v = $this->getReferralRequest(); + foreach($validationRules[self::FIELD_REFERRAL_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_REFERRAL_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL_REQUEST])) { + $errs[self::FIELD_REFERRAL_REQUEST] = []; + } + $errs[self::FIELD_REFERRAL_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_HISTORY])) { + $v = $this->getStatusHistory(); + foreach($validationRules[self::FIELD_STATUS_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_STATUS_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_HISTORY])) { + $errs[self::FIELD_STATUS_HISTORY] = []; + } + $errs[self::FIELD_STATUS_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEAM])) { + $v = $this->getTeam(); + foreach($validationRules[self::FIELD_TEAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_TEAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEAM])) { + $errs[self::FIELD_TEAM] = []; + } + $errs[self::FIELD_TEAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExpansionProfile.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExpansionProfile.php index 783d4c51c7..63fbb64bc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExpansionProfile.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExpansionProfile.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -426,7 +426,7 @@ class FHIRExpansionProfile extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type ExpansionProfile * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExpansionProfile Constructor @@ -1924,11 +1924,521 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActiveOnly())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE_ONLY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDesignation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESIGNATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisplayLanguage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPLAY_LANGUAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExcludeNested())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDE_NESTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getExcludeNotForUI())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDE_NOT_FOR_UI] = $fieldErrs; + } + } + if (null !== ($v = $this->getExcludePostCoordinated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDE_POST_COORDINATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getExcludedSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXCLUDED_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFixedVersion())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FIXED_VERSION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIncludeDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INCLUDE_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIncludeDesignations())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INCLUDE_DESIGNATIONS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLimitedExpansion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIMITED_EXPANSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVE_ONLY])) { + $v = $this->getActiveOnly(); + foreach($validationRules[self::FIELD_ACTIVE_ONLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_ACTIVE_ONLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE_ONLY])) { + $errs[self::FIELD_ACTIVE_ONLY] = []; + } + $errs[self::FIELD_ACTIVE_ONLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESIGNATION])) { + $v = $this->getDesignation(); + foreach($validationRules[self::FIELD_DESIGNATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_DESIGNATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESIGNATION])) { + $errs[self::FIELD_DESIGNATION] = []; + } + $errs[self::FIELD_DESIGNATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPLAY_LANGUAGE])) { + $v = $this->getDisplayLanguage(); + foreach($validationRules[self::FIELD_DISPLAY_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_DISPLAY_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPLAY_LANGUAGE])) { + $errs[self::FIELD_DISPLAY_LANGUAGE] = []; + } + $errs[self::FIELD_DISPLAY_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE_NESTED])) { + $v = $this->getExcludeNested(); + foreach($validationRules[self::FIELD_EXCLUDE_NESTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_EXCLUDE_NESTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE_NESTED])) { + $errs[self::FIELD_EXCLUDE_NESTED] = []; + } + $errs[self::FIELD_EXCLUDE_NESTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE_NOT_FOR_UI])) { + $v = $this->getExcludeNotForUI(); + foreach($validationRules[self::FIELD_EXCLUDE_NOT_FOR_UI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_EXCLUDE_NOT_FOR_UI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE_NOT_FOR_UI])) { + $errs[self::FIELD_EXCLUDE_NOT_FOR_UI] = []; + } + $errs[self::FIELD_EXCLUDE_NOT_FOR_UI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE_POST_COORDINATED])) { + $v = $this->getExcludePostCoordinated(); + foreach($validationRules[self::FIELD_EXCLUDE_POST_COORDINATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_EXCLUDE_POST_COORDINATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE_POST_COORDINATED])) { + $errs[self::FIELD_EXCLUDE_POST_COORDINATED] = []; + } + $errs[self::FIELD_EXCLUDE_POST_COORDINATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDED_SYSTEM])) { + $v = $this->getExcludedSystem(); + foreach($validationRules[self::FIELD_EXCLUDED_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_EXCLUDED_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDED_SYSTEM])) { + $errs[self::FIELD_EXCLUDED_SYSTEM] = []; + } + $errs[self::FIELD_EXCLUDED_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXED_VERSION])) { + $v = $this->getFixedVersion(); + foreach($validationRules[self::FIELD_FIXED_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_FIXED_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXED_VERSION])) { + $errs[self::FIELD_FIXED_VERSION] = []; + } + $errs[self::FIELD_FIXED_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCLUDE_DEFINITION])) { + $v = $this->getIncludeDefinition(); + foreach($validationRules[self::FIELD_INCLUDE_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_INCLUDE_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCLUDE_DEFINITION])) { + $errs[self::FIELD_INCLUDE_DEFINITION] = []; + } + $errs[self::FIELD_INCLUDE_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCLUDE_DESIGNATIONS])) { + $v = $this->getIncludeDesignations(); + foreach($validationRules[self::FIELD_INCLUDE_DESIGNATIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_INCLUDE_DESIGNATIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCLUDE_DESIGNATIONS])) { + $errs[self::FIELD_INCLUDE_DESIGNATIONS] = []; + } + $errs[self::FIELD_INCLUDE_DESIGNATIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIMITED_EXPANSION])) { + $v = $this->getLimitedExpansion(); + foreach($validationRules[self::FIELD_LIMITED_EXPANSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_LIMITED_EXPANSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIMITED_EXPANSION])) { + $errs[self::FIELD_LIMITED_EXPANSION] = []; + } + $errs[self::FIELD_LIMITED_EXPANSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPANSION_PROFILE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php index 1cd947af3e..34f7899805 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -606,7 +606,7 @@ class FHIRExplanationOfBenefit extends FHIRDomainResource implements PHPFHIRCont * Validation map for fields in type ExplanationOfBenefit * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRExplanationOfBenefit Constructor @@ -2647,11 +2647,807 @@ public function setUnallocDeductable(FHIRMoney $unallocDeductable = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccident())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCIDENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBenefitBalance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BENEFIT_BALANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBillablePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BILLABLE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCareTeam())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CARE_TEAM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getClaim())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDiagnosis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEmploymentImpacted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EMPLOYMENT_IMPACTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getFacility())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FACILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if (null !== ($v = $this->getHospitalization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HOSPITALIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInsurance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getInsurer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSURER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOriginalPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayee())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYEE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPayment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrecedence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRECEDENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcedure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProcessNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESS_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferral())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUB_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTotalBenefit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL_BENEFIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotalCost())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL_COST] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUnallocDeductable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UNALLOC_DEDUCTABLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCIDENT])) { + $v = $this->getAccident(); + foreach($validationRules[self::FIELD_ACCIDENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ACCIDENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCIDENT])) { + $errs[self::FIELD_ACCIDENT] = []; + } + $errs[self::FIELD_ACCIDENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADD_ITEM])) { + $v = $this->getAddItem(); + foreach($validationRules[self::FIELD_ADD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ADD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADD_ITEM])) { + $errs[self::FIELD_ADD_ITEM] = []; + } + $errs[self::FIELD_ADD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BENEFIT_BALANCE])) { + $v = $this->getBenefitBalance(); + foreach($validationRules[self::FIELD_BENEFIT_BALANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_BENEFIT_BALANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BENEFIT_BALANCE])) { + $errs[self::FIELD_BENEFIT_BALANCE] = []; + } + $errs[self::FIELD_BENEFIT_BALANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BILLABLE_PERIOD])) { + $v = $this->getBillablePeriod(); + foreach($validationRules[self::FIELD_BILLABLE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_BILLABLE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BILLABLE_PERIOD])) { + $errs[self::FIELD_BILLABLE_PERIOD] = []; + } + $errs[self::FIELD_BILLABLE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CARE_TEAM])) { + $v = $this->getCareTeam(); + foreach($validationRules[self::FIELD_CARE_TEAM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_CARE_TEAM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CARE_TEAM])) { + $errs[self::FIELD_CARE_TEAM] = []; + } + $errs[self::FIELD_CARE_TEAM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLAIM])) { + $v = $this->getClaim(); + foreach($validationRules[self::FIELD_CLAIM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_CLAIM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM])) { + $errs[self::FIELD_CLAIM] = []; + } + $errs[self::FIELD_CLAIM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLAIM_RESPONSE])) { + $v = $this->getClaimResponse(); + foreach($validationRules[self::FIELD_CLAIM_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_CLAIM_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLAIM_RESPONSE])) { + $errs[self::FIELD_CLAIM_RESPONSE] = []; + } + $errs[self::FIELD_CLAIM_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIAGNOSIS])) { + $v = $this->getDiagnosis(); + foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_DIAGNOSIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIAGNOSIS])) { + $errs[self::FIELD_DIAGNOSIS] = []; + } + $errs[self::FIELD_DIAGNOSIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EMPLOYMENT_IMPACTED])) { + $v = $this->getEmploymentImpacted(); + foreach($validationRules[self::FIELD_EMPLOYMENT_IMPACTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_EMPLOYMENT_IMPACTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EMPLOYMENT_IMPACTED])) { + $errs[self::FIELD_EMPLOYMENT_IMPACTED] = []; + } + $errs[self::FIELD_EMPLOYMENT_IMPACTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FACILITY])) { + $v = $this->getFacility(); + foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_FACILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FACILITY])) { + $errs[self::FIELD_FACILITY] = []; + } + $errs[self::FIELD_FACILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HOSPITALIZATION])) { + $v = $this->getHospitalization(); + foreach($validationRules[self::FIELD_HOSPITALIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_HOSPITALIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HOSPITALIZATION])) { + $errs[self::FIELD_HOSPITALIZATION] = []; + } + $errs[self::FIELD_HOSPITALIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORMATION])) { + $v = $this->getInformation(); + foreach($validationRules[self::FIELD_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORMATION])) { + $errs[self::FIELD_INFORMATION] = []; + } + $errs[self::FIELD_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURANCE])) { + $v = $this->getInsurance(); + foreach($validationRules[self::FIELD_INSURANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_INSURANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURANCE])) { + $errs[self::FIELD_INSURANCE] = []; + } + $errs[self::FIELD_INSURANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSURER])) { + $v = $this->getInsurer(); + foreach($validationRules[self::FIELD_INSURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_INSURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSURER])) { + $errs[self::FIELD_INSURER] = []; + } + $errs[self::FIELD_INSURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION])) { + $v = $this->getOriginalPrescription(); + foreach($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_ORIGINAL_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGINAL_PRESCRIPTION])) { + $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = []; + } + $errs[self::FIELD_ORIGINAL_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYEE])) { + $v = $this->getPayee(); + foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PAYEE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYEE])) { + $errs[self::FIELD_PAYEE] = []; + } + $errs[self::FIELD_PAYEE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT])) { + $v = $this->getPayment(); + foreach($validationRules[self::FIELD_PAYMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PAYMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT])) { + $errs[self::FIELD_PAYMENT] = []; + } + $errs[self::FIELD_PAYMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRECEDENCE])) { + $v = $this->getPrecedence(); + foreach($validationRules[self::FIELD_PRECEDENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PRECEDENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRECEDENCE])) { + $errs[self::FIELD_PRECEDENCE] = []; + } + $errs[self::FIELD_PRECEDENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIPTION])) { + $v = $this->getPrescription(); + foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIPTION])) { + $errs[self::FIELD_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE])) { + $v = $this->getProcedure(); + foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PROCEDURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE])) { + $errs[self::FIELD_PROCEDURE] = []; + } + $errs[self::FIELD_PROCEDURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESS_NOTE])) { + $v = $this->getProcessNote(); + foreach($validationRules[self::FIELD_PROCESS_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PROCESS_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESS_NOTE])) { + $errs[self::FIELD_PROCESS_NOTE] = []; + } + $errs[self::FIELD_PROCESS_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL])) { + $v = $this->getReferral(); + foreach($validationRules[self::FIELD_REFERRAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_REFERRAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL])) { + $errs[self::FIELD_REFERRAL] = []; + } + $errs[self::FIELD_REFERRAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUB_TYPE])) { + $v = $this->getSubType(); + foreach($validationRules[self::FIELD_SUB_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_SUB_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUB_TYPE])) { + $errs[self::FIELD_SUB_TYPE] = []; + } + $errs[self::FIELD_SUB_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL_BENEFIT])) { + $v = $this->getTotalBenefit(); + foreach($validationRules[self::FIELD_TOTAL_BENEFIT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_TOTAL_BENEFIT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL_BENEFIT])) { + $errs[self::FIELD_TOTAL_BENEFIT] = []; + } + $errs[self::FIELD_TOTAL_BENEFIT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL_COST])) { + $v = $this->getTotalCost(); + foreach($validationRules[self::FIELD_TOTAL_COST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_TOTAL_COST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL_COST])) { + $errs[self::FIELD_TOTAL_COST] = []; + } + $errs[self::FIELD_TOTAL_COST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNALLOC_DEDUCTABLE])) { + $v = $this->getUnallocDeductable(); + foreach($validationRules[self::FIELD_UNALLOC_DEDUCTABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT, self::FIELD_UNALLOC_DEDUCTABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNALLOC_DEDUCTABLE])) { + $errs[self::FIELD_UNALLOC_DEDUCTABLE] = []; + } + $errs[self::FIELD_UNALLOC_DEDUCTABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php index ba306e541a..4446255ac2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -448,7 +448,7 @@ class FHIRFamilyMemberHistory extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type FamilyMemberHistory * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFamilyMemberHistory Constructor @@ -2010,11 +2010,576 @@ public function setStatus(FHIRFamilyHistoryStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAgeAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAgeRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAgeString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AGE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getBornString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BORN_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCondition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_STRING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEstimatedAge())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ESTIMATED_AGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotDone())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_DONE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotDoneReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_DONE_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AGE_AGE])) { + $v = $this->getAgeAge(); + foreach($validationRules[self::FIELD_AGE_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_AGE_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_AGE])) { + $errs[self::FIELD_AGE_AGE] = []; + } + $errs[self::FIELD_AGE_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGE_RANGE])) { + $v = $this->getAgeRange(); + foreach($validationRules[self::FIELD_AGE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_AGE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_RANGE])) { + $errs[self::FIELD_AGE_RANGE] = []; + } + $errs[self::FIELD_AGE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGE_STRING])) { + $v = $this->getAgeString(); + foreach($validationRules[self::FIELD_AGE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_AGE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGE_STRING])) { + $errs[self::FIELD_AGE_STRING] = []; + } + $errs[self::FIELD_AGE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_DATE])) { + $v = $this->getBornDate(); + foreach($validationRules[self::FIELD_BORN_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_BORN_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_DATE])) { + $errs[self::FIELD_BORN_DATE] = []; + } + $errs[self::FIELD_BORN_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_PERIOD])) { + $v = $this->getBornPeriod(); + foreach($validationRules[self::FIELD_BORN_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_BORN_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_PERIOD])) { + $errs[self::FIELD_BORN_PERIOD] = []; + } + $errs[self::FIELD_BORN_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BORN_STRING])) { + $v = $this->getBornString(); + foreach($validationRules[self::FIELD_BORN_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_BORN_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BORN_STRING])) { + $errs[self::FIELD_BORN_STRING] = []; + } + $errs[self::FIELD_BORN_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_AGE])) { + $v = $this->getDeceasedAge(); + foreach($validationRules[self::FIELD_DECEASED_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_AGE])) { + $errs[self::FIELD_DECEASED_AGE] = []; + } + $errs[self::FIELD_DECEASED_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_BOOLEAN])) { + $v = $this->getDeceasedBoolean(); + foreach($validationRules[self::FIELD_DECEASED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_BOOLEAN])) { + $errs[self::FIELD_DECEASED_BOOLEAN] = []; + } + $errs[self::FIELD_DECEASED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_DATE])) { + $v = $this->getDeceasedDate(); + foreach($validationRules[self::FIELD_DECEASED_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_DATE])) { + $errs[self::FIELD_DECEASED_DATE] = []; + } + $errs[self::FIELD_DECEASED_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_RANGE])) { + $v = $this->getDeceasedRange(); + foreach($validationRules[self::FIELD_DECEASED_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_RANGE])) { + $errs[self::FIELD_DECEASED_RANGE] = []; + } + $errs[self::FIELD_DECEASED_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_STRING])) { + $v = $this->getDeceasedString(); + foreach($validationRules[self::FIELD_DECEASED_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DECEASED_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_STRING])) { + $errs[self::FIELD_DECEASED_STRING] = []; + } + $errs[self::FIELD_DECEASED_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ESTIMATED_AGE])) { + $v = $this->getEstimatedAge(); + foreach($validationRules[self::FIELD_ESTIMATED_AGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_ESTIMATED_AGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ESTIMATED_AGE])) { + $errs[self::FIELD_ESTIMATED_AGE] = []; + } + $errs[self::FIELD_ESTIMATED_AGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_DONE])) { + $v = $this->getNotDone(); + foreach($validationRules[self::FIELD_NOT_DONE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_NOT_DONE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_DONE])) { + $errs[self::FIELD_NOT_DONE] = []; + } + $errs[self::FIELD_NOT_DONE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_DONE_REASON])) { + $v = $this->getNotDoneReason(); + foreach($validationRules[self::FIELD_NOT_DONE_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_NOT_DONE_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_DONE_REASON])) { + $errs[self::FIELD_NOT_DONE_REASON] = []; + } + $errs[self::FIELD_NOT_DONE_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FAMILY_MEMBER_HISTORY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFlag.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFlag.php index 791f83a5de..938763ec03 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFlag.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFlag.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -194,7 +194,7 @@ class FHIRFlag extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Flag * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRFlag Constructor @@ -604,11 +604,260 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_FLAG, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGoal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGoal.php index cab9131ab8..c7fe8b5832 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -309,7 +309,7 @@ class FHIRGoal extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Goal * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGoal Constructor @@ -1302,11 +1302,406 @@ public function setTarget(FHIRGoalTarget $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAddresses())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESSES, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpressedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSED_BY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutcomeCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTCOME_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutcomeReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTCOME_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStartCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStartDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESSES])) { + $v = $this->getAddresses(); + foreach($validationRules[self::FIELD_ADDRESSES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_ADDRESSES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESSES])) { + $errs[self::FIELD_ADDRESSES] = []; + } + $errs[self::FIELD_ADDRESSES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSED_BY])) { + $v = $this->getExpressedBy(); + foreach($validationRules[self::FIELD_EXPRESSED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_EXPRESSED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSED_BY])) { + $errs[self::FIELD_EXPRESSED_BY] = []; + } + $errs[self::FIELD_EXPRESSED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_CODE])) { + $v = $this->getOutcomeCode(); + foreach($validationRules[self::FIELD_OUTCOME_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_OUTCOME_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_CODE])) { + $errs[self::FIELD_OUTCOME_CODE] = []; + } + $errs[self::FIELD_OUTCOME_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME_REFERENCE])) { + $v = $this->getOutcomeReference(); + foreach($validationRules[self::FIELD_OUTCOME_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_OUTCOME_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME_REFERENCE])) { + $errs[self::FIELD_OUTCOME_REFERENCE] = []; + } + $errs[self::FIELD_OUTCOME_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START_CODEABLE_CONCEPT])) { + $v = $this->getStartCodeableConcept(); + foreach($validationRules[self::FIELD_START_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_START_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START_CODEABLE_CONCEPT])) { + $errs[self::FIELD_START_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_START_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START_DATE])) { + $v = $this->getStartDate(); + foreach($validationRules[self::FIELD_START_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_START_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START_DATE])) { + $errs[self::FIELD_START_DATE] = []; + } + $errs[self::FIELD_START_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_DATE])) { + $v = $this->getStatusDate(); + foreach($validationRules[self::FIELD_STATUS_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_STATUS_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_DATE])) { + $errs[self::FIELD_STATUS_DATE] = []; + } + $errs[self::FIELD_STATUS_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GOAL, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php index de53ea28f1..4b634962fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -329,7 +329,7 @@ class FHIRGraphDefinition extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type GraphDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGraphDefinition Constructor @@ -1415,11 +1415,385 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GRAPH_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGroup.php index 7db83b3a8c..f1c2e0b2da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -210,7 +210,7 @@ class FHIRGroup extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Group * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGroup Constructor @@ -817,11 +817,281 @@ public function setType(FHIRGroupType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getActual())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTUAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getMember())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MEMBER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTUAL])) { + $v = $this->getActual(); + foreach($validationRules[self::FIELD_ACTUAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_ACTUAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTUAL])) { + $errs[self::FIELD_ACTUAL] = []; + } + $errs[self::FIELD_ACTUAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC])) { + $v = $this->getCharacteristic(); + foreach($validationRules[self::FIELD_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC])) { + $errs[self::FIELD_CHARACTERISTIC] = []; + } + $errs[self::FIELD_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEMBER])) { + $v = $this->getMember(); + foreach($validationRules[self::FIELD_MEMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_MEMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEMBER])) { + $errs[self::FIELD_MEMBER] = []; + } + $errs[self::FIELD_MEMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GROUP, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php index cac9ba3e9d..805cfc4585 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -312,7 +312,7 @@ class FHIRGuidanceResponse extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type GuidanceResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRGuidanceResponse Constructor @@ -1164,11 +1164,383 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDataRequirement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA_REQUIREMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEvaluationMessage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVALUATION_MESSAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getModule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODULE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutputParameters())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTPUT_PARAMETERS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestId())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ID] = $fieldErrs; + } + } + if (null !== ($v = $this->getResult())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESULT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_REQUIREMENT])) { + $v = $this->getDataRequirement(); + foreach($validationRules[self::FIELD_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_REQUIREMENT])) { + $errs[self::FIELD_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVALUATION_MESSAGE])) { + $v = $this->getEvaluationMessage(); + foreach($validationRules[self::FIELD_EVALUATION_MESSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_EVALUATION_MESSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVALUATION_MESSAGE])) { + $errs[self::FIELD_EVALUATION_MESSAGE] = []; + } + $errs[self::FIELD_EVALUATION_MESSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODULE])) { + $v = $this->getModule(); + foreach($validationRules[self::FIELD_MODULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODULE])) { + $errs[self::FIELD_MODULE] = []; + } + $errs[self::FIELD_MODULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTPUT_PARAMETERS])) { + $v = $this->getOutputParameters(); + foreach($validationRules[self::FIELD_OUTPUT_PARAMETERS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OUTPUT_PARAMETERS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTPUT_PARAMETERS])) { + $errs[self::FIELD_OUTPUT_PARAMETERS] = []; + } + $errs[self::FIELD_OUTPUT_PARAMETERS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ID])) { + $v = $this->getRequestId(); + foreach($validationRules[self::FIELD_REQUEST_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REQUEST_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ID])) { + $errs[self::FIELD_REQUEST_ID] = []; + } + $errs[self::FIELD_REQUEST_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php index a70ae7254e..e58ccf8bcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -408,7 +408,7 @@ class FHIRHealthcareService extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type HealthcareService * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRHealthcareService Constructor @@ -2064,11 +2064,556 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointmentRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailabilityExceptions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAvailableTime())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AVAILABLE_TIME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCharacteristic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHARACTERISTIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCoverageArea())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COVERAGE_AREA, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEligibility())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELIGIBILITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getEligibilityNote())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELIGIBILITY_NOTE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExtraDetails())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXTRA_DETAILS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNotAvailable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOT_AVAILABLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPhoto())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHOTO] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProgramName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROGRAM_NAME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getProvidedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDED_BY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReferralMethod())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERRAL_METHOD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getServiceProvisionCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_PROVISION_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT_REQUIRED])) { + $v = $this->getAppointmentRequired(); + foreach($validationRules[self::FIELD_APPOINTMENT_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_APPOINTMENT_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT_REQUIRED])) { + $errs[self::FIELD_APPOINTMENT_REQUIRED] = []; + } + $errs[self::FIELD_APPOINTMENT_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $v = $this->getAvailabilityExceptions(); + foreach($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_AVAILABILITY_EXCEPTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = []; + } + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_TIME])) { + $v = $this->getAvailableTime(); + foreach($validationRules[self::FIELD_AVAILABLE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_AVAILABLE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_TIME])) { + $errs[self::FIELD_AVAILABLE_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHARACTERISTIC])) { + $v = $this->getCharacteristic(); + foreach($validationRules[self::FIELD_CHARACTERISTIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_CHARACTERISTIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHARACTERISTIC])) { + $errs[self::FIELD_CHARACTERISTIC] = []; + } + $errs[self::FIELD_CHARACTERISTIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COVERAGE_AREA])) { + $v = $this->getCoverageArea(); + foreach($validationRules[self::FIELD_COVERAGE_AREA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_COVERAGE_AREA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COVERAGE_AREA])) { + $errs[self::FIELD_COVERAGE_AREA] = []; + } + $errs[self::FIELD_COVERAGE_AREA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELIGIBILITY])) { + $v = $this->getEligibility(); + foreach($validationRules[self::FIELD_ELIGIBILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_ELIGIBILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELIGIBILITY])) { + $errs[self::FIELD_ELIGIBILITY] = []; + } + $errs[self::FIELD_ELIGIBILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ELIGIBILITY_NOTE])) { + $v = $this->getEligibilityNote(); + foreach($validationRules[self::FIELD_ELIGIBILITY_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_ELIGIBILITY_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ELIGIBILITY_NOTE])) { + $errs[self::FIELD_ELIGIBILITY_NOTE] = []; + } + $errs[self::FIELD_ELIGIBILITY_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTRA_DETAILS])) { + $v = $this->getExtraDetails(); + foreach($validationRules[self::FIELD_EXTRA_DETAILS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_EXTRA_DETAILS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTRA_DETAILS])) { + $errs[self::FIELD_EXTRA_DETAILS] = []; + } + $errs[self::FIELD_EXTRA_DETAILS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_AVAILABLE])) { + $v = $this->getNotAvailable(); + foreach($validationRules[self::FIELD_NOT_AVAILABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_NOT_AVAILABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_AVAILABLE])) { + $errs[self::FIELD_NOT_AVAILABLE] = []; + } + $errs[self::FIELD_NOT_AVAILABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROGRAM_NAME])) { + $v = $this->getProgramName(); + foreach($validationRules[self::FIELD_PROGRAM_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_PROGRAM_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROGRAM_NAME])) { + $errs[self::FIELD_PROGRAM_NAME] = []; + } + $errs[self::FIELD_PROGRAM_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDED_BY])) { + $v = $this->getProvidedBy(); + foreach($validationRules[self::FIELD_PROVIDED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_PROVIDED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDED_BY])) { + $errs[self::FIELD_PROVIDED_BY] = []; + } + $errs[self::FIELD_PROVIDED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRAL_METHOD])) { + $v = $this->getReferralMethod(); + foreach($validationRules[self::FIELD_REFERRAL_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_REFERRAL_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRAL_METHOD])) { + $errs[self::FIELD_REFERRAL_METHOD] = []; + } + $errs[self::FIELD_REFERRAL_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_PROVISION_CODE])) { + $v = $this->getServiceProvisionCode(); + foreach($validationRules[self::FIELD_SERVICE_PROVISION_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_SERVICE_PROVISION_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_PROVISION_CODE])) { + $errs[self::FIELD_SERVICE_PROVISION_CODE] = []; + } + $errs[self::FIELD_SERVICE_PROVISION_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_HEALTHCARE_SERVICE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingManifest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingManifest.php index 7151ca97f8..c18de2fc9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -183,7 +183,7 @@ class FHIRImagingManifest extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type ImagingManifest * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_STUDY => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -577,11 +577,226 @@ public function setStudy(array $study = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthoringTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORING_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStudy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STUDY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORING_TIME])) { + $v = $this->getAuthoringTime(); + foreach($validationRules[self::FIELD_AUTHORING_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST, self::FIELD_AUTHORING_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORING_TIME])) { + $errs[self::FIELD_AUTHORING_TIME] = []; + } + $errs[self::FIELD_AUTHORING_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY])) { + $v = $this->getStudy(); + foreach($validationRules[self::FIELD_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_MANIFEST, self::FIELD_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY])) { + $errs[self::FIELD_STUDY] = []; + } + $errs[self::FIELD_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php index 1ce9b5e16c..5480beac07 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -356,7 +356,7 @@ class FHIRImagingStudy extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type ImagingStudy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImagingStudy Constructor @@ -1593,11 +1593,461 @@ public function setUid($uid = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccession())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailability())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInterpreter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INTERPRETER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getModalityList())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODALITY_LIST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNumberOfInstances())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = $fieldErrs; + } + } + if (null !== ($v = $this->getNumberOfSeries())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUMBER_OF_SERIES] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcedureCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProcedureReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCEDURE_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferrer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSeries())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERIES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStarted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STARTED] = $fieldErrs; + } + } + if (null !== ($v = $this->getUid())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_UID] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCESSION])) { + $v = $this->getAccession(); + foreach($validationRules[self::FIELD_ACCESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_ACCESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCESSION])) { + $errs[self::FIELD_ACCESSION] = []; + } + $errs[self::FIELD_ACCESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY])) { + $v = $this->getAvailability(); + foreach($validationRules[self::FIELD_AVAILABILITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_AVAILABILITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY])) { + $errs[self::FIELD_AVAILABILITY] = []; + } + $errs[self::FIELD_AVAILABILITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERPRETER])) { + $v = $this->getInterpreter(); + foreach($validationRules[self::FIELD_INTERPRETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_INTERPRETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERPRETER])) { + $errs[self::FIELD_INTERPRETER] = []; + } + $errs[self::FIELD_INTERPRETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODALITY_LIST])) { + $v = $this->getModalityList(); + foreach($validationRules[self::FIELD_MODALITY_LIST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_MODALITY_LIST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODALITY_LIST])) { + $errs[self::FIELD_MODALITY_LIST] = []; + } + $errs[self::FIELD_MODALITY_LIST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_INSTANCES])) { + $v = $this->getNumberOfInstances(); + foreach($validationRules[self::FIELD_NUMBER_OF_INSTANCES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_NUMBER_OF_INSTANCES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_INSTANCES])) { + $errs[self::FIELD_NUMBER_OF_INSTANCES] = []; + } + $errs[self::FIELD_NUMBER_OF_INSTANCES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NUMBER_OF_SERIES])) { + $v = $this->getNumberOfSeries(); + foreach($validationRules[self::FIELD_NUMBER_OF_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_NUMBER_OF_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NUMBER_OF_SERIES])) { + $errs[self::FIELD_NUMBER_OF_SERIES] = []; + } + $errs[self::FIELD_NUMBER_OF_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_CODE])) { + $v = $this->getProcedureCode(); + foreach($validationRules[self::FIELD_PROCEDURE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_PROCEDURE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_CODE])) { + $errs[self::FIELD_PROCEDURE_CODE] = []; + } + $errs[self::FIELD_PROCEDURE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCEDURE_REFERENCE])) { + $v = $this->getProcedureReference(); + foreach($validationRules[self::FIELD_PROCEDURE_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_PROCEDURE_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCEDURE_REFERENCE])) { + $errs[self::FIELD_PROCEDURE_REFERENCE] = []; + } + $errs[self::FIELD_PROCEDURE_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERRER])) { + $v = $this->getReferrer(); + foreach($validationRules[self::FIELD_REFERRER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_REFERRER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERRER])) { + $errs[self::FIELD_REFERRER] = []; + } + $errs[self::FIELD_REFERRER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERIES])) { + $v = $this->getSeries(); + foreach($validationRules[self::FIELD_SERIES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_SERIES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERIES])) { + $errs[self::FIELD_SERIES] = []; + } + $errs[self::FIELD_SERIES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STARTED])) { + $v = $this->getStarted(); + foreach($validationRules[self::FIELD_STARTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_STARTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STARTED])) { + $errs[self::FIELD_STARTED] = []; + } + $errs[self::FIELD_STARTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UID])) { + $v = $this->getUid(); + foreach($validationRules[self::FIELD_UID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY, self::FIELD_UID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UID])) { + $errs[self::FIELD_UID] = []; + } + $errs[self::FIELD_UID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunization.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunization.php index bbcc69d4de..f4d2118f43 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunization.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -375,7 +375,7 @@ class FHIRImmunization extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Immunization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImmunization Constructor @@ -1556,11 +1556,489 @@ public function setVaccineCode(FHIRCodeableConcept $vaccineCode = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDoseQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpirationDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPIRATION_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExplanation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPLANATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getLotNumber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOT_NUMBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotGiven())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_GIVEN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPractitioner())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PRACTITIONER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrimarySource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIMARY_SOURCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReaction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReportOrigin())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORT_ORIGIN] = $fieldErrs; + } + } + if (null !== ($v = $this->getRoute())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ROUTE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVaccinationProtocol())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VACCINATION_PROTOCOL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVaccineCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VACCINE_CODE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSE_QUANTITY])) { + $v = $this->getDoseQuantity(); + foreach($validationRules[self::FIELD_DOSE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_DOSE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSE_QUANTITY])) { + $errs[self::FIELD_DOSE_QUANTITY] = []; + } + $errs[self::FIELD_DOSE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPIRATION_DATE])) { + $v = $this->getExpirationDate(); + foreach($validationRules[self::FIELD_EXPIRATION_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_EXPIRATION_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPIRATION_DATE])) { + $errs[self::FIELD_EXPIRATION_DATE] = []; + } + $errs[self::FIELD_EXPIRATION_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPLANATION])) { + $v = $this->getExplanation(); + foreach($validationRules[self::FIELD_EXPLANATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_EXPLANATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPLANATION])) { + $errs[self::FIELD_EXPLANATION] = []; + } + $errs[self::FIELD_EXPLANATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOT_NUMBER])) { + $v = $this->getLotNumber(); + foreach($validationRules[self::FIELD_LOT_NUMBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_LOT_NUMBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOT_NUMBER])) { + $errs[self::FIELD_LOT_NUMBER] = []; + } + $errs[self::FIELD_LOT_NUMBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_GIVEN])) { + $v = $this->getNotGiven(); + foreach($validationRules[self::FIELD_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_GIVEN])) { + $errs[self::FIELD_NOT_GIVEN] = []; + } + $errs[self::FIELD_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRACTITIONER])) { + $v = $this->getPractitioner(); + foreach($validationRules[self::FIELD_PRACTITIONER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PRACTITIONER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRACTITIONER])) { + $errs[self::FIELD_PRACTITIONER] = []; + } + $errs[self::FIELD_PRACTITIONER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIMARY_SOURCE])) { + $v = $this->getPrimarySource(); + foreach($validationRules[self::FIELD_PRIMARY_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_PRIMARY_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIMARY_SOURCE])) { + $errs[self::FIELD_PRIMARY_SOURCE] = []; + } + $errs[self::FIELD_PRIMARY_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REACTION])) { + $v = $this->getReaction(); + foreach($validationRules[self::FIELD_REACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REACTION])) { + $errs[self::FIELD_REACTION] = []; + } + $errs[self::FIELD_REACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORT_ORIGIN])) { + $v = $this->getReportOrigin(); + foreach($validationRules[self::FIELD_REPORT_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_REPORT_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORT_ORIGIN])) { + $errs[self::FIELD_REPORT_ORIGIN] = []; + } + $errs[self::FIELD_REPORT_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ROUTE])) { + $v = $this->getRoute(); + foreach($validationRules[self::FIELD_ROUTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_ROUTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ROUTE])) { + $errs[self::FIELD_ROUTE] = []; + } + $errs[self::FIELD_ROUTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINATION_PROTOCOL])) { + $v = $this->getVaccinationProtocol(); + foreach($validationRules[self::FIELD_VACCINATION_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_VACCINATION_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINATION_PROTOCOL])) { + $errs[self::FIELD_VACCINATION_PROTOCOL] = []; + } + $errs[self::FIELD_VACCINATION_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VACCINE_CODE])) { + $v = $this->getVaccineCode(); + foreach($validationRules[self::FIELD_VACCINE_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION, self::FIELD_VACCINE_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VACCINE_CODE])) { + $errs[self::FIELD_VACCINE_CODE] = []; + } + $errs[self::FIELD_VACCINE_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php index 8771001e51..3d26d2bc57 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -127,7 +127,7 @@ class FHIRImmunizationRecommendation extends FHIRDomainResource implements PHPFH * Validation map for fields in type ImmunizationRecommendation * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_RECOMMENDATION => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -365,11 +365,177 @@ public function setRecommendation(array $recommendation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRecommendation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECOMMENDATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECOMMENDATION])) { + $v = $this->getRecommendation(); + foreach($validationRules[self::FIELD_RECOMMENDATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_RECOMMENDATION, self::FIELD_RECOMMENDATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECOMMENDATION])) { + $errs[self::FIELD_RECOMMENDATION] = []; + } + $errs[self::FIELD_RECOMMENDATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php index 6d561f6bef..24f2926004 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -380,7 +380,7 @@ class FHIRImplementationGuide extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type ImplementationGuide * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRImplementationGuide Constructor @@ -1727,11 +1727,442 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBinary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BINARY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDependency())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEPENDENCY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFhirVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FHIR_VERSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGlobal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GLOBAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPackage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PACKAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BINARY])) { + $v = $this->getBinary(); + foreach($validationRules[self::FIELD_BINARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_BINARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BINARY])) { + $errs[self::FIELD_BINARY] = []; + } + $errs[self::FIELD_BINARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEPENDENCY])) { + $v = $this->getDependency(); + foreach($validationRules[self::FIELD_DEPENDENCY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_DEPENDENCY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEPENDENCY])) { + $errs[self::FIELD_DEPENDENCY] = []; + } + $errs[self::FIELD_DEPENDENCY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GLOBAL])) { + $v = $this->getGlobal(); + foreach($validationRules[self::FIELD_GLOBAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_GLOBAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GLOBAL])) { + $errs[self::FIELD_GLOBAL] = []; + } + $errs[self::FIELD_GLOBAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE])) { + $v = $this->getPackage(); + foreach($validationRules[self::FIELD_PACKAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_PACKAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE])) { + $errs[self::FIELD_PACKAGE] = []; + } + $errs[self::FIELD_PACKAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAGE])) { + $v = $this->getPage(); + foreach($validationRules[self::FIELD_PAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_PAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAGE])) { + $errs[self::FIELD_PAGE] = []; + } + $errs[self::FIELD_PAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_IMPLEMENTATION_GUIDE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLibrary.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLibrary.php index 220b969e31..27d07c6fbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLibrary.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLibrary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -504,7 +504,7 @@ class FHIRLibrary extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Library * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLibrary Constructor @@ -2380,11 +2380,584 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContributor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRIBUTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDataRequirement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA_REQUIREMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRIBUTOR])) { + $v = $this->getContributor(); + foreach($validationRules[self::FIELD_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRIBUTOR])) { + $errs[self::FIELD_CONTRIBUTOR] = []; + } + $errs[self::FIELD_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_REQUIREMENT])) { + $v = $this->getDataRequirement(); + foreach($validationRules[self::FIELD_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_REQUIREMENT])) { + $errs[self::FIELD_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIBRARY, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLinkage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLinkage.php index cb66b8c236..c7f0fd4f1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLinkage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLinkage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRLinkage extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Linkage * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ITEM => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -356,11 +356,175 @@ public function setItem(array $item = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LINKAGE, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRList.php index eab8310fc6..aec9d35624 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -264,7 +264,7 @@ class FHIRList extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type List * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRList Constructor @@ -1003,11 +1003,349 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEmptyReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EMPTY_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEntry())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTRY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrderedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_BY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EMPTY_REASON])) { + $v = $this->getEmptyReason(); + foreach($validationRules[self::FIELD_EMPTY_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_EMPTY_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EMPTY_REASON])) { + $errs[self::FIELD_EMPTY_REASON] = []; + } + $errs[self::FIELD_EMPTY_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTRY])) { + $v = $this->getEntry(); + foreach($validationRules[self::FIELD_ENTRY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ENTRY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTRY])) { + $errs[self::FIELD_ENTRY] = []; + } + $errs[self::FIELD_ENTRY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_BY])) { + $v = $this->getOrderedBy(); + foreach($validationRules[self::FIELD_ORDERED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_ORDERED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_BY])) { + $errs[self::FIELD_ORDERED_BY] = []; + } + $errs[self::FIELD_ORDERED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LIST, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLocation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLocation.php index 92c006cc77..ac1c2d7ae1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -299,7 +299,7 @@ class FHIRLocation extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Location * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRLocation Constructor @@ -1195,11 +1195,385 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAddress())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADDRESS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAlias())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALIAS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATIONAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if (null !== ($v = $this->getPhysicalType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHYSICAL_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPosition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_POSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODE])) { + $v = $this->getMode(); + foreach($validationRules[self::FIELD_MODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_MODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODE])) { + $errs[self::FIELD_MODE] = []; + } + $errs[self::FIELD_MODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATIONAL_STATUS])) { + $v = $this->getOperationalStatus(); + foreach($validationRules[self::FIELD_OPERATIONAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_OPERATIONAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATIONAL_STATUS])) { + $errs[self::FIELD_OPERATIONAL_STATUS] = []; + } + $errs[self::FIELD_OPERATIONAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHYSICAL_TYPE])) { + $v = $this->getPhysicalType(); + foreach($validationRules[self::FIELD_PHYSICAL_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_PHYSICAL_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHYSICAL_TYPE])) { + $errs[self::FIELD_PHYSICAL_TYPE] = []; + } + $errs[self::FIELD_PHYSICAL_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POSITION])) { + $v = $this->getPosition(); + foreach($validationRules[self::FIELD_POSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_POSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POSITION])) { + $errs[self::FIELD_POSITION] = []; + } + $errs[self::FIELD_POSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_LOCATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasure.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasure.php index 2c5f970cb0..cabc00fc46 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasure.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -679,7 +679,7 @@ class FHIRMeasure extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Measure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasure Constructor @@ -3330,11 +3330,775 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getClinicalRecommendationStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompositeScoring())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSITE_SCORING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContributor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRIBUTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisclaimer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISCLAIMER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGuidance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GUIDANCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getImprovementNotation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPROVEMENT_NOTATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLibrary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIBRARY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRateAggregation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATE_AGGREGATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRationale())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RATIONALE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRiskAdjustment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RISK_ADJUSTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getScoring())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCORING] = $fieldErrs; + } + } + if (null !== ($v = $this->getSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SET] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupplementalData())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPLEMENTAL_DATA, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { + $v = $this->getClinicalRecommendationStatement(); + foreach($validationRules[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { + $errs[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT] = []; + } + $errs[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPOSITE_SCORING])) { + $v = $this->getCompositeScoring(); + foreach($validationRules[self::FIELD_COMPOSITE_SCORING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_COMPOSITE_SCORING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPOSITE_SCORING])) { + $errs[self::FIELD_COMPOSITE_SCORING] = []; + } + $errs[self::FIELD_COMPOSITE_SCORING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRIBUTOR])) { + $v = $this->getContributor(); + foreach($validationRules[self::FIELD_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRIBUTOR])) { + $errs[self::FIELD_CONTRIBUTOR] = []; + } + $errs[self::FIELD_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISCLAIMER])) { + $v = $this->getDisclaimer(); + foreach($validationRules[self::FIELD_DISCLAIMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_DISCLAIMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISCLAIMER])) { + $errs[self::FIELD_DISCLAIMER] = []; + } + $errs[self::FIELD_DISCLAIMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GUIDANCE])) { + $v = $this->getGuidance(); + foreach($validationRules[self::FIELD_GUIDANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_GUIDANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GUIDANCE])) { + $errs[self::FIELD_GUIDANCE] = []; + } + $errs[self::FIELD_GUIDANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPROVEMENT_NOTATION])) { + $v = $this->getImprovementNotation(); + foreach($validationRules[self::FIELD_IMPROVEMENT_NOTATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_IMPROVEMENT_NOTATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPROVEMENT_NOTATION])) { + $errs[self::FIELD_IMPROVEMENT_NOTATION] = []; + } + $errs[self::FIELD_IMPROVEMENT_NOTATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIBRARY])) { + $v = $this->getLibrary(); + foreach($validationRules[self::FIELD_LIBRARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_LIBRARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIBRARY])) { + $errs[self::FIELD_LIBRARY] = []; + } + $errs[self::FIELD_LIBRARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATE_AGGREGATION])) { + $v = $this->getRateAggregation(); + foreach($validationRules[self::FIELD_RATE_AGGREGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_RATE_AGGREGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATE_AGGREGATION])) { + $errs[self::FIELD_RATE_AGGREGATION] = []; + } + $errs[self::FIELD_RATE_AGGREGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RATIONALE])) { + $v = $this->getRationale(); + foreach($validationRules[self::FIELD_RATIONALE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_RATIONALE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RATIONALE])) { + $errs[self::FIELD_RATIONALE] = []; + } + $errs[self::FIELD_RATIONALE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RISK_ADJUSTMENT])) { + $v = $this->getRiskAdjustment(); + foreach($validationRules[self::FIELD_RISK_ADJUSTMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_RISK_ADJUSTMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RISK_ADJUSTMENT])) { + $errs[self::FIELD_RISK_ADJUSTMENT] = []; + } + $errs[self::FIELD_RISK_ADJUSTMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORING])) { + $v = $this->getScoring(); + foreach($validationRules[self::FIELD_SCORING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_SCORING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORING])) { + $errs[self::FIELD_SCORING] = []; + } + $errs[self::FIELD_SCORING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SET])) { + $v = $this->getSet(); + foreach($validationRules[self::FIELD_SET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_SET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SET])) { + $errs[self::FIELD_SET] = []; + } + $errs[self::FIELD_SET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLEMENTAL_DATA])) { + $v = $this->getSupplementalData(); + foreach($validationRules[self::FIELD_SUPPLEMENTAL_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_SUPPLEMENTAL_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLEMENTAL_DATA])) { + $errs[self::FIELD_SUPPLEMENTAL_DATA] = []; + } + $errs[self::FIELD_SUPPLEMENTAL_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php index bb931fbd66..6a7756f2ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -223,7 +223,7 @@ class FHIRMeasureReport extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type MeasureReport * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMeasureReport Constructor @@ -747,11 +747,294 @@ public function setType(FHIRMeasureReportType $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEvaluatedResources())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVALUATED_RESOURCES] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getReportingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPORTING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVALUATED_RESOURCES])) { + $v = $this->getEvaluatedResources(); + foreach($validationRules[self::FIELD_EVALUATED_RESOURCES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_EVALUATED_RESOURCES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVALUATED_RESOURCES])) { + $errs[self::FIELD_EVALUATED_RESOURCES] = []; + } + $errs[self::FIELD_EVALUATED_RESOURCES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEASURE])) { + $v = $this->getMeasure(); + foreach($validationRules[self::FIELD_MEASURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_MEASURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEASURE])) { + $errs[self::FIELD_MEASURE] = []; + } + $errs[self::FIELD_MEASURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORTING_ORGANIZATION])) { + $v = $this->getReportingOrganization(); + foreach($validationRules[self::FIELD_REPORTING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_REPORTING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORTING_ORGANIZATION])) { + $errs[self::FIELD_REPORTING_ORGANIZATION] = []; + } + $errs[self::FIELD_REPORTING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedia.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedia.php index 44776e5e12..5480149032 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedia.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedia.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -349,7 +349,7 @@ class FHIRMedia extends FHIRDomainResource implements PHPFHIRContainedTypeInterf * Validation map for fields in type Media * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedia Constructor @@ -1425,11 +1425,453 @@ public function setWidth($width = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDuration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DURATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getFrames())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FRAMES] = $fieldErrs; + } + } + if (null !== ($v = $this->getHeight())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEIGHT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubtype())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBTYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getView())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VIEW] = $fieldErrs; + } + } + if (null !== ($v = $this->getWidth())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WIDTH] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTENT])) { + $v = $this->getContent(); + foreach($validationRules[self::FIELD_CONTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_CONTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTENT])) { + $errs[self::FIELD_CONTENT] = []; + } + $errs[self::FIELD_CONTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DURATION])) { + $v = $this->getDuration(); + foreach($validationRules[self::FIELD_DURATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_DURATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DURATION])) { + $errs[self::FIELD_DURATION] = []; + } + $errs[self::FIELD_DURATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FRAMES])) { + $v = $this->getFrames(); + foreach($validationRules[self::FIELD_FRAMES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_FRAMES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FRAMES])) { + $errs[self::FIELD_FRAMES] = []; + } + $errs[self::FIELD_FRAMES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEIGHT])) { + $v = $this->getHeight(); + foreach($validationRules[self::FIELD_HEIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_HEIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEIGHT])) { + $errs[self::FIELD_HEIGHT] = []; + } + $errs[self::FIELD_HEIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATOR])) { + $v = $this->getOperator(); + foreach($validationRules[self::FIELD_OPERATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_OPERATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATOR])) { + $errs[self::FIELD_OPERATOR] = []; + } + $errs[self::FIELD_OPERATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBTYPE])) { + $v = $this->getSubtype(); + foreach($validationRules[self::FIELD_SUBTYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_SUBTYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBTYPE])) { + $errs[self::FIELD_SUBTYPE] = []; + } + $errs[self::FIELD_SUBTYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VIEW])) { + $v = $this->getView(); + foreach($validationRules[self::FIELD_VIEW] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_VIEW, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VIEW])) { + $errs[self::FIELD_VIEW] = []; + } + $errs[self::FIELD_VIEW][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WIDTH])) { + $v = $this->getWidth(); + foreach($validationRules[self::FIELD_WIDTH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDIA, self::FIELD_WIDTH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WIDTH])) { + $errs[self::FIELD_WIDTH] = []; + } + $errs[self::FIELD_WIDTH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedication.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedication.php index d3213f2144..216350b45d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedication.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -207,7 +207,7 @@ class FHIRMedication extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type Medication * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedication Constructor @@ -730,11 +730,279 @@ public function setStatus(FHIRMedicationStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getImage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMAGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIsBrand())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_BRAND] = $fieldErrs; + } + } + if (null !== ($v = $this->getIsOverTheCounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IS_OVER_THE_COUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getManufacturer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANUFACTURER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPackage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PACKAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMAGE])) { + $v = $this->getImage(); + foreach($validationRules[self::FIELD_IMAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_IMAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMAGE])) { + $errs[self::FIELD_IMAGE] = []; + } + $errs[self::FIELD_IMAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_BRAND])) { + $v = $this->getIsBrand(); + foreach($validationRules[self::FIELD_IS_BRAND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_IS_BRAND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_BRAND])) { + $errs[self::FIELD_IS_BRAND] = []; + } + $errs[self::FIELD_IS_BRAND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IS_OVER_THE_COUNTER])) { + $v = $this->getIsOverTheCounter(); + foreach($validationRules[self::FIELD_IS_OVER_THE_COUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_IS_OVER_THE_COUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IS_OVER_THE_COUNTER])) { + $errs[self::FIELD_IS_OVER_THE_COUNTER] = []; + } + $errs[self::FIELD_IS_OVER_THE_COUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANUFACTURER])) { + $v = $this->getManufacturer(); + foreach($validationRules[self::FIELD_MANUFACTURER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_MANUFACTURER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANUFACTURER])) { + $errs[self::FIELD_MANUFACTURER] = []; + } + $errs[self::FIELD_MANUFACTURER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PACKAGE])) { + $v = $this->getPackage(); + foreach($validationRules[self::FIELD_PACKAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_PACKAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PACKAGE])) { + $errs[self::FIELD_PACKAGE] = []; + } + $errs[self::FIELD_PACKAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php index e00a8cd643..5de42f3afd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -405,7 +405,7 @@ class FHIRMedicationAdministration extends FHIRDomainResource implements PHPFHIR * Validation map for fields in type MedicationAdministration * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationAdministration Constructor @@ -1831,11 +1831,518 @@ public function setSupportingInformation(array $supportingInformation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEVICE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDosage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOSAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEventHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotGiven())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_GIVEN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonNotGiven())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_NOT_GIVEN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_HISTORY])) { + $v = $this->getEventHistory(); + foreach($validationRules[self::FIELD_EVENT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_EVENT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_HISTORY])) { + $errs[self::FIELD_EVENT_HISTORY] = []; + } + $errs[self::FIELD_EVENT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_GIVEN])) { + $v = $this->getNotGiven(); + foreach($validationRules[self::FIELD_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_GIVEN])) { + $errs[self::FIELD_NOT_GIVEN] = []; + } + $errs[self::FIELD_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIPTION])) { + $v = $this->getPrescription(); + foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIPTION])) { + $errs[self::FIELD_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_NOT_GIVEN])) { + $v = $this->getReasonNotGiven(); + foreach($validationRules[self::FIELD_REASON_NOT_GIVEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_REASON_NOT_GIVEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_NOT_GIVEN])) { + $errs[self::FIELD_REASON_NOT_GIVEN] = []; + } + $errs[self::FIELD_REASON_NOT_GIVEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php index aaf9ddd007..f04cc7c52f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -452,7 +452,7 @@ class FHIRMedicationDispense extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type MedicationDispense * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationDispense Constructor @@ -2003,11 +2003,584 @@ public function setWhenPrepared($whenPrepared = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAuthorizingPrescription())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AUTHORIZING_PRESCRIPTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDaysSupply())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DAYS_SUPPLY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetectedIssue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETECTED_ISSUE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDosageInstruction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE_INSTRUCTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEventHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotDone())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_DONE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotDoneReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_DONE_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotDoneReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_DONE_REASON_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReceiver())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECEIVER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstitution())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTITUTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenHandedOver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_HANDED_OVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getWhenPrepared())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_WHEN_PREPARED] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORIZING_PRESCRIPTION])) { + $v = $this->getAuthorizingPrescription(); + foreach($validationRules[self::FIELD_AUTHORIZING_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_AUTHORIZING_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORIZING_PRESCRIPTION])) { + $errs[self::FIELD_AUTHORIZING_PRESCRIPTION] = []; + } + $errs[self::FIELD_AUTHORIZING_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DAYS_SUPPLY])) { + $v = $this->getDaysSupply(); + foreach($validationRules[self::FIELD_DAYS_SUPPLY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DAYS_SUPPLY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DAYS_SUPPLY])) { + $errs[self::FIELD_DAYS_SUPPLY] = []; + } + $errs[self::FIELD_DAYS_SUPPLY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETECTED_ISSUE])) { + $v = $this->getDetectedIssue(); + foreach($validationRules[self::FIELD_DETECTED_ISSUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DETECTED_ISSUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETECTED_ISSUE])) { + $errs[self::FIELD_DETECTED_ISSUE] = []; + } + $errs[self::FIELD_DETECTED_ISSUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE_INSTRUCTION])) { + $v = $this->getDosageInstruction(); + foreach($validationRules[self::FIELD_DOSAGE_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_DOSAGE_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE_INSTRUCTION])) { + $errs[self::FIELD_DOSAGE_INSTRUCTION] = []; + } + $errs[self::FIELD_DOSAGE_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_HISTORY])) { + $v = $this->getEventHistory(); + foreach($validationRules[self::FIELD_EVENT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_EVENT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_HISTORY])) { + $errs[self::FIELD_EVENT_HISTORY] = []; + } + $errs[self::FIELD_EVENT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_DONE])) { + $v = $this->getNotDone(); + foreach($validationRules[self::FIELD_NOT_DONE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_NOT_DONE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_DONE])) { + $errs[self::FIELD_NOT_DONE] = []; + } + $errs[self::FIELD_NOT_DONE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_DONE_REASON_CODEABLE_CONCEPT])) { + $v = $this->getNotDoneReasonCodeableConcept(); + foreach($validationRules[self::FIELD_NOT_DONE_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_NOT_DONE_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_DONE_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_NOT_DONE_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_NOT_DONE_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_DONE_REASON_REFERENCE])) { + $v = $this->getNotDoneReasonReference(); + foreach($validationRules[self::FIELD_NOT_DONE_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_NOT_DONE_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_DONE_REASON_REFERENCE])) { + $errs[self::FIELD_NOT_DONE_REASON_REFERENCE] = []; + } + $errs[self::FIELD_NOT_DONE_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTITUTION])) { + $v = $this->getSubstitution(); + foreach($validationRules[self::FIELD_SUBSTITUTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_SUBSTITUTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTITUTION])) { + $errs[self::FIELD_SUBSTITUTION] = []; + } + $errs[self::FIELD_SUBSTITUTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_HANDED_OVER])) { + $v = $this->getWhenHandedOver(); + foreach($validationRules[self::FIELD_WHEN_HANDED_OVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_WHEN_HANDED_OVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_HANDED_OVER])) { + $errs[self::FIELD_WHEN_HANDED_OVER] = []; + } + $errs[self::FIELD_WHEN_HANDED_OVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_WHEN_PREPARED])) { + $v = $this->getWhenPrepared(); + foreach($validationRules[self::FIELD_WHEN_PREPARED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE, self::FIELD_WHEN_PREPARED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_WHEN_PREPARED])) { + $errs[self::FIELD_WHEN_PREPARED] = []; + } + $errs[self::FIELD_WHEN_PREPARED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php index 2ea0418c75..e2d17790b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -455,7 +455,7 @@ class FHIRMedicationRequest extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type MedicationRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationRequest Constructor @@ -1984,11 +1984,567 @@ public function setSupportingInformation(array $supportingInformation = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDetectedIssue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETECTED_ISSUE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDispenseRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPENSE_REQUEST] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDosageInstruction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE_INSTRUCTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEventHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EVENT_HISTORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriorPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIOR_PRESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstitution())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTITUTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInformation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFORMATION, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETECTED_ISSUE])) { + $v = $this->getDetectedIssue(); + foreach($validationRules[self::FIELD_DETECTED_ISSUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_DETECTED_ISSUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETECTED_ISSUE])) { + $errs[self::FIELD_DETECTED_ISSUE] = []; + } + $errs[self::FIELD_DETECTED_ISSUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPENSE_REQUEST])) { + $v = $this->getDispenseRequest(); + foreach($validationRules[self::FIELD_DISPENSE_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_DISPENSE_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSE_REQUEST])) { + $errs[self::FIELD_DISPENSE_REQUEST] = []; + } + $errs[self::FIELD_DISPENSE_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE_INSTRUCTION])) { + $v = $this->getDosageInstruction(); + foreach($validationRules[self::FIELD_DOSAGE_INSTRUCTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_DOSAGE_INSTRUCTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE_INSTRUCTION])) { + $errs[self::FIELD_DOSAGE_INSTRUCTION] = []; + } + $errs[self::FIELD_DOSAGE_INSTRUCTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT_HISTORY])) { + $v = $this->getEventHistory(); + foreach($validationRules[self::FIELD_EVENT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_EVENT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT_HISTORY])) { + $errs[self::FIELD_EVENT_HISTORY] = []; + } + $errs[self::FIELD_EVENT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIOR_PRESCRIPTION])) { + $v = $this->getPriorPrescription(); + foreach($validationRules[self::FIELD_PRIOR_PRESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_PRIOR_PRESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIOR_PRESCRIPTION])) { + $errs[self::FIELD_PRIOR_PRESCRIPTION] = []; + } + $errs[self::FIELD_PRIOR_PRESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDER])) { + $v = $this->getRecorder(); + foreach($validationRules[self::FIELD_RECORDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_RECORDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDER])) { + $errs[self::FIELD_RECORDER] = []; + } + $errs[self::FIELD_RECORDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBSTITUTION])) { + $v = $this->getSubstitution(); + foreach($validationRules[self::FIELD_SUBSTITUTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_SUBSTITUTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBSTITUTION])) { + $errs[self::FIELD_SUBSTITUTION] = []; + } + $errs[self::FIELD_SUBSTITUTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFORMATION])) { + $v = $this->getSupportingInformation(); + foreach($validationRules[self::FIELD_SUPPORTING_INFORMATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST, self::FIELD_SUPPORTING_INFORMATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFORMATION])) { + $errs[self::FIELD_SUPPORTING_INFORMATION] = []; + } + $errs[self::FIELD_SUPPORTING_INFORMATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php index 7410a38221..c9d8b33954 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -388,7 +388,7 @@ class FHIRMedicationStatement extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type MedicationStatement * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMedicationStatement Constructor @@ -1661,11 +1661,480 @@ public function setTaken(FHIRMedicationStatementTaken $taken = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDateAsserted())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_ASSERTED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDerivedFrom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DERIVED_FROM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getDosage())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DOSAGE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInformationSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INFORMATION_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonNotTaken())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_NOT_TAKEN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTaken())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TAKEN] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_ASSERTED])) { + $v = $this->getDateAsserted(); + foreach($validationRules[self::FIELD_DATE_ASSERTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_DATE_ASSERTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_ASSERTED])) { + $errs[self::FIELD_DATE_ASSERTED] = []; + } + $errs[self::FIELD_DATE_ASSERTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DERIVED_FROM])) { + $v = $this->getDerivedFrom(); + foreach($validationRules[self::FIELD_DERIVED_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_DERIVED_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DERIVED_FROM])) { + $errs[self::FIELD_DERIVED_FROM] = []; + } + $errs[self::FIELD_DERIVED_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DOSAGE])) { + $v = $this->getDosage(); + foreach($validationRules[self::FIELD_DOSAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_DOSAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DOSAGE])) { + $errs[self::FIELD_DOSAGE] = []; + } + $errs[self::FIELD_DOSAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INFORMATION_SOURCE])) { + $v = $this->getInformationSource(); + foreach($validationRules[self::FIELD_INFORMATION_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_INFORMATION_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INFORMATION_SOURCE])) { + $errs[self::FIELD_INFORMATION_SOURCE] = []; + } + $errs[self::FIELD_INFORMATION_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $v = $this->getMedicationCodeableConcept(); + foreach($validationRules[self::FIELD_MEDICATION_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_MEDICATION_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_MEDICATION_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MEDICATION_REFERENCE])) { + $v = $this->getMedicationReference(); + foreach($validationRules[self::FIELD_MEDICATION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_MEDICATION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MEDICATION_REFERENCE])) { + $errs[self::FIELD_MEDICATION_REFERENCE] = []; + } + $errs[self::FIELD_MEDICATION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_NOT_TAKEN])) { + $v = $this->getReasonNotTaken(); + foreach($validationRules[self::FIELD_REASON_NOT_TAKEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_REASON_NOT_TAKEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_NOT_TAKEN])) { + $errs[self::FIELD_REASON_NOT_TAKEN] = []; + } + $errs[self::FIELD_REASON_NOT_TAKEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TAKEN])) { + $v = $this->getTaken(); + foreach($validationRules[self::FIELD_TAKEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT, self::FIELD_TAKEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TAKEN])) { + $errs[self::FIELD_TAKEN] = []; + } + $errs[self::FIELD_TAKEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php index 24a62bfc6f..bf7970a007 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -445,7 +445,7 @@ class FHIRMessageDefinition extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type MessageDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageDefinition Constructor @@ -2018,11 +2018,527 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAllowedResponse())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALLOWED_RESPONSE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFocus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOCUS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getResponseRequired())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE_REQUIRED] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ALLOWED_RESPONSE])) { + $v = $this->getAllowedResponse(); + foreach($validationRules[self::FIELD_ALLOWED_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_ALLOWED_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLOWED_RESPONSE])) { + $errs[self::FIELD_ALLOWED_RESPONSE] = []; + } + $errs[self::FIELD_ALLOWED_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE_REQUIRED])) { + $v = $this->getResponseRequired(); + foreach($validationRules[self::FIELD_RESPONSE_REQUIRED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_RESPONSE_REQUIRED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE_REQUIRED])) { + $errs[self::FIELD_RESPONSE_REQUIRED] = []; + } + $errs[self::FIELD_RESPONSE_REQUIRED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php index 734cb8cb26..38dfcdc785 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -259,7 +259,7 @@ class FHIRMessageHeader extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type MessageHeader * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRMessageHeader Constructor @@ -888,11 +888,330 @@ public function setTimestamp($timestamp = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDestination())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESTINATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEnterer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EVENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFocus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOCUS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getReceiver())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVER] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SENDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTimestamp())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TIMESTAMP] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERER])) { + $v = $this->getEnterer(); + foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_ENTERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERER])) { + $errs[self::FIELD_ENTERER] = []; + } + $errs[self::FIELD_ENTERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EVENT])) { + $v = $this->getEvent(); + foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_EVENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EVENT])) { + $errs[self::FIELD_EVENT] = []; + } + $errs[self::FIELD_EVENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SENDER])) { + $v = $this->getSender(); + foreach($validationRules[self::FIELD_SENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_SENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SENDER])) { + $errs[self::FIELD_SENDER] = []; + } + $errs[self::FIELD_SENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TIMESTAMP])) { + $v = $this->getTimestamp(); + foreach($validationRules[self::FIELD_TIMESTAMP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MESSAGE_HEADER, self::FIELD_TIMESTAMP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TIMESTAMP])) { + $errs[self::FIELD_TIMESTAMP] = []; + } + $errs[self::FIELD_TIMESTAMP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php index f71a654aeb..002bc6d7d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -302,7 +302,7 @@ class FHIRNamingSystem extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type NamingSystem * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_UNIQUE_ID => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1261,11 +1261,368 @@ public function setUseContext(array $useContext = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReplacedBy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REPLACED_BY] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponsible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSIBLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUniqueId())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_UNIQUE_ID, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACED_BY])) { + $v = $this->getReplacedBy(); + foreach($validationRules[self::FIELD_REPLACED_BY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_REPLACED_BY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACED_BY])) { + $errs[self::FIELD_REPLACED_BY] = []; + } + $errs[self::FIELD_REPLACED_BY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSIBLE])) { + $v = $this->getResponsible(); + foreach($validationRules[self::FIELD_RESPONSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_RESPONSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSIBLE])) { + $errs[self::FIELD_RESPONSIBLE] = []; + } + $errs[self::FIELD_RESPONSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_UNIQUE_ID])) { + $v = $this->getUniqueId(); + foreach($validationRules[self::FIELD_UNIQUE_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_UNIQUE_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_UNIQUE_ID])) { + $errs[self::FIELD_UNIQUE_ID] = []; + } + $errs[self::FIELD_UNIQUE_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php index f53eb49721..9385865280 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -261,7 +261,7 @@ class FHIRNutritionOrder extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type NutritionOrder * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRNutritionOrder Constructor @@ -1034,11 +1034,336 @@ public function setSupplement(array $supplement = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAllergyIntolerance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALLERGY_INTOLERANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnteralFormula())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENTERAL_FORMULA] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExcludeFoodModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCLUDE_FOOD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFoodPreferenceModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOOD_PREFERENCE_MODIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOralDiet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORAL_DIET] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupplement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPLEMENT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ALLERGY_INTOLERANCE])) { + $v = $this->getAllergyIntolerance(); + foreach($validationRules[self::FIELD_ALLERGY_INTOLERANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ALLERGY_INTOLERANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALLERGY_INTOLERANCE])) { + $errs[self::FIELD_ALLERGY_INTOLERANCE] = []; + } + $errs[self::FIELD_ALLERGY_INTOLERANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE_TIME])) { + $v = $this->getDateTime(); + foreach($validationRules[self::FIELD_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_TIME])) { + $errs[self::FIELD_DATE_TIME] = []; + } + $errs[self::FIELD_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTERAL_FORMULA])) { + $v = $this->getEnteralFormula(); + foreach($validationRules[self::FIELD_ENTERAL_FORMULA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ENTERAL_FORMULA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTERAL_FORMULA])) { + $errs[self::FIELD_ENTERAL_FORMULA] = []; + } + $errs[self::FIELD_ENTERAL_FORMULA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE_FOOD_MODIFIER])) { + $v = $this->getExcludeFoodModifier(); + foreach($validationRules[self::FIELD_EXCLUDE_FOOD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_EXCLUDE_FOOD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE_FOOD_MODIFIER])) { + $errs[self::FIELD_EXCLUDE_FOOD_MODIFIER] = []; + } + $errs[self::FIELD_EXCLUDE_FOOD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOOD_PREFERENCE_MODIFIER])) { + $v = $this->getFoodPreferenceModifier(); + foreach($validationRules[self::FIELD_FOOD_PREFERENCE_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_FOOD_PREFERENCE_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOOD_PREFERENCE_MODIFIER])) { + $errs[self::FIELD_FOOD_PREFERENCE_MODIFIER] = []; + } + $errs[self::FIELD_FOOD_PREFERENCE_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORAL_DIET])) { + $v = $this->getOralDiet(); + foreach($validationRules[self::FIELD_ORAL_DIET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ORAL_DIET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORAL_DIET])) { + $errs[self::FIELD_ORAL_DIET] = []; + } + $errs[self::FIELD_ORAL_DIET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERER])) { + $v = $this->getOrderer(); + foreach($validationRules[self::FIELD_ORDERER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_ORDERER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERER])) { + $errs[self::FIELD_ORDERER] = []; + } + $errs[self::FIELD_ORDERER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLEMENT])) { + $v = $this->getSupplement(); + foreach($validationRules[self::FIELD_SUPPLEMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER, self::FIELD_SUPPLEMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLEMENT])) { + $errs[self::FIELD_SUPPLEMENT] = []; + } + $errs[self::FIELD_SUPPLEMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRObservation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRObservation.php index 4aeb8d3205..0fc76b224c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRObservation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRObservation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -548,7 +548,7 @@ class FHIRObservation extends FHIRDomainResource implements PHPFHIRContainedType * Validation map for fields in type Observation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRObservation Constructor @@ -2330,11 +2330,680 @@ public function setValueTime($valueTime = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPONENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataAbsentReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ABSENT_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectiveDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getInterpretation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTERPRETATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReferenceRange())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REFERENCE_RANGE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelated())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecimen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueAttachment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_ATTACHMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getValuePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRange())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RANGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueRatio())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_RATIO] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSampledData())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueString())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_STRING] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_TIME] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPONENT])) { + $v = $this->getComponent(); + foreach($validationRules[self::FIELD_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPONENT])) { + $errs[self::FIELD_COMPONENT] = []; + } + $errs[self::FIELD_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_ABSENT_REASON])) { + $v = $this->getDataAbsentReason(); + foreach($validationRules[self::FIELD_DATA_ABSENT_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_DATA_ABSENT_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_ABSENT_REASON])) { + $errs[self::FIELD_DATA_ABSENT_REASON] = []; + } + $errs[self::FIELD_DATA_ABSENT_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) { + $v = $this->getEffectiveDateTime(); + foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) { + $errs[self::FIELD_EFFECTIVE_DATE_TIME] = []; + } + $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTERPRETATION])) { + $v = $this->getInterpretation(); + foreach($validationRules[self::FIELD_INTERPRETATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_INTERPRETATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTERPRETATION])) { + $errs[self::FIELD_INTERPRETATION] = []; + } + $errs[self::FIELD_INTERPRETATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_RANGE])) { + $v = $this->getReferenceRange(); + foreach($validationRules[self::FIELD_REFERENCE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_REFERENCE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_RANGE])) { + $errs[self::FIELD_REFERENCE_RANGE] = []; + } + $errs[self::FIELD_REFERENCE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED])) { + $v = $this->getRelated(); + foreach($validationRules[self::FIELD_RELATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_RELATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED])) { + $errs[self::FIELD_RELATED] = []; + } + $errs[self::FIELD_RELATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_ATTACHMENT])) { + $v = $this->getValueAttachment(); + foreach($validationRules[self::FIELD_VALUE_ATTACHMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_ATTACHMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_ATTACHMENT])) { + $errs[self::FIELD_VALUE_ATTACHMENT] = []; + } + $errs[self::FIELD_VALUE_ATTACHMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_BOOLEAN])) { + $v = $this->getValueBoolean(); + foreach($validationRules[self::FIELD_VALUE_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_BOOLEAN])) { + $errs[self::FIELD_VALUE_BOOLEAN] = []; + } + $errs[self::FIELD_VALUE_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $v = $this->getValueCodeableConcept(); + foreach($validationRules[self::FIELD_VALUE_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_CODEABLE_CONCEPT])) { + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_VALUE_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_DATE_TIME])) { + $v = $this->getValueDateTime(); + foreach($validationRules[self::FIELD_VALUE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_DATE_TIME])) { + $errs[self::FIELD_VALUE_DATE_TIME] = []; + } + $errs[self::FIELD_VALUE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_PERIOD])) { + $v = $this->getValuePeriod(); + foreach($validationRules[self::FIELD_VALUE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_PERIOD])) { + $errs[self::FIELD_VALUE_PERIOD] = []; + } + $errs[self::FIELD_VALUE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_QUANTITY])) { + $v = $this->getValueQuantity(); + foreach($validationRules[self::FIELD_VALUE_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_QUANTITY])) { + $errs[self::FIELD_VALUE_QUANTITY] = []; + } + $errs[self::FIELD_VALUE_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RANGE])) { + $v = $this->getValueRange(); + foreach($validationRules[self::FIELD_VALUE_RANGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_RANGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RANGE])) { + $errs[self::FIELD_VALUE_RANGE] = []; + } + $errs[self::FIELD_VALUE_RANGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_RATIO])) { + $v = $this->getValueRatio(); + foreach($validationRules[self::FIELD_VALUE_RATIO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_RATIO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_RATIO])) { + $errs[self::FIELD_VALUE_RATIO] = []; + } + $errs[self::FIELD_VALUE_RATIO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_SAMPLED_DATA])) { + $v = $this->getValueSampledData(); + foreach($validationRules[self::FIELD_VALUE_SAMPLED_DATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_SAMPLED_DATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_SAMPLED_DATA])) { + $errs[self::FIELD_VALUE_SAMPLED_DATA] = []; + } + $errs[self::FIELD_VALUE_SAMPLED_DATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_STRING])) { + $v = $this->getValueString(); + foreach($validationRules[self::FIELD_VALUE_STRING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_STRING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_STRING])) { + $errs[self::FIELD_VALUE_STRING] = []; + } + $errs[self::FIELD_VALUE_STRING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VALUE_TIME])) { + $v = $this->getValueTime(); + foreach($validationRules[self::FIELD_VALUE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OBSERVATION, self::FIELD_VALUE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE_TIME])) { + $errs[self::FIELD_VALUE_TIME] = []; + } + $errs[self::FIELD_VALUE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php index 8705e96893..b415f47fe0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -437,7 +437,7 @@ class FHIROperationDefinition extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type OperationDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROperationDefinition Constructor @@ -2038,11 +2038,525 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBase())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdempotent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDEMPOTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getInstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INSTANCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOverload())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OVERLOAD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getResource())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RESOURCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDEMPOTENT])) { + $v = $this->getIdempotent(); + foreach($validationRules[self::FIELD_IDEMPOTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_IDEMPOTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDEMPOTENT])) { + $errs[self::FIELD_IDEMPOTENT] = []; + } + $errs[self::FIELD_IDEMPOTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OVERLOAD])) { + $v = $this->getOverload(); + foreach($validationRules[self::FIELD_OVERLOAD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_OVERLOAD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OVERLOAD])) { + $errs[self::FIELD_OVERLOAD] = []; + } + $errs[self::FIELD_OVERLOAD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESOURCE])) { + $v = $this->getResource(); + foreach($validationRules[self::FIELD_RESOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_RESOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESOURCE])) { + $errs[self::FIELD_RESOURCE] = []; + } + $errs[self::FIELD_RESOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SYSTEM])) { + $v = $this->getSystem(); + foreach($validationRules[self::FIELD_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SYSTEM])) { + $errs[self::FIELD_SYSTEM] = []; + } + $errs[self::FIELD_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php index 5ea884ff1c..a2d6072e55 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIROperationOutcome extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type OperationOutcome * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ISSUE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -223,11 +223,141 @@ public function setIssue(array $issue = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getIssue())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ISSUE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ISSUE])) { + $v = $this->getIssue(); + foreach($validationRules[self::FIELD_ISSUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_OPERATION_OUTCOME, self::FIELD_ISSUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUE])) { + $errs[self::FIELD_ISSUE] = []; + } + $errs[self::FIELD_ISSUE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROrganization.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROrganization.php index eb714d1a90..cc96c5e494 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROrganization.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROrganization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -228,7 +228,7 @@ class FHIROrganization extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Organization * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIROrganization Constructor @@ -1007,11 +1007,306 @@ public function setType(array $type = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getAlias())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ALIAS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPartOf())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PART_OF] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TYPE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ALIAS])) { + $v = $this->getAlias(); + foreach($validationRules[self::FIELD_ALIAS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ALIAS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ALIAS])) { + $errs[self::FIELD_ALIAS] = []; + } + $errs[self::FIELD_ALIAS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ORGANIZATION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPatient.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPatient.php index 39f89753c5..a072330adc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPatient.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPatient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -344,7 +344,7 @@ class FHIRPatient extends FHIRDomainResource implements PHPFHIRContainedTypeInte * Validation map for fields in type Patient * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPatient Constructor @@ -1605,11 +1605,463 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAnimal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ANIMAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCommunication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDeceasedBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeceasedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DECEASED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGeneralPractitioner())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GENERAL_PRACTITIONER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMaritalStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MARITAL_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultipleBirthBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getMultipleBirthInteger())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ANIMAL])) { + $v = $this->getAnimal(); + foreach($validationRules[self::FIELD_ANIMAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_ANIMAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ANIMAL])) { + $errs[self::FIELD_ANIMAL] = []; + } + $errs[self::FIELD_ANIMAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION])) { + $v = $this->getCommunication(); + foreach($validationRules[self::FIELD_COMMUNICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_COMMUNICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION])) { + $errs[self::FIELD_COMMUNICATION] = []; + } + $errs[self::FIELD_COMMUNICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_BOOLEAN])) { + $v = $this->getDeceasedBoolean(); + foreach($validationRules[self::FIELD_DECEASED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_DECEASED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_BOOLEAN])) { + $errs[self::FIELD_DECEASED_BOOLEAN] = []; + } + $errs[self::FIELD_DECEASED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DECEASED_DATE_TIME])) { + $v = $this->getDeceasedDateTime(); + foreach($validationRules[self::FIELD_DECEASED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_DECEASED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DECEASED_DATE_TIME])) { + $errs[self::FIELD_DECEASED_DATE_TIME] = []; + } + $errs[self::FIELD_DECEASED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENERAL_PRACTITIONER])) { + $v = $this->getGeneralPractitioner(); + foreach($validationRules[self::FIELD_GENERAL_PRACTITIONER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_GENERAL_PRACTITIONER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENERAL_PRACTITIONER])) { + $errs[self::FIELD_GENERAL_PRACTITIONER] = []; + } + $errs[self::FIELD_GENERAL_PRACTITIONER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MARITAL_STATUS])) { + $v = $this->getMaritalStatus(); + foreach($validationRules[self::FIELD_MARITAL_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MARITAL_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MARITAL_STATUS])) { + $errs[self::FIELD_MARITAL_STATUS] = []; + } + $errs[self::FIELD_MARITAL_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $v = $this->getMultipleBirthBoolean(); + foreach($validationRules[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MULTIPLE_BIRTH_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = []; + } + $errs[self::FIELD_MULTIPLE_BIRTH_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $v = $this->getMultipleBirthInteger(); + foreach($validationRules[self::FIELD_MULTIPLE_BIRTH_INTEGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_MULTIPLE_BIRTH_INTEGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER] = []; + } + $errs[self::FIELD_MULTIPLE_BIRTH_INTEGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PATIENT, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php index 35d283c140..54c5ef713c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -220,7 +220,7 @@ class FHIRPaymentNotice extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type PaymentNotice * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentNotice Constructor @@ -748,11 +748,294 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PAYMENT_STATUS])) { + $v = $this->getPaymentStatus(); + foreach($validationRules[self::FIELD_PAYMENT_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_PAYMENT_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PAYMENT_STATUS])) { + $errs[self::FIELD_PAYMENT_STATUS] = []; + } + $errs[self::FIELD_PAYMENT_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_DATE])) { + $v = $this->getStatusDate(); + foreach($validationRules[self::FIELD_STATUS_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_STATUS_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_DATE])) { + $errs[self::FIELD_STATUS_DATE] = []; + } + $errs[self::FIELD_STATUS_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_NOTICE, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php index 37276d4793..e4bb349032 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -271,7 +271,7 @@ class FHIRPaymentReconciliation extends FHIRDomainResource implements PHPFHIRCon * Validation map for fields in type PaymentReconciliation * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPaymentReconciliation Constructor @@ -1017,11 +1017,366 @@ public function setTotal(FHIRMoney $total = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcessNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESS_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTotal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TOTAL] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DETAIL])) { + $v = $this->getDetail(); + foreach($validationRules[self::FIELD_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DETAIL])) { + $errs[self::FIELD_DETAIL] = []; + } + $errs[self::FIELD_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESS_NOTE])) { + $v = $this->getProcessNote(); + foreach($validationRules[self::FIELD_PROCESS_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_PROCESS_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESS_NOTE])) { + $errs[self::FIELD_PROCESS_NOTE] = []; + } + $errs[self::FIELD_PROCESS_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOTAL])) { + $v = $this->getTotal(); + foreach($validationRules[self::FIELD_TOTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PAYMENT_RECONCILIATION, self::FIELD_TOTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOTAL])) { + $errs[self::FIELD_TOTAL] = []; + } + $errs[self::FIELD_TOTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPerson.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPerson.php index 41225633af..222ce10119 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -223,7 +223,7 @@ class FHIRPerson extends FHIRDomainResource implements PHPFHIRContainedTypeInter * Validation map for fields in type Person * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPerson Constructor @@ -901,11 +901,302 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLink())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LINK, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getManagingOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPhoto())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PHOTO] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LINK])) { + $v = $this->getLink(); + foreach($validationRules[self::FIELD_LINK] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_LINK, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LINK])) { + $errs[self::FIELD_LINK] = []; + } + $errs[self::FIELD_LINK][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MANAGING_ORGANIZATION])) { + $v = $this->getManagingOrganization(); + foreach($validationRules[self::FIELD_MANAGING_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_MANAGING_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MANAGING_ORGANIZATION])) { + $errs[self::FIELD_MANAGING_ORGANIZATION] = []; + } + $errs[self::FIELD_MANAGING_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PERSON, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php index bdb59b6666..9ebc7b8041 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -505,7 +505,7 @@ class FHIRPlanDefinition extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type PlanDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPlanDefinition Constructor @@ -2382,11 +2382,584 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContributor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRIBUTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGoal())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GOAL, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getLibrary())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LIBRARY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRIBUTOR])) { + $v = $this->getContributor(); + foreach($validationRules[self::FIELD_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRIBUTOR])) { + $errs[self::FIELD_CONTRIBUTOR] = []; + } + $errs[self::FIELD_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GOAL])) { + $v = $this->getGoal(); + foreach($validationRules[self::FIELD_GOAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_GOAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GOAL])) { + $errs[self::FIELD_GOAL] = []; + } + $errs[self::FIELD_GOAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LIBRARY])) { + $v = $this->getLibrary(); + foreach($validationRules[self::FIELD_LIBRARY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_LIBRARY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LIBRARY])) { + $errs[self::FIELD_LIBRARY] = []; + } + $errs[self::FIELD_LIBRARY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PLAN_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitioner.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitioner.php index a64fa59958..d0385234f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitioner.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitioner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -227,7 +227,7 @@ class FHIRPractitioner extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Practitioner * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitioner Constructor @@ -991,11 +991,306 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCommunication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getQualification())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUALIFICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION])) { + $v = $this->getCommunication(); + foreach($validationRules[self::FIELD_COMMUNICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_COMMUNICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION])) { + $errs[self::FIELD_COMMUNICATION] = []; + } + $errs[self::FIELD_COMMUNICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALIFICATION])) { + $v = $this->getQualification(); + foreach($validationRules[self::FIELD_QUALIFICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_QUALIFICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALIFICATION])) { + $errs[self::FIELD_QUALIFICATION] = []; + } + $errs[self::FIELD_QUALIFICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php index 599097d0e6..85f1f13727 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -272,7 +272,7 @@ class FHIRPractitionerRole extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type PractitionerRole * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRPractitionerRole Constructor @@ -1236,11 +1236,378 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAvailabilityExceptions())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAvailableTime())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AVAILABLE_TIME, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEndpoint())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENDPOINT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getHealthcareService())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_HEALTHCARE_SERVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getLocation())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_LOCATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNotAvailable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOT_AVAILABLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPractitioner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTITIONER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $v = $this->getAvailabilityExceptions(); + foreach($validationRules[self::FIELD_AVAILABILITY_EXCEPTIONS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_AVAILABILITY_EXCEPTIONS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS] = []; + } + $errs[self::FIELD_AVAILABILITY_EXCEPTIONS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AVAILABLE_TIME])) { + $v = $this->getAvailableTime(); + foreach($validationRules[self::FIELD_AVAILABLE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_AVAILABLE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AVAILABLE_TIME])) { + $errs[self::FIELD_AVAILABLE_TIME] = []; + } + $errs[self::FIELD_AVAILABLE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENDPOINT])) { + $v = $this->getEndpoint(); + foreach($validationRules[self::FIELD_ENDPOINT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_ENDPOINT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENDPOINT])) { + $errs[self::FIELD_ENDPOINT] = []; + } + $errs[self::FIELD_ENDPOINT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_HEALTHCARE_SERVICE])) { + $v = $this->getHealthcareService(); + foreach($validationRules[self::FIELD_HEALTHCARE_SERVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_HEALTHCARE_SERVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_HEALTHCARE_SERVICE])) { + $errs[self::FIELD_HEALTHCARE_SERVICE] = []; + } + $errs[self::FIELD_HEALTHCARE_SERVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_AVAILABLE])) { + $v = $this->getNotAvailable(); + foreach($validationRules[self::FIELD_NOT_AVAILABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_NOT_AVAILABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_AVAILABLE])) { + $errs[self::FIELD_NOT_AVAILABLE] = []; + } + $errs[self::FIELD_NOT_AVAILABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRACTITIONER])) { + $v = $this->getPractitioner(); + foreach($validationRules[self::FIELD_PRACTITIONER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_PRACTITIONER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRACTITIONER])) { + $errs[self::FIELD_PRACTITIONER] = []; + } + $errs[self::FIELD_PRACTITIONER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PRACTITIONER_ROLE, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedure.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedure.php index b2ab6c0569..e57229c1a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -461,7 +461,7 @@ class FHIRProcedure extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Procedure * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedure Constructor @@ -2259,11 +2259,613 @@ public function setUsedReference(array $usedReference = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComplication())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPLICATION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getComplicationDetail())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPLICATION_DETAIL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFocalDevice())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOCAL_DEVICE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFollowUp())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOLLOW_UP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotDone())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_DONE] = $fieldErrs; + } + } + if (null !== ($v = $this->getNotDoneReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NOT_DONE_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPerformedDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMED_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformedPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMED_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPerformer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPORT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUsedCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USED_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getUsedReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USED_REFERENCE, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPLICATION])) { + $v = $this->getComplication(); + foreach($validationRules[self::FIELD_COMPLICATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_COMPLICATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPLICATION])) { + $errs[self::FIELD_COMPLICATION] = []; + } + $errs[self::FIELD_COMPLICATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPLICATION_DETAIL])) { + $v = $this->getComplicationDetail(); + foreach($validationRules[self::FIELD_COMPLICATION_DETAIL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_COMPLICATION_DETAIL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPLICATION_DETAIL])) { + $errs[self::FIELD_COMPLICATION_DETAIL] = []; + } + $errs[self::FIELD_COMPLICATION_DETAIL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCAL_DEVICE])) { + $v = $this->getFocalDevice(); + foreach($validationRules[self::FIELD_FOCAL_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_FOCAL_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCAL_DEVICE])) { + $errs[self::FIELD_FOCAL_DEVICE] = []; + } + $errs[self::FIELD_FOCAL_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOLLOW_UP])) { + $v = $this->getFollowUp(); + foreach($validationRules[self::FIELD_FOLLOW_UP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_FOLLOW_UP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOLLOW_UP])) { + $errs[self::FIELD_FOLLOW_UP] = []; + } + $errs[self::FIELD_FOLLOW_UP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_DONE])) { + $v = $this->getNotDone(); + foreach($validationRules[self::FIELD_NOT_DONE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_NOT_DONE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_DONE])) { + $errs[self::FIELD_NOT_DONE] = []; + } + $errs[self::FIELD_NOT_DONE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOT_DONE_REASON])) { + $v = $this->getNotDoneReason(); + foreach($validationRules[self::FIELD_NOT_DONE_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_NOT_DONE_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOT_DONE_REASON])) { + $errs[self::FIELD_NOT_DONE_REASON] = []; + } + $errs[self::FIELD_NOT_DONE_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMED_DATE_TIME])) { + $v = $this->getPerformedDateTime(); + foreach($validationRules[self::FIELD_PERFORMED_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMED_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMED_DATE_TIME])) { + $errs[self::FIELD_PERFORMED_DATE_TIME] = []; + } + $errs[self::FIELD_PERFORMED_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMED_PERIOD])) { + $v = $this->getPerformedPeriod(); + foreach($validationRules[self::FIELD_PERFORMED_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMED_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMED_PERIOD])) { + $errs[self::FIELD_PERFORMED_PERIOD] = []; + } + $errs[self::FIELD_PERFORMED_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPORT])) { + $v = $this->getReport(); + foreach($validationRules[self::FIELD_REPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_REPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPORT])) { + $errs[self::FIELD_REPORT] = []; + } + $errs[self::FIELD_REPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_CODE])) { + $v = $this->getUsedCode(); + foreach($validationRules[self::FIELD_USED_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_USED_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_CODE])) { + $errs[self::FIELD_USED_CODE] = []; + } + $errs[self::FIELD_USED_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USED_REFERENCE])) { + $v = $this->getUsedReference(); + foreach($validationRules[self::FIELD_USED_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE, self::FIELD_USED_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USED_REFERENCE])) { + $errs[self::FIELD_USED_REFERENCE] = []; + } + $errs[self::FIELD_USED_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php index 98a4a284ba..3efa6ee291 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -494,7 +494,7 @@ class FHIRProcedureRequest extends FHIRDomainResource implements PHPFHIRContaine * Validation map for fields in type ProcedureRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcedureRequest Constructor @@ -2304,11 +2304,639 @@ public function setSupportingInfo(array $supportingInfo = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAsNeededBoolean())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getAsNeededCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getBodySite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDoNotPerform())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DO_NOT_PERFORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformerType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelevantHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELEVANT_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequisition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUISITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSpecimen())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_BOOLEAN])) { + $v = $this->getAsNeededBoolean(); + foreach($validationRules[self::FIELD_AS_NEEDED_BOOLEAN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_AS_NEEDED_BOOLEAN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_BOOLEAN])) { + $errs[self::FIELD_AS_NEEDED_BOOLEAN] = []; + } + $errs[self::FIELD_AS_NEEDED_BOOLEAN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $v = $this->getAsNeededCodeableConcept(); + foreach($validationRules[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_AS_NEEDED_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BODY_SITE])) { + $v = $this->getBodySite(); + foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_BODY_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BODY_SITE])) { + $errs[self::FIELD_BODY_SITE] = []; + } + $errs[self::FIELD_BODY_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DO_NOT_PERFORM])) { + $v = $this->getDoNotPerform(); + foreach($validationRules[self::FIELD_DO_NOT_PERFORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_DO_NOT_PERFORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DO_NOT_PERFORM])) { + $errs[self::FIELD_DO_NOT_PERFORM] = []; + } + $errs[self::FIELD_DO_NOT_PERFORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER_TYPE])) { + $v = $this->getPerformerType(); + foreach($validationRules[self::FIELD_PERFORMER_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_PERFORMER_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER_TYPE])) { + $errs[self::FIELD_PERFORMER_TYPE] = []; + } + $errs[self::FIELD_PERFORMER_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEVANT_HISTORY])) { + $v = $this->getRelevantHistory(); + foreach($validationRules[self::FIELD_RELEVANT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_RELEVANT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEVANT_HISTORY])) { + $errs[self::FIELD_RELEVANT_HISTORY] = []; + } + $errs[self::FIELD_RELEVANT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUISITION])) { + $v = $this->getRequisition(); + foreach($validationRules[self::FIELD_REQUISITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_REQUISITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUISITION])) { + $errs[self::FIELD_REQUISITION] = []; + } + $errs[self::FIELD_REQUISITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php index 58f5344e58..72833f7659 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -285,7 +285,7 @@ class FHIRProcessRequest extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type ProcessRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcessRequest Constructor @@ -1201,11 +1201,385 @@ public function setTarget(FHIRReference $target = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getExclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_EXCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInclude())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INCLUDE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getNullify())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NULLIFY] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTarget())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TARGET] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXCLUDE])) { + $v = $this->getExclude(); + foreach($validationRules[self::FIELD_EXCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_EXCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXCLUDE])) { + $errs[self::FIELD_EXCLUDE] = []; + } + $errs[self::FIELD_EXCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INCLUDE])) { + $v = $this->getInclude(); + foreach($validationRules[self::FIELD_INCLUDE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_INCLUDE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INCLUDE])) { + $errs[self::FIELD_INCLUDE] = []; + } + $errs[self::FIELD_INCLUDE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NULLIFY])) { + $v = $this->getNullify(); + foreach($validationRules[self::FIELD_NULLIFY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_NULLIFY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NULLIFY])) { + $errs[self::FIELD_NULLIFY] = []; + } + $errs[self::FIELD_NULLIFY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROVIDER])) { + $v = $this->getProvider(); + foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROVIDER])) { + $errs[self::FIELD_PROVIDER] = []; + } + $errs[self::FIELD_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE])) { + $v = $this->getReference(); + foreach($validationRules[self::FIELD_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE])) { + $errs[self::FIELD_REFERENCE] = []; + } + $errs[self::FIELD_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESPONSE])) { + $v = $this->getResponse(); + foreach($validationRules[self::FIELD_RESPONSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_RESPONSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESPONSE])) { + $errs[self::FIELD_RESPONSE] = []; + } + $errs[self::FIELD_RESPONSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_REQUEST, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php index 397edeaf6b..9f8299b3d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -259,7 +259,7 @@ class FHIRProcessResponse extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type ProcessResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRProcessResponse Constructor @@ -1015,11 +1015,351 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCommunicationRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMMUNICATION_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCreated())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CREATED] = $fieldErrs; + } + } + if (null !== ($v = $this->getDisposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DISPOSITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getError())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ERROR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getForm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FORM] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OUTCOME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProcessNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESS_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestProvider())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_PROVIDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMMUNICATION_REQUEST])) { + $v = $this->getCommunicationRequest(); + foreach($validationRules[self::FIELD_COMMUNICATION_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_COMMUNICATION_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMUNICATION_REQUEST])) { + $errs[self::FIELD_COMMUNICATION_REQUEST] = []; + } + $errs[self::FIELD_COMMUNICATION_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CREATED])) { + $v = $this->getCreated(); + foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_CREATED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CREATED])) { + $errs[self::FIELD_CREATED] = []; + } + $errs[self::FIELD_CREATED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPOSITION])) { + $v = $this->getDisposition(); + foreach($validationRules[self::FIELD_DISPOSITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_DISPOSITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPOSITION])) { + $errs[self::FIELD_DISPOSITION] = []; + } + $errs[self::FIELD_DISPOSITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ERROR])) { + $v = $this->getError(); + foreach($validationRules[self::FIELD_ERROR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_ERROR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ERROR])) { + $errs[self::FIELD_ERROR] = []; + } + $errs[self::FIELD_ERROR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FORM])) { + $v = $this->getForm(); + foreach($validationRules[self::FIELD_FORM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_FORM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FORM])) { + $errs[self::FIELD_FORM] = []; + } + $errs[self::FIELD_FORM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORGANIZATION])) { + $v = $this->getOrganization(); + foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORGANIZATION])) { + $errs[self::FIELD_ORGANIZATION] = []; + } + $errs[self::FIELD_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTCOME])) { + $v = $this->getOutcome(); + foreach($validationRules[self::FIELD_OUTCOME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_OUTCOME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTCOME])) { + $errs[self::FIELD_OUTCOME] = []; + } + $errs[self::FIELD_OUTCOME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESS_NOTE])) { + $v = $this->getProcessNote(); + foreach($validationRules[self::FIELD_PROCESS_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_PROCESS_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESS_NOTE])) { + $errs[self::FIELD_PROCESS_NOTE] = []; + } + $errs[self::FIELD_PROCESS_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_ORGANIZATION])) { + $v = $this->getRequestOrganization(); + foreach($validationRules[self::FIELD_REQUEST_ORGANIZATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_REQUEST_ORGANIZATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_ORGANIZATION])) { + $errs[self::FIELD_REQUEST_ORGANIZATION] = []; + } + $errs[self::FIELD_REQUEST_ORGANIZATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST_PROVIDER])) { + $v = $this->getRequestProvider(); + foreach($validationRules[self::FIELD_REQUEST_PROVIDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_REQUEST_PROVIDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST_PROVIDER])) { + $errs[self::FIELD_REQUEST_PROVIDER] = []; + } + $errs[self::FIELD_REQUEST_PROVIDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROCESS_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProvenance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProvenance.php index 9acc764e78..8c75375588 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProvenance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProvenance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -249,7 +249,7 @@ class FHIRProvenance extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type Provenance * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_AGENT => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1021,11 +1021,304 @@ public function setTarget(array $target = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActivity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAgent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_AGENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getEntity())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENTITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPolicy())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POLICY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReason())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRecorded())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECORDED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSignature())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SIGNATURE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVITY])) { + $v = $this->getActivity(); + foreach($validationRules[self::FIELD_ACTIVITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_ACTIVITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVITY])) { + $errs[self::FIELD_ACTIVITY] = []; + } + $errs[self::FIELD_ACTIVITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AGENT])) { + $v = $this->getAgent(); + foreach($validationRules[self::FIELD_AGENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_AGENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AGENT])) { + $errs[self::FIELD_AGENT] = []; + } + $errs[self::FIELD_AGENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENTITY])) { + $v = $this->getEntity(); + foreach($validationRules[self::FIELD_ENTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_ENTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENTITY])) { + $errs[self::FIELD_ENTITY] = []; + } + $errs[self::FIELD_ENTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LOCATION])) { + $v = $this->getLocation(); + foreach($validationRules[self::FIELD_LOCATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_LOCATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LOCATION])) { + $errs[self::FIELD_LOCATION] = []; + } + $errs[self::FIELD_LOCATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POLICY])) { + $v = $this->getPolicy(); + foreach($validationRules[self::FIELD_POLICY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_POLICY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POLICY])) { + $errs[self::FIELD_POLICY] = []; + } + $errs[self::FIELD_POLICY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECORDED])) { + $v = $this->getRecorded(); + foreach($validationRules[self::FIELD_RECORDED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_RECORDED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECORDED])) { + $errs[self::FIELD_RECORDED] = []; + } + $errs[self::FIELD_RECORDED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SIGNATURE])) { + $v = $this->getSignature(); + foreach($validationRules[self::FIELD_SIGNATURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_SIGNATURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SIGNATURE])) { + $errs[self::FIELD_SIGNATURE] = []; + } + $errs[self::FIELD_SIGNATURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PROVENANCE, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php index f04b8af2c0..4aaa9debaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -425,7 +425,7 @@ class FHIRQuestionnaire extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type Questionnaire * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaire Constructor @@ -1957,11 +1957,493 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSubjectType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUBJECT_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT_TYPE])) { + $v = $this->getSubjectType(); + foreach($validationRules[self::FIELD_SUBJECT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_SUBJECT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT_TYPE])) { + $errs[self::FIELD_SUBJECT_TYPE] = []; + } + $errs[self::FIELD_SUBJECT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php index 23e6844a3a..3517031730 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -240,7 +240,7 @@ class FHIRQuestionnaireResponse extends FHIRDomainResource implements PHPFHIRCon * Validation map for fields in type QuestionnaireResponse * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRQuestionnaireResponse Constructor @@ -878,11 +878,315 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthored())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getItem())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuestionnaire())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTIONNAIRE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSource())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SOURCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED])) { + $v = $this->getAuthored(); + foreach($validationRules[self::FIELD_AUTHORED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_AUTHORED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED])) { + $errs[self::FIELD_AUTHORED] = []; + } + $errs[self::FIELD_AUTHORED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ITEM])) { + $v = $this->getItem(); + foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ITEM])) { + $errs[self::FIELD_ITEM] = []; + } + $errs[self::FIELD_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUESTIONNAIRE])) { + $v = $this->getQuestionnaire(); + foreach($validationRules[self::FIELD_QUESTIONNAIRE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_QUESTIONNAIRE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUESTIONNAIRE])) { + $errs[self::FIELD_QUESTIONNAIRE] = []; + } + $errs[self::FIELD_QUESTIONNAIRE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SOURCE])) { + $v = $this->getSource(); + foreach($validationRules[self::FIELD_SOURCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_SOURCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SOURCE])) { + $errs[self::FIELD_SOURCE] = []; + } + $errs[self::FIELD_SOURCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php index f86986c6c0..2b91b26e4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -425,7 +425,7 @@ class FHIRReferralRequest extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type ReferralRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRReferralRequest Constructor @@ -1972,11 +1972,552 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReasonCode())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReasonReference())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRecipient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECIPIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRelevantHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELEVANT_HISTORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getServiceRequested())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_REQUESTED, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecialty())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIALTY] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupportingInfo())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPORTING_INFO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODE])) { + $v = $this->getReasonCode(); + foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_REASON_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODE])) { + $errs[self::FIELD_REASON_CODE] = []; + } + $errs[self::FIELD_REASON_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECIPIENT])) { + $v = $this->getRecipient(); + foreach($validationRules[self::FIELD_RECIPIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_RECIPIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECIPIENT])) { + $errs[self::FIELD_RECIPIENT] = []; + } + $errs[self::FIELD_RECIPIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEVANT_HISTORY])) { + $v = $this->getRelevantHistory(); + foreach($validationRules[self::FIELD_RELEVANT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_RELEVANT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEVANT_HISTORY])) { + $errs[self::FIELD_RELEVANT_HISTORY] = []; + } + $errs[self::FIELD_RELEVANT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_REQUESTED])) { + $v = $this->getServiceRequested(); + foreach($validationRules[self::FIELD_SERVICE_REQUESTED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_SERVICE_REQUESTED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_REQUESTED])) { + $errs[self::FIELD_SERVICE_REQUESTED] = []; + } + $errs[self::FIELD_SERVICE_REQUESTED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPORTING_INFO])) { + $v = $this->getSupportingInfo(); + foreach($validationRules[self::FIELD_SUPPORTING_INFO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_SUPPORTING_INFO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPORTING_INFO])) { + $errs[self::FIELD_SUPPORTING_INFO] = []; + } + $errs[self::FIELD_SUPPORTING_INFO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REFERRAL_REQUEST, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php index 1bed7f7da5..0f61394061 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -240,7 +240,7 @@ class FHIRRelatedPerson extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type RelatedPerson * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRelatedPerson Constructor @@ -962,11 +962,319 @@ public function setTelecom(array $telecom = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getAddress())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ADDRESS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBirthDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BIRTH_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getGender())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GENDER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getName())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NAME, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPhoto())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PHOTO, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRelationship())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATIONSHIP] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTelecom())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TELECOM, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ADDRESS])) { + $v = $this->getAddress(); + foreach($validationRules[self::FIELD_ADDRESS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_ADDRESS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ADDRESS])) { + $errs[self::FIELD_ADDRESS] = []; + } + $errs[self::FIELD_ADDRESS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BIRTH_DATE])) { + $v = $this->getBirthDate(); + foreach($validationRules[self::FIELD_BIRTH_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_BIRTH_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BIRTH_DATE])) { + $errs[self::FIELD_BIRTH_DATE] = []; + } + $errs[self::FIELD_BIRTH_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GENDER])) { + $v = $this->getGender(); + foreach($validationRules[self::FIELD_GENDER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_GENDER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GENDER])) { + $errs[self::FIELD_GENDER] = []; + } + $errs[self::FIELD_GENDER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PHOTO])) { + $v = $this->getPhoto(); + foreach($validationRules[self::FIELD_PHOTO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_PHOTO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PHOTO])) { + $errs[self::FIELD_PHOTO] = []; + } + $errs[self::FIELD_PHOTO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATIONSHIP])) { + $v = $this->getRelationship(); + foreach($validationRules[self::FIELD_RELATIONSHIP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_RELATIONSHIP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATIONSHIP])) { + $errs[self::FIELD_RELATIONSHIP] = []; + } + $errs[self::FIELD_RELATIONSHIP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TELECOM])) { + $v = $this->getTelecom(); + foreach($validationRules[self::FIELD_TELECOM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RELATED_PERSON, self::FIELD_TELECOM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TELECOM])) { + $errs[self::FIELD_TELECOM] = []; + } + $errs[self::FIELD_TELECOM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php index e6090f677d..5452cede3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -305,7 +305,7 @@ class FHIRRequestGroup extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type RequestGroup * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRequestGroup Constructor @@ -1267,11 +1267,406 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getAction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getAuthor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDefinition())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DEFINITION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReplaces())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPLACES, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTION])) { + $v = $this->getAction(); + foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_ACTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTION])) { + $errs[self::FIELD_ACTION] = []; + } + $errs[self::FIELD_ACTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHOR])) { + $v = $this->getAuthor(); + foreach($validationRules[self::FIELD_AUTHOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_AUTHOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHOR])) { + $errs[self::FIELD_AUTHOR] = []; + } + $errs[self::FIELD_AUTHOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION])) { + $v = $this->getDefinition(); + foreach($validationRules[self::FIELD_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION])) { + $errs[self::FIELD_DEFINITION] = []; + } + $errs[self::FIELD_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPLACES])) { + $v = $this->getReplaces(); + foreach($validationRules[self::FIELD_REPLACES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_REPLACES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPLACES])) { + $errs[self::FIELD_REPLACES] = []; + } + $errs[self::FIELD_REPLACES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_REQUEST_GROUP, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php index 42fbc9056a..e9aa08ead0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -369,7 +369,7 @@ class FHIRResearchStudy extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type ResearchStudy * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchStudy Constructor @@ -1768,11 +1768,488 @@ public function setTitle($title = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getArm())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ARM, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getEnrollment())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ENROLLMENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getFocus())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FOCUS, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getKeyword())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_KEYWORD, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrincipalInvestigator())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRINCIPAL_INVESTIGATOR] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getProtocol())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROTOCOL, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReasonStopped())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_STOPPED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSite())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SITE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSponsor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPONSOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ARM])) { + $v = $this->getArm(); + foreach($validationRules[self::FIELD_ARM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_ARM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ARM])) { + $errs[self::FIELD_ARM] = []; + } + $errs[self::FIELD_ARM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENROLLMENT])) { + $v = $this->getEnrollment(); + foreach($validationRules[self::FIELD_ENROLLMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_ENROLLMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENROLLMENT])) { + $errs[self::FIELD_ENROLLMENT] = []; + } + $errs[self::FIELD_ENROLLMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KEYWORD])) { + $v = $this->getKeyword(); + foreach($validationRules[self::FIELD_KEYWORD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_KEYWORD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KEYWORD])) { + $errs[self::FIELD_KEYWORD] = []; + } + $errs[self::FIELD_KEYWORD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRINCIPAL_INVESTIGATOR])) { + $v = $this->getPrincipalInvestigator(); + foreach($validationRules[self::FIELD_PRINCIPAL_INVESTIGATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_PRINCIPAL_INVESTIGATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRINCIPAL_INVESTIGATOR])) { + $errs[self::FIELD_PRINCIPAL_INVESTIGATOR] = []; + } + $errs[self::FIELD_PRINCIPAL_INVESTIGATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROTOCOL])) { + $v = $this->getProtocol(); + foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_PROTOCOL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROTOCOL])) { + $errs[self::FIELD_PROTOCOL] = []; + } + $errs[self::FIELD_PROTOCOL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_STOPPED])) { + $v = $this->getReasonStopped(); + foreach($validationRules[self::FIELD_REASON_STOPPED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_REASON_STOPPED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_STOPPED])) { + $errs[self::FIELD_REASON_STOPPED] = []; + } + $errs[self::FIELD_REASON_STOPPED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SITE])) { + $v = $this->getSite(); + foreach($validationRules[self::FIELD_SITE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_SITE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SITE])) { + $errs[self::FIELD_SITE] = []; + } + $errs[self::FIELD_SITE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPONSOR])) { + $v = $this->getSponsor(); + foreach($validationRules[self::FIELD_SPONSOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_SPONSOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPONSOR])) { + $errs[self::FIELD_SPONSOR] = []; + } + $errs[self::FIELD_SPONSOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php index 0177fc3ce6..062968851b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -196,7 +196,7 @@ class FHIRResearchSubject extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type ResearchSubject * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResearchSubject Constructor @@ -607,11 +607,258 @@ public function setStudy(FHIRReference $study = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActualArm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTUAL_ARM] = $fieldErrs; + } + } + if (null !== ($v = $this->getAssignedArm())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ASSIGNED_ARM] = $fieldErrs; + } + } + if (null !== ($v = $this->getConsent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONSENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIndividual())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INDIVIDUAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStudy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STUDY] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACTUAL_ARM])) { + $v = $this->getActualArm(); + foreach($validationRules[self::FIELD_ACTUAL_ARM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_ACTUAL_ARM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTUAL_ARM])) { + $errs[self::FIELD_ACTUAL_ARM] = []; + } + $errs[self::FIELD_ACTUAL_ARM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ASSIGNED_ARM])) { + $v = $this->getAssignedArm(); + foreach($validationRules[self::FIELD_ASSIGNED_ARM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_ASSIGNED_ARM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ASSIGNED_ARM])) { + $errs[self::FIELD_ASSIGNED_ARM] = []; + } + $errs[self::FIELD_ASSIGNED_ARM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONSENT])) { + $v = $this->getConsent(); + foreach($validationRules[self::FIELD_CONSENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_CONSENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONSENT])) { + $errs[self::FIELD_CONSENT] = []; + } + $errs[self::FIELD_CONSENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INDIVIDUAL])) { + $v = $this->getIndividual(); + foreach($validationRules[self::FIELD_INDIVIDUAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_INDIVIDUAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INDIVIDUAL])) { + $errs[self::FIELD_INDIVIDUAL] = []; + } + $errs[self::FIELD_INDIVIDUAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERIOD])) { + $v = $this->getPeriod(); + foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERIOD])) { + $errs[self::FIELD_PERIOD] = []; + } + $errs[self::FIELD_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STUDY])) { + $v = $this->getStudy(); + foreach($validationRules[self::FIELD_STUDY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT, self::FIELD_STUDY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STUDY])) { + $errs[self::FIELD_STUDY] = []; + } + $errs[self::FIELD_STUDY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php index a39a77403f..aad9214c3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -322,7 +322,7 @@ class FHIRRiskAssessment extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type RiskAssessment * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRRiskAssessment Constructor @@ -1213,11 +1213,432 @@ public function setSubject(FHIRReference $subject = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getBasedOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasis())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASIS, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getMethod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METHOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getMitigation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MITIGATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getParent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPrediction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PREDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASIS])) { + $v = $this->getBasis(); + foreach($validationRules[self::FIELD_BASIS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_BASIS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASIS])) { + $errs[self::FIELD_BASIS] = []; + } + $errs[self::FIELD_BASIS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONDITION])) { + $v = $this->getCondition(); + foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_CONDITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONDITION])) { + $errs[self::FIELD_CONDITION] = []; + } + $errs[self::FIELD_CONDITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METHOD])) { + $v = $this->getMethod(); + foreach($validationRules[self::FIELD_METHOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_METHOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METHOD])) { + $errs[self::FIELD_METHOD] = []; + } + $errs[self::FIELD_METHOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MITIGATION])) { + $v = $this->getMitigation(); + foreach($validationRules[self::FIELD_MITIGATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_MITIGATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MITIGATION])) { + $errs[self::FIELD_MITIGATION] = []; + } + $errs[self::FIELD_MITIGATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PREDICTION])) { + $v = $this->getPrediction(); + foreach($validationRules[self::FIELD_PREDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_PREDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PREDICTION])) { + $errs[self::FIELD_PREDICTION] = []; + } + $errs[self::FIELD_PREDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RISK_ASSESSMENT, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSchedule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSchedule.php index c17f8055fe..6c895e8387 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSchedule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSchedule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -202,7 +202,7 @@ class FHIRSchedule extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Schedule * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_ACTOR => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -776,11 +776,266 @@ public function setSpecialty(array $specialty = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getActive())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getActor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ACTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPlanningHorizon())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PLANNING_HORIZON] = $fieldErrs; + } + } + if (null !== ($v = $this->getServiceCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getServiceType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_ACTIVE])) { + $v = $this->getActive(); + foreach($validationRules[self::FIELD_ACTIVE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_ACTIVE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTIVE])) { + $errs[self::FIELD_ACTIVE] = []; + } + $errs[self::FIELD_ACTIVE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ACTOR])) { + $v = $this->getActor(); + foreach($validationRules[self::FIELD_ACTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_ACTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACTOR])) { + $errs[self::FIELD_ACTOR] = []; + } + $errs[self::FIELD_ACTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PLANNING_HORIZON])) { + $v = $this->getPlanningHorizon(); + foreach($validationRules[self::FIELD_PLANNING_HORIZON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_PLANNING_HORIZON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PLANNING_HORIZON])) { + $errs[self::FIELD_PLANNING_HORIZON] = []; + } + $errs[self::FIELD_PLANNING_HORIZON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_CATEGORY])) { + $v = $this->getServiceCategory(); + foreach($validationRules[self::FIELD_SERVICE_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_SERVICE_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_CATEGORY])) { + $errs[self::FIELD_SERVICE_CATEGORY] = []; + } + $errs[self::FIELD_SERVICE_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_TYPE])) { + $v = $this->getServiceType(); + foreach($validationRules[self::FIELD_SERVICE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_SERVICE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_TYPE])) { + $errs[self::FIELD_SERVICE_TYPE] = []; + } + $errs[self::FIELD_SERVICE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php index 1d1bc5117d..c1bd5c8425 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -457,7 +457,7 @@ class FHIRSearchParameter extends FHIRDomainResource implements PHPFHIRContained * Validation map for fields in type SearchParameter * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_BASE => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -2275,11 +2275,548 @@ public function setXpathUsage(FHIRXPathUsageType $xpathUsage = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBase())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getChain())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CHAIN, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getComparator())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPARATOR, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getComponent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_COMPONENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDerivedFrom())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DERIVED_FROM] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPRESSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getModifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MODIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTarget())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TARGET, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpath())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH] = $fieldErrs; + } + } + if (null !== ($v = $this->getXpathUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_XPATH_USAGE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASE])) { + $v = $this->getBase(); + foreach($validationRules[self::FIELD_BASE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_BASE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE])) { + $errs[self::FIELD_BASE] = []; + } + $errs[self::FIELD_BASE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CHAIN])) { + $v = $this->getChain(); + foreach($validationRules[self::FIELD_CHAIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_CHAIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHAIN])) { + $errs[self::FIELD_CHAIN] = []; + } + $errs[self::FIELD_CHAIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPARATOR])) { + $v = $this->getComparator(); + foreach($validationRules[self::FIELD_COMPARATOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_COMPARATOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPARATOR])) { + $errs[self::FIELD_COMPARATOR] = []; + } + $errs[self::FIELD_COMPARATOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMPONENT])) { + $v = $this->getComponent(); + foreach($validationRules[self::FIELD_COMPONENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_COMPONENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPONENT])) { + $errs[self::FIELD_COMPONENT] = []; + } + $errs[self::FIELD_COMPONENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DERIVED_FROM])) { + $v = $this->getDerivedFrom(); + foreach($validationRules[self::FIELD_DERIVED_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_DERIVED_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DERIVED_FROM])) { + $errs[self::FIELD_DERIVED_FROM] = []; + } + $errs[self::FIELD_DERIVED_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPRESSION])) { + $v = $this->getExpression(); + foreach($validationRules[self::FIELD_EXPRESSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_EXPRESSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPRESSION])) { + $errs[self::FIELD_EXPRESSION] = []; + } + $errs[self::FIELD_EXPRESSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER])) { + $v = $this->getModifier(); + foreach($validationRules[self::FIELD_MODIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_MODIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER])) { + $errs[self::FIELD_MODIFIER] = []; + } + $errs[self::FIELD_MODIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TARGET])) { + $v = $this->getTarget(); + foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_TARGET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TARGET])) { + $errs[self::FIELD_TARGET] = []; + } + $errs[self::FIELD_TARGET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH])) { + $v = $this->getXpath(); + foreach($validationRules[self::FIELD_XPATH] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_XPATH, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH])) { + $errs[self::FIELD_XPATH] = []; + } + $errs[self::FIELD_XPATH][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_XPATH_USAGE])) { + $v = $this->getXpathUsage(); + foreach($validationRules[self::FIELD_XPATH_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEARCH_PARAMETER, self::FIELD_XPATH_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_XPATH_USAGE])) { + $errs[self::FIELD_XPATH_USAGE] = []; + } + $errs[self::FIELD_XPATH_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSequence.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSequence.php index c62c1ff149..5aa0a68c05 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSequence.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSequence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -289,7 +289,7 @@ class FHIRSequence extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Sequence * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSequence Constructor @@ -1194,11 +1194,387 @@ public function setVariant(array $variant = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCoordinateSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COORDINATE_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getObservedSeq())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVED_SEQ] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerformer())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERFORMER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPointer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_POINTER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getQuality())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_QUALITY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getQuantity())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUANTITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReadCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_READ_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferenceSeq())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERENCE_SEQ] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRepository())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REPOSITORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSpecimen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getVariant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VARIANT, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_COORDINATE_SYSTEM])) { + $v = $this->getCoordinateSystem(); + foreach($validationRules[self::FIELD_COORDINATE_SYSTEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_COORDINATE_SYSTEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COORDINATE_SYSTEM])) { + $errs[self::FIELD_COORDINATE_SYSTEM] = []; + } + $errs[self::FIELD_COORDINATE_SYSTEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEVICE])) { + $v = $this->getDevice(); + foreach($validationRules[self::FIELD_DEVICE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_DEVICE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEVICE])) { + $errs[self::FIELD_DEVICE] = []; + } + $errs[self::FIELD_DEVICE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OBSERVED_SEQ])) { + $v = $this->getObservedSeq(); + foreach($validationRules[self::FIELD_OBSERVED_SEQ] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_OBSERVED_SEQ, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OBSERVED_SEQ])) { + $errs[self::FIELD_OBSERVED_SEQ] = []; + } + $errs[self::FIELD_OBSERVED_SEQ][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER])) { + $v = $this->getPerformer(); + foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_PERFORMER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER])) { + $errs[self::FIELD_PERFORMER] = []; + } + $errs[self::FIELD_PERFORMER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_POINTER])) { + $v = $this->getPointer(); + foreach($validationRules[self::FIELD_POINTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_POINTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_POINTER])) { + $errs[self::FIELD_POINTER] = []; + } + $errs[self::FIELD_POINTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUALITY])) { + $v = $this->getQuality(); + foreach($validationRules[self::FIELD_QUALITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_QUALITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUALITY])) { + $errs[self::FIELD_QUALITY] = []; + } + $errs[self::FIELD_QUALITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_QUANTITY])) { + $v = $this->getQuantity(); + foreach($validationRules[self::FIELD_QUANTITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_QUANTITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_QUANTITY])) { + $errs[self::FIELD_QUANTITY] = []; + } + $errs[self::FIELD_QUANTITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_READ_COVERAGE])) { + $v = $this->getReadCoverage(); + foreach($validationRules[self::FIELD_READ_COVERAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_READ_COVERAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_READ_COVERAGE])) { + $errs[self::FIELD_READ_COVERAGE] = []; + } + $errs[self::FIELD_READ_COVERAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REFERENCE_SEQ])) { + $v = $this->getReferenceSeq(); + foreach($validationRules[self::FIELD_REFERENCE_SEQ] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_REFERENCE_SEQ, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REFERENCE_SEQ])) { + $errs[self::FIELD_REFERENCE_SEQ] = []; + } + $errs[self::FIELD_REFERENCE_SEQ][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REPOSITORY])) { + $v = $this->getRepository(); + foreach($validationRules[self::FIELD_REPOSITORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_REPOSITORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REPOSITORY])) { + $errs[self::FIELD_REPOSITORY] = []; + } + $errs[self::FIELD_REPOSITORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIMEN])) { + $v = $this->getSpecimen(); + foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_SPECIMEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIMEN])) { + $errs[self::FIELD_SPECIMEN] = []; + } + $errs[self::FIELD_SPECIMEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIANT])) { + $v = $this->getVariant(); + foreach($validationRules[self::FIELD_VARIANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SEQUENCE, self::FIELD_VARIANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIANT])) { + $errs[self::FIELD_VARIANT] = []; + } + $errs[self::FIELD_VARIANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRServiceDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRServiceDefinition.php index eff820ccb0..1040f32571 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRServiceDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRServiceDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -487,7 +487,7 @@ class FHIRServiceDefinition extends FHIRDomainResource implements PHPFHIRContain * Validation map for fields in type ServiceDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRServiceDefinition Constructor @@ -2280,11 +2280,565 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getApprovalDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPROVAL_DATE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContributor())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTRIBUTOR, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDataRequirement())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DATA_REQUIREMENT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getEffectivePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getLastReviewDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_REVIEW_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelatedArtifact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELATED_ARTIFACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTopic())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TOPIC, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getTrigger())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TRIGGER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if (null !== ($v = $this->getUsage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_USAGE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPROVAL_DATE])) { + $v = $this->getApprovalDate(); + foreach($validationRules[self::FIELD_APPROVAL_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_APPROVAL_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPROVAL_DATE])) { + $errs[self::FIELD_APPROVAL_DATE] = []; + } + $errs[self::FIELD_APPROVAL_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTRIBUTOR])) { + $v = $this->getContributor(); + foreach($validationRules[self::FIELD_CONTRIBUTOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_CONTRIBUTOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTRIBUTOR])) { + $errs[self::FIELD_CONTRIBUTOR] = []; + } + $errs[self::FIELD_CONTRIBUTOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATA_REQUIREMENT])) { + $v = $this->getDataRequirement(); + foreach($validationRules[self::FIELD_DATA_REQUIREMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_DATA_REQUIREMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATA_REQUIREMENT])) { + $errs[self::FIELD_DATA_REQUIREMENT] = []; + } + $errs[self::FIELD_DATA_REQUIREMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) { + $v = $this->getEffectivePeriod(); + foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) { + $errs[self::FIELD_EFFECTIVE_PERIOD] = []; + } + $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_REVIEW_DATE])) { + $v = $this->getLastReviewDate(); + foreach($validationRules[self::FIELD_LAST_REVIEW_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_LAST_REVIEW_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_REVIEW_DATE])) { + $errs[self::FIELD_LAST_REVIEW_DATE] = []; + } + $errs[self::FIELD_LAST_REVIEW_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OPERATION_DEFINITION])) { + $v = $this->getOperationDefinition(); + foreach($validationRules[self::FIELD_OPERATION_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_OPERATION_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OPERATION_DEFINITION])) { + $errs[self::FIELD_OPERATION_DEFINITION] = []; + } + $errs[self::FIELD_OPERATION_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELATED_ARTIFACT])) { + $v = $this->getRelatedArtifact(); + foreach($validationRules[self::FIELD_RELATED_ARTIFACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_RELATED_ARTIFACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELATED_ARTIFACT])) { + $errs[self::FIELD_RELATED_ARTIFACT] = []; + } + $errs[self::FIELD_RELATED_ARTIFACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TOPIC])) { + $v = $this->getTopic(); + foreach($validationRules[self::FIELD_TOPIC] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_TOPIC, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TOPIC])) { + $errs[self::FIELD_TOPIC] = []; + } + $errs[self::FIELD_TOPIC][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TRIGGER])) { + $v = $this->getTrigger(); + foreach($validationRules[self::FIELD_TRIGGER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_TRIGGER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TRIGGER])) { + $errs[self::FIELD_TRIGGER] = []; + } + $errs[self::FIELD_TRIGGER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USAGE])) { + $v = $this->getUsage(); + foreach($validationRules[self::FIELD_USAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_USAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USAGE])) { + $errs[self::FIELD_USAGE] = []; + } + $errs[self::FIELD_USAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SERVICE_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSlot.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSlot.php index 63d4ed6bff..7edd2f7725 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSlot.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSlot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -244,7 +244,7 @@ class FHIRSlot extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Slot * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSlot Constructor @@ -957,11 +957,315 @@ public function setStatus(FHIRSlotStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAppointmentType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getComment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOverbooked())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OVERBOOKED] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServiceCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_CATEGORY] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getServiceType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SERVICE_TYPE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getSpecialty())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SPECIALTY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStart())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_START] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_APPOINTMENT_TYPE])) { + $v = $this->getAppointmentType(); + foreach($validationRules[self::FIELD_APPOINTMENT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_APPOINTMENT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_APPOINTMENT_TYPE])) { + $errs[self::FIELD_APPOINTMENT_TYPE] = []; + } + $errs[self::FIELD_APPOINTMENT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COMMENT])) { + $v = $this->getComment(); + foreach($validationRules[self::FIELD_COMMENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_COMMENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMMENT])) { + $errs[self::FIELD_COMMENT] = []; + } + $errs[self::FIELD_COMMENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OVERBOOKED])) { + $v = $this->getOverbooked(); + foreach($validationRules[self::FIELD_OVERBOOKED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_OVERBOOKED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OVERBOOKED])) { + $errs[self::FIELD_OVERBOOKED] = []; + } + $errs[self::FIELD_OVERBOOKED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCHEDULE])) { + $v = $this->getSchedule(); + foreach($validationRules[self::FIELD_SCHEDULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_SCHEDULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCHEDULE])) { + $errs[self::FIELD_SCHEDULE] = []; + } + $errs[self::FIELD_SCHEDULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_CATEGORY])) { + $v = $this->getServiceCategory(); + foreach($validationRules[self::FIELD_SERVICE_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_SERVICE_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_CATEGORY])) { + $errs[self::FIELD_SERVICE_CATEGORY] = []; + } + $errs[self::FIELD_SERVICE_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SERVICE_TYPE])) { + $v = $this->getServiceType(); + foreach($validationRules[self::FIELD_SERVICE_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_SERVICE_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SERVICE_TYPE])) { + $errs[self::FIELD_SERVICE_TYPE] = []; + } + $errs[self::FIELD_SERVICE_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SPECIALTY])) { + $v = $this->getSpecialty(); + foreach($validationRules[self::FIELD_SPECIALTY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_SPECIALTY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SPECIALTY])) { + $errs[self::FIELD_SPECIALTY] = []; + } + $errs[self::FIELD_SPECIALTY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_START])) { + $v = $this->getStart(); + foreach($validationRules[self::FIELD_START] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_START, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_START])) { + $errs[self::FIELD_START] = []; + } + $errs[self::FIELD_START][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SLOT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSpecimen.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSpecimen.php index b664ca80f8..586a474939 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSpecimen.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSpecimen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -246,7 +246,7 @@ class FHIRSpecimen extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type Specimen * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSpecimen Constructor @@ -1012,11 +1012,338 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccessionIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCESSION_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getCollection())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COLLECTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContainer())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTAINER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getParent())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProcessing())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROCESSING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getReceivedTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RECEIVED_TIME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRequest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_REQUEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ACCESSION_IDENTIFIER])) { + $v = $this->getAccessionIdentifier(); + foreach($validationRules[self::FIELD_ACCESSION_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_ACCESSION_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ACCESSION_IDENTIFIER])) { + $errs[self::FIELD_ACCESSION_IDENTIFIER] = []; + } + $errs[self::FIELD_ACCESSION_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COLLECTION])) { + $v = $this->getCollection(); + foreach($validationRules[self::FIELD_COLLECTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_COLLECTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COLLECTION])) { + $errs[self::FIELD_COLLECTION] = []; + } + $errs[self::FIELD_COLLECTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINER])) { + $v = $this->getContainer(); + foreach($validationRules[self::FIELD_CONTAINER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_CONTAINER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINER])) { + $errs[self::FIELD_CONTAINER] = []; + } + $errs[self::FIELD_CONTAINER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARENT])) { + $v = $this->getParent(); + foreach($validationRules[self::FIELD_PARENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_PARENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARENT])) { + $errs[self::FIELD_PARENT] = []; + } + $errs[self::FIELD_PARENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROCESSING])) { + $v = $this->getProcessing(); + foreach($validationRules[self::FIELD_PROCESSING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_PROCESSING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROCESSING])) { + $errs[self::FIELD_PROCESSING] = []; + } + $errs[self::FIELD_PROCESSING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVED_TIME])) { + $v = $this->getReceivedTime(); + foreach($validationRules[self::FIELD_RECEIVED_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_RECEIVED_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVED_TIME])) { + $errs[self::FIELD_RECEIVED_TIME] = []; + } + $errs[self::FIELD_RECEIVED_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUEST])) { + $v = $this->getRequest(); + foreach($validationRules[self::FIELD_REQUEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_REQUEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUEST])) { + $errs[self::FIELD_REQUEST] = []; + } + $errs[self::FIELD_REQUEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUBJECT])) { + $v = $this->getSubject(); + foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_SUBJECT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUBJECT])) { + $errs[self::FIELD_SUBJECT] = []; + } + $errs[self::FIELD_SUBJECT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SPECIMEN, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php index ad384a319b..d60160f80d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -529,7 +529,7 @@ class FHIRStructureDefinition extends FHIRDomainResource implements PHPFHIRConta * Validation map for fields in type StructureDefinition * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRStructureDefinition Constructor @@ -2511,11 +2511,614 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAbstract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ABSTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBaseDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASE_DEFINITION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTEXT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getContextInvariant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTEXT_INVARIANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getContextType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDerivation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DERIVATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getDifferential())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIFFERENTIAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getFhirVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FHIR_VERSION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getKeyword())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_KEYWORD, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getKind())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_KIND] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getMapping())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSnapshot())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SNAPSHOT] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_ABSTRACT])) { + $v = $this->getAbstract(); + foreach($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_ABSTRACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ABSTRACT])) { + $errs[self::FIELD_ABSTRACT] = []; + } + $errs[self::FIELD_ABSTRACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASE_DEFINITION])) { + $v = $this->getBaseDefinition(); + foreach($validationRules[self::FIELD_BASE_DEFINITION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_BASE_DEFINITION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASE_DEFINITION])) { + $errs[self::FIELD_BASE_DEFINITION] = []; + } + $errs[self::FIELD_BASE_DEFINITION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT_INVARIANT])) { + $v = $this->getContextInvariant(); + foreach($validationRules[self::FIELD_CONTEXT_INVARIANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONTEXT_INVARIANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT_INVARIANT])) { + $errs[self::FIELD_CONTEXT_INVARIANT] = []; + } + $errs[self::FIELD_CONTEXT_INVARIANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT_TYPE])) { + $v = $this->getContextType(); + foreach($validationRules[self::FIELD_CONTEXT_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_CONTEXT_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT_TYPE])) { + $errs[self::FIELD_CONTEXT_TYPE] = []; + } + $errs[self::FIELD_CONTEXT_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DERIVATION])) { + $v = $this->getDerivation(); + foreach($validationRules[self::FIELD_DERIVATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DERIVATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DERIVATION])) { + $errs[self::FIELD_DERIVATION] = []; + } + $errs[self::FIELD_DERIVATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DIFFERENTIAL])) { + $v = $this->getDifferential(); + foreach($validationRules[self::FIELD_DIFFERENTIAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_DIFFERENTIAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DIFFERENTIAL])) { + $errs[self::FIELD_DIFFERENTIAL] = []; + } + $errs[self::FIELD_DIFFERENTIAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FHIR_VERSION])) { + $v = $this->getFhirVersion(); + foreach($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_FHIR_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FHIR_VERSION])) { + $errs[self::FIELD_FHIR_VERSION] = []; + } + $errs[self::FIELD_FHIR_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KEYWORD])) { + $v = $this->getKeyword(); + foreach($validationRules[self::FIELD_KEYWORD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_KEYWORD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KEYWORD])) { + $errs[self::FIELD_KEYWORD] = []; + } + $errs[self::FIELD_KEYWORD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_KIND])) { + $v = $this->getKind(); + foreach($validationRules[self::FIELD_KIND] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_KIND, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_KIND])) { + $errs[self::FIELD_KIND] = []; + } + $errs[self::FIELD_KIND][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MAPPING])) { + $v = $this->getMapping(); + foreach($validationRules[self::FIELD_MAPPING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_MAPPING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MAPPING])) { + $errs[self::FIELD_MAPPING] = []; + } + $errs[self::FIELD_MAPPING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SNAPSHOT])) { + $v = $this->getSnapshot(); + foreach($validationRules[self::FIELD_SNAPSHOT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_SNAPSHOT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SNAPSHOT])) { + $errs[self::FIELD_SNAPSHOT] = []; + } + $errs[self::FIELD_SNAPSHOT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureMap.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureMap.php index 465d356168..b9456af84c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureMap.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -373,7 +373,7 @@ class FHIRStructureMap extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type StructureMap * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_GROUP => [ PHPFHIRConstants::VALIDATE_MIN_OCCURS => 1, ], @@ -1736,11 +1736,442 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getGroup())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_GROUP, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getImport())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IMPORT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getStructure())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_STRUCTURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP])) { + $v = $this->getGroup(); + foreach($validationRules[self::FIELD_GROUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_GROUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP])) { + $errs[self::FIELD_GROUP] = []; + } + $errs[self::FIELD_GROUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPORT])) { + $v = $this->getImport(); + foreach($validationRules[self::FIELD_IMPORT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_IMPORT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPORT])) { + $errs[self::FIELD_IMPORT] = []; + } + $errs[self::FIELD_IMPORT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STRUCTURE])) { + $v = $this->getStructure(); + foreach($validationRules[self::FIELD_STRUCTURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_STRUCTURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STRUCTURE])) { + $errs[self::FIELD_STRUCTURE] = []; + } + $errs[self::FIELD_STRUCTURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubscription.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubscription.php index 75424f66ff..b613c3bd9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubscription.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubscription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -207,7 +207,7 @@ class FHIRSubscription extends FHIRDomainResource implements PHPFHIRContainedTyp * Validation map for fields in type Subscription * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubscription Constructor @@ -761,11 +761,262 @@ public function setTag(array $tag = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getChannel())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHANNEL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCriteria())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CRITERIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnd())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_END] = $fieldErrs; + } + } + if (null !== ($v = $this->getError())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ERROR] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTag())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TAG, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_CHANNEL])) { + $v = $this->getChannel(); + foreach($validationRules[self::FIELD_CHANNEL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_CHANNEL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CHANNEL])) { + $errs[self::FIELD_CHANNEL] = []; + } + $errs[self::FIELD_CHANNEL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CRITERIA])) { + $v = $this->getCriteria(); + foreach($validationRules[self::FIELD_CRITERIA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_CRITERIA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CRITERIA])) { + $errs[self::FIELD_CRITERIA] = []; + } + $errs[self::FIELD_CRITERIA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_END])) { + $v = $this->getEnd(); + foreach($validationRules[self::FIELD_END] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_END, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_END])) { + $errs[self::FIELD_END] = []; + } + $errs[self::FIELD_END][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ERROR])) { + $v = $this->getError(); + foreach($validationRules[self::FIELD_ERROR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_ERROR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ERROR])) { + $errs[self::FIELD_ERROR] = []; + } + $errs[self::FIELD_ERROR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TAG])) { + $v = $this->getTag(); + foreach($validationRules[self::FIELD_TAG] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION, self::FIELD_TAG, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TAG])) { + $errs[self::FIELD_TAG] = []; + } + $errs[self::FIELD_TAG][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubstance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubstance.php index 9e195aed7f..0d98947c65 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -178,7 +178,7 @@ class FHIRSubstance extends FHIRDomainResource implements PHPFHIRContainedTypeIn * Validation map for fields in type Substance * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSubstance Constructor @@ -673,11 +673,249 @@ public function setStatus(FHIRFHIRSubstanceStatus $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getCategory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getIngredient())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INGREDIENT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInstance())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INSTANCE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INGREDIENT])) { + $v = $this->getIngredient(); + foreach($validationRules[self::FIELD_INGREDIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_INGREDIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INGREDIENT])) { + $errs[self::FIELD_INGREDIENT] = []; + } + $errs[self::FIELD_INGREDIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INSTANCE])) { + $v = $this->getInstance(); + foreach($validationRules[self::FIELD_INSTANCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_INSTANCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INSTANCE])) { + $errs[self::FIELD_INSTANCE] = []; + } + $errs[self::FIELD_INSTANCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUBSTANCE, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php index 661d314d42..6319df78bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -259,7 +259,7 @@ class FHIRSupplyDelivery extends FHIRDomainResource implements PHPFHIRContainedT * Validation map for fields in type SupplyDelivery * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyDelivery Constructor @@ -954,11 +954,349 @@ public function setType(FHIRCodeableConcept $type = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() { - $errs = parent::_validationErrors(); + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() + { + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getDestination())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESTINATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getReceiver())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RECEIVER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getSuppliedItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLIED_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getType())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TYPE] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RECEIVER])) { + $v = $this->getReceiver(); + foreach($validationRules[self::FIELD_RECEIVER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_RECEIVER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RECEIVER])) { + $errs[self::FIELD_RECEIVER] = []; + } + $errs[self::FIELD_RECEIVER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIED_ITEM])) { + $v = $this->getSuppliedItem(); + foreach($validationRules[self::FIELD_SUPPLIED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_SUPPLIED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIED_ITEM])) { + $errs[self::FIELD_SUPPLIED_ITEM] = []; + } + $errs[self::FIELD_SUPPLIED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIER])) { + $v = $this->getSupplier(); + foreach($validationRules[self::FIELD_SUPPLIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_SUPPLIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIER])) { + $errs[self::FIELD_SUPPLIER] = []; + } + $errs[self::FIELD_SUPPLIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TYPE])) { + $v = $this->getType(); + foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY, self::FIELD_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TYPE])) { + $errs[self::FIELD_TYPE] = []; + } + $errs[self::FIELD_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php index 38e2a67122..bc178e8503 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -292,7 +292,7 @@ class FHIRSupplyRequest extends FHIRDomainResource implements PHPFHIRContainedTy * Validation map for fields in type SupplyRequest * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRSupplyRequest Constructor @@ -1035,11 +1035,379 @@ public function setSupplier(array $supplier = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if (null !== ($v = $this->getCategory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CATEGORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeliverFrom())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DELIVER_FROM] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeliverTo())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DELIVER_TO] = $fieldErrs; + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceDateTime())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrencePeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getOccurrenceTiming())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OCCURRENCE_TIMING] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrderedItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORDERED_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getSupplier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_SUPPLIER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CATEGORY])) { + $v = $this->getCategory(); + foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_CATEGORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CATEGORY])) { + $errs[self::FIELD_CATEGORY] = []; + } + $errs[self::FIELD_CATEGORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DELIVER_FROM])) { + $v = $this->getDeliverFrom(); + foreach($validationRules[self::FIELD_DELIVER_FROM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_DELIVER_FROM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DELIVER_FROM])) { + $errs[self::FIELD_DELIVER_FROM] = []; + } + $errs[self::FIELD_DELIVER_FROM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DELIVER_TO])) { + $v = $this->getDeliverTo(); + foreach($validationRules[self::FIELD_DELIVER_TO] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_DELIVER_TO, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DELIVER_TO])) { + $errs[self::FIELD_DELIVER_TO] = []; + } + $errs[self::FIELD_DELIVER_TO][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) { + $v = $this->getOccurrenceDateTime(); + foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) { + $errs[self::FIELD_OCCURRENCE_DATE_TIME] = []; + } + $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_PERIOD])) { + $v = $this->getOccurrencePeriod(); + foreach($validationRules[self::FIELD_OCCURRENCE_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_OCCURRENCE_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_PERIOD])) { + $errs[self::FIELD_OCCURRENCE_PERIOD] = []; + } + $errs[self::FIELD_OCCURRENCE_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OCCURRENCE_TIMING])) { + $v = $this->getOccurrenceTiming(); + foreach($validationRules[self::FIELD_OCCURRENCE_TIMING] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_OCCURRENCE_TIMING, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OCCURRENCE_TIMING])) { + $errs[self::FIELD_OCCURRENCE_TIMING] = []; + } + $errs[self::FIELD_OCCURRENCE_TIMING][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORDERED_ITEM])) { + $v = $this->getOrderedItem(); + foreach($validationRules[self::FIELD_ORDERED_ITEM] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_ORDERED_ITEM, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORDERED_ITEM])) { + $errs[self::FIELD_ORDERED_ITEM] = []; + } + $errs[self::FIELD_ORDERED_ITEM][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SUPPLIER])) { + $v = $this->getSupplier(); + foreach($validationRules[self::FIELD_SUPPLIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST, self::FIELD_SUPPLIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SUPPLIER])) { + $errs[self::FIELD_SUPPLIER] = []; + } + $errs[self::FIELD_SUPPLIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTask.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTask.php index 224d659b90..6abd36c050 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTask.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTask.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -464,7 +464,7 @@ class FHIRTask extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Task * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTask Constructor @@ -2035,11 +2035,614 @@ public function setStatusReason(FHIRCodeableConcept $statusReason = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAuthoredOn())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUTHORED_ON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getBasedOn())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getBusinessStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUSINESS_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getCode())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE] = $fieldErrs; + } + } + if (null !== ($v = $this->getContext())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTEXT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDefinitionUri())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEFINITION_URI] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExecutionPeriod())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXECUTION_PERIOD] = $fieldErrs; + } + } + if (null !== ($v = $this->getFocus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOCUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getFor())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FOR] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroupIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getInput())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_INPUT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIntent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_INTENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getLastModified())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LAST_MODIFIED] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getNote())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getOutput())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_OUTPUT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getOwner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OWNER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getPartOf())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getPerformerType())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PERFORMER_TYPE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPriority())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRIORITY] = $fieldErrs; + } + } + if (null !== ($v = $this->getReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRelevantHistory())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RELEVANT_HISTORY, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getRequester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUESTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getRestriction())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESTRICTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatusReason())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS_REASON] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_AUTHORED_ON])) { + $v = $this->getAuthoredOn(); + foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_AUTHORED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_AUTHORED_ON])) { + $errs[self::FIELD_AUTHORED_ON] = []; + } + $errs[self::FIELD_AUTHORED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BASED_ON])) { + $v = $this->getBasedOn(); + foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_BASED_ON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BASED_ON])) { + $errs[self::FIELD_BASED_ON] = []; + } + $errs[self::FIELD_BASED_ON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_BUSINESS_STATUS])) { + $v = $this->getBusinessStatus(); + foreach($validationRules[self::FIELD_BUSINESS_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_BUSINESS_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_BUSINESS_STATUS])) { + $errs[self::FIELD_BUSINESS_STATUS] = []; + } + $errs[self::FIELD_BUSINESS_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CODE])) { + $v = $this->getCode(); + foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_CODE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CODE])) { + $errs[self::FIELD_CODE] = []; + } + $errs[self::FIELD_CODE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTEXT])) { + $v = $this->getContext(); + foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTEXT])) { + $errs[self::FIELD_CONTEXT] = []; + } + $errs[self::FIELD_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_REFERENCE])) { + $v = $this->getDefinitionReference(); + foreach($validationRules[self::FIELD_DEFINITION_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_DEFINITION_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_REFERENCE])) { + $errs[self::FIELD_DEFINITION_REFERENCE] = []; + } + $errs[self::FIELD_DEFINITION_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DEFINITION_URI])) { + $v = $this->getDefinitionUri(); + foreach($validationRules[self::FIELD_DEFINITION_URI] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_DEFINITION_URI, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DEFINITION_URI])) { + $errs[self::FIELD_DEFINITION_URI] = []; + } + $errs[self::FIELD_DEFINITION_URI][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXECUTION_PERIOD])) { + $v = $this->getExecutionPeriod(); + foreach($validationRules[self::FIELD_EXECUTION_PERIOD] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_EXECUTION_PERIOD, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXECUTION_PERIOD])) { + $errs[self::FIELD_EXECUTION_PERIOD] = []; + } + $errs[self::FIELD_EXECUTION_PERIOD][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOCUS])) { + $v = $this->getFocus(); + foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_FOCUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOCUS])) { + $errs[self::FIELD_FOCUS] = []; + } + $errs[self::FIELD_FOCUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FOR])) { + $v = $this->getFor(); + foreach($validationRules[self::FIELD_FOR] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_FOR, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FOR])) { + $errs[self::FIELD_FOR] = []; + } + $errs[self::FIELD_FOR][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) { + $v = $this->getGroupIdentifier(); + foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) { + $errs[self::FIELD_GROUP_IDENTIFIER] = []; + } + $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INPUT])) { + $v = $this->getInput(); + foreach($validationRules[self::FIELD_INPUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_INPUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INPUT])) { + $errs[self::FIELD_INPUT] = []; + } + $errs[self::FIELD_INPUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_INTENT])) { + $v = $this->getIntent(); + foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_INTENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_INTENT])) { + $errs[self::FIELD_INTENT] = []; + } + $errs[self::FIELD_INTENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LAST_MODIFIED])) { + $v = $this->getLastModified(); + foreach($validationRules[self::FIELD_LAST_MODIFIED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_LAST_MODIFIED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LAST_MODIFIED])) { + $errs[self::FIELD_LAST_MODIFIED] = []; + } + $errs[self::FIELD_LAST_MODIFIED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NOTE])) { + $v = $this->getNote(); + foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_NOTE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NOTE])) { + $errs[self::FIELD_NOTE] = []; + } + $errs[self::FIELD_NOTE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OUTPUT])) { + $v = $this->getOutput(); + foreach($validationRules[self::FIELD_OUTPUT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_OUTPUT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OUTPUT])) { + $errs[self::FIELD_OUTPUT] = []; + } + $errs[self::FIELD_OUTPUT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_OWNER])) { + $v = $this->getOwner(); + foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_OWNER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_OWNER])) { + $errs[self::FIELD_OWNER] = []; + } + $errs[self::FIELD_OWNER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PART_OF])) { + $v = $this->getPartOf(); + foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_PART_OF, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PART_OF])) { + $errs[self::FIELD_PART_OF] = []; + } + $errs[self::FIELD_PART_OF][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PERFORMER_TYPE])) { + $v = $this->getPerformerType(); + foreach($validationRules[self::FIELD_PERFORMER_TYPE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_PERFORMER_TYPE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PERFORMER_TYPE])) { + $errs[self::FIELD_PERFORMER_TYPE] = []; + } + $errs[self::FIELD_PERFORMER_TYPE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRIORITY])) { + $v = $this->getPriority(); + foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_PRIORITY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRIORITY])) { + $errs[self::FIELD_PRIORITY] = []; + } + $errs[self::FIELD_PRIORITY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON])) { + $v = $this->getReason(); + foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON])) { + $errs[self::FIELD_REASON] = []; + } + $errs[self::FIELD_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RELEVANT_HISTORY])) { + $v = $this->getRelevantHistory(); + foreach($validationRules[self::FIELD_RELEVANT_HISTORY] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_RELEVANT_HISTORY, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RELEVANT_HISTORY])) { + $errs[self::FIELD_RELEVANT_HISTORY] = []; + } + $errs[self::FIELD_RELEVANT_HISTORY][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REQUESTER])) { + $v = $this->getRequester(); + foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_REQUESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REQUESTER])) { + $errs[self::FIELD_REQUESTER] = []; + } + $errs[self::FIELD_REQUESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESTRICTION])) { + $v = $this->getRestriction(); + foreach($validationRules[self::FIELD_RESTRICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_RESTRICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESTRICTION])) { + $errs[self::FIELD_RESTRICTION] = []; + } + $errs[self::FIELD_RESTRICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS_REASON])) { + $v = $this->getStatusReason(); + foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_STATUS_REASON, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS_REASON])) { + $errs[self::FIELD_STATUS_REASON] = []; + } + $errs[self::FIELD_STATUS_REASON][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestReport.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestReport.php index 83ccfa5be0..a7cfd8db8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestReport.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -247,7 +247,7 @@ class FHIRTestReport extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type TestReport * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestReport Constructor @@ -939,11 +939,330 @@ public function setTester($tester = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if (null !== ($v = $this->getIssued())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ISSUED] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getParticipant())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARTICIPANT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getResult())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESULT] = $fieldErrs; + } + } + if (null !== ($v = $this->getScore())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCORE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSetup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SETUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTeardown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEARDOWN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTestScript())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEST_SCRIPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTester())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TESTER] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ISSUED])) { + $v = $this->getIssued(); + foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_ISSUED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ISSUED])) { + $errs[self::FIELD_ISSUED] = []; + } + $errs[self::FIELD_ISSUED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PARTICIPANT])) { + $v = $this->getParticipant(); + foreach($validationRules[self::FIELD_PARTICIPANT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_PARTICIPANT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARTICIPANT])) { + $errs[self::FIELD_PARTICIPANT] = []; + } + $errs[self::FIELD_PARTICIPANT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RESULT])) { + $v = $this->getResult(); + foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_RESULT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RESULT])) { + $errs[self::FIELD_RESULT] = []; + } + $errs[self::FIELD_RESULT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SCORE])) { + $v = $this->getScore(); + foreach($validationRules[self::FIELD_SCORE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_SCORE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SCORE])) { + $errs[self::FIELD_SCORE] = []; + } + $errs[self::FIELD_SCORE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SETUP])) { + $v = $this->getSetup(); + foreach($validationRules[self::FIELD_SETUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_SETUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SETUP])) { + $errs[self::FIELD_SETUP] = []; + } + $errs[self::FIELD_SETUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEARDOWN])) { + $v = $this->getTeardown(); + foreach($validationRules[self::FIELD_TEARDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_TEARDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEARDOWN])) { + $errs[self::FIELD_TEARDOWN] = []; + } + $errs[self::FIELD_TEARDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEST])) { + $v = $this->getTest(); + foreach($validationRules[self::FIELD_TEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_TEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEST])) { + $errs[self::FIELD_TEST] = []; + } + $errs[self::FIELD_TEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEST_SCRIPT])) { + $v = $this->getTestScript(); + foreach($validationRules[self::FIELD_TEST_SCRIPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_TEST_SCRIPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEST_SCRIPT])) { + $errs[self::FIELD_TEST_SCRIPT] = []; + } + $errs[self::FIELD_TEST_SCRIPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TESTER])) { + $v = $this->getTester(); + foreach($validationRules[self::FIELD_TESTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_REPORT, self::FIELD_TESTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TESTER])) { + $errs[self::FIELD_TESTER] = []; + } + $errs[self::FIELD_TESTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestScript.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestScript.php index ca5181ddc7..8e26b774c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestScript.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestScript.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -475,7 +475,7 @@ class FHIRTestScript extends FHIRDomainResource implements PHPFHIRContainedTypeI * Validation map for fields in type TestScript * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRTestScript Constructor @@ -2242,11 +2242,586 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDestination())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DESTINATION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getFixture())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_FIXTURE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getIdentifier())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IDENTIFIER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getMetadata())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_METADATA] = $fieldErrs; + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getOrigin())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_ORIGIN, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getProfile())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PROFILE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getRule())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULE, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getRuleset())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_RULESET, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getSetup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SETUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTeardown())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEARDOWN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getTest())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_TEST, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if ([] !== ($vs = $this->getVariable())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_VARIABLE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESTINATION])) { + $v = $this->getDestination(); + foreach($validationRules[self::FIELD_DESTINATION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_DESTINATION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESTINATION])) { + $errs[self::FIELD_DESTINATION] = []; + } + $errs[self::FIELD_DESTINATION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_FIXTURE])) { + $v = $this->getFixture(); + foreach($validationRules[self::FIELD_FIXTURE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_FIXTURE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_FIXTURE])) { + $errs[self::FIELD_FIXTURE] = []; + } + $errs[self::FIELD_FIXTURE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_METADATA])) { + $v = $this->getMetadata(); + foreach($validationRules[self::FIELD_METADATA] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_METADATA, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_METADATA])) { + $errs[self::FIELD_METADATA] = []; + } + $errs[self::FIELD_METADATA][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ORIGIN])) { + $v = $this->getOrigin(); + foreach($validationRules[self::FIELD_ORIGIN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_ORIGIN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ORIGIN])) { + $errs[self::FIELD_ORIGIN] = []; + } + $errs[self::FIELD_ORIGIN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PROFILE])) { + $v = $this->getProfile(); + foreach($validationRules[self::FIELD_PROFILE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_PROFILE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PROFILE])) { + $errs[self::FIELD_PROFILE] = []; + } + $errs[self::FIELD_PROFILE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULE])) { + $v = $this->getRule(); + foreach($validationRules[self::FIELD_RULE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_RULE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULE])) { + $errs[self::FIELD_RULE] = []; + } + $errs[self::FIELD_RULE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_RULESET])) { + $v = $this->getRuleset(); + foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_RULESET, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_RULESET])) { + $errs[self::FIELD_RULESET] = []; + } + $errs[self::FIELD_RULESET][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_SETUP])) { + $v = $this->getSetup(); + foreach($validationRules[self::FIELD_SETUP] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_SETUP, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_SETUP])) { + $errs[self::FIELD_SETUP] = []; + } + $errs[self::FIELD_SETUP][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEARDOWN])) { + $v = $this->getTeardown(); + foreach($validationRules[self::FIELD_TEARDOWN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_TEARDOWN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEARDOWN])) { + $errs[self::FIELD_TEARDOWN] = []; + } + $errs[self::FIELD_TEARDOWN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEST])) { + $v = $this->getTest(); + foreach($validationRules[self::FIELD_TEST] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_TEST, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEST])) { + $errs[self::FIELD_TEST] = []; + } + $errs[self::FIELD_TEST][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VARIABLE])) { + $v = $this->getVariable(); + foreach($validationRules[self::FIELD_VARIABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_VARIABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VARIABLE])) { + $errs[self::FIELD_VARIABLE] = []; + } + $errs[self::FIELD_VARIABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRValueSet.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRValueSet.php index 01c407b070..80c91c3ce9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRValueSet.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRValueSet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -385,7 +385,7 @@ class FHIRValueSet extends FHIRDomainResource implements PHPFHIRContainedTypeInt * Validation map for fields in type ValueSet * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRValueSet Constructor @@ -1690,11 +1690,453 @@ public function setVersion($version = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getCompose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getContact())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getCopyright())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COPYRIGHT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDate())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DESCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpansion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPANSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getExperimental())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPERIMENTAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getExtensible())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXTENSIBLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getImmutable())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUTABLE] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getJurisdiction())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getName())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAME] = $fieldErrs; + } + } + if (null !== ($v = $this->getPublisher())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PUBLISHER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPurpose())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PURPOSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (null !== ($v = $this->getTitle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TITLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getUrl())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_URL] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getUseContext())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getVersion())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VERSION] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_COMPOSE])) { + $v = $this->getCompose(); + foreach($validationRules[self::FIELD_COMPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_COMPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COMPOSE])) { + $errs[self::FIELD_COMPOSE] = []; + } + $errs[self::FIELD_COMPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTACT])) { + $v = $this->getContact(); + foreach($validationRules[self::FIELD_CONTACT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_CONTACT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTACT])) { + $errs[self::FIELD_CONTACT] = []; + } + $errs[self::FIELD_CONTACT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_COPYRIGHT])) { + $v = $this->getCopyright(); + foreach($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_COPYRIGHT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_COPYRIGHT])) { + $errs[self::FIELD_COPYRIGHT] = []; + } + $errs[self::FIELD_COPYRIGHT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DATE])) { + $v = $this->getDate(); + foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_DATE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE])) { + $errs[self::FIELD_DATE] = []; + } + $errs[self::FIELD_DATE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DESCRIPTION])) { + $v = $this->getDescription(); + foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_DESCRIPTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DESCRIPTION])) { + $errs[self::FIELD_DESCRIPTION] = []; + } + $errs[self::FIELD_DESCRIPTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPANSION])) { + $v = $this->getExpansion(); + foreach($validationRules[self::FIELD_EXPANSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXPANSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPANSION])) { + $errs[self::FIELD_EXPANSION] = []; + } + $errs[self::FIELD_EXPANSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXPERIMENTAL])) { + $v = $this->getExperimental(); + foreach($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXPERIMENTAL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXPERIMENTAL])) { + $errs[self::FIELD_EXPERIMENTAL] = []; + } + $errs[self::FIELD_EXPERIMENTAL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSIBLE])) { + $v = $this->getExtensible(); + foreach($validationRules[self::FIELD_EXTENSIBLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_EXTENSIBLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSIBLE])) { + $errs[self::FIELD_EXTENSIBLE] = []; + } + $errs[self::FIELD_EXTENSIBLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMMUTABLE])) { + $v = $this->getImmutable(); + foreach($validationRules[self::FIELD_IMMUTABLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_IMMUTABLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMMUTABLE])) { + $errs[self::FIELD_IMMUTABLE] = []; + } + $errs[self::FIELD_IMMUTABLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_JURISDICTION])) { + $v = $this->getJurisdiction(); + foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_JURISDICTION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_JURISDICTION])) { + $errs[self::FIELD_JURISDICTION] = []; + } + $errs[self::FIELD_JURISDICTION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_NAME])) { + $v = $this->getName(); + foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_NAME, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_NAME])) { + $errs[self::FIELD_NAME] = []; + } + $errs[self::FIELD_NAME][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PUBLISHER])) { + $v = $this->getPublisher(); + foreach($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_PUBLISHER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PUBLISHER])) { + $errs[self::FIELD_PUBLISHER] = []; + } + $errs[self::FIELD_PUBLISHER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PURPOSE])) { + $v = $this->getPurpose(); + foreach($validationRules[self::FIELD_PURPOSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_PURPOSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PURPOSE])) { + $errs[self::FIELD_PURPOSE] = []; + } + $errs[self::FIELD_PURPOSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TITLE])) { + $v = $this->getTitle(); + foreach($validationRules[self::FIELD_TITLE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_TITLE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TITLE])) { + $errs[self::FIELD_TITLE] = []; + } + $errs[self::FIELD_TITLE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_URL])) { + $v = $this->getUrl(); + foreach($validationRules[self::FIELD_URL] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_URL, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_URL])) { + $errs[self::FIELD_URL] = []; + } + $errs[self::FIELD_URL][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_USE_CONTEXT])) { + $v = $this->getUseContext(); + foreach($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_USE_CONTEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_USE_CONTEXT])) { + $errs[self::FIELD_USE_CONTEXT] = []; + } + $errs[self::FIELD_USE_CONTEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_VERSION])) { + $v = $this->getVersion(); + foreach($validationRules[self::FIELD_VERSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VALUE_SET, self::FIELD_VERSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VERSION])) { + $errs[self::FIELD_VERSION] = []; + } + $errs[self::FIELD_VERSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php index bd88d2f7b1..0070e88f03 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -206,7 +206,7 @@ class FHIRVisionPrescription extends FHIRDomainResource implements PHPFHIRContai * Validation map for fields in type VisionPrescription * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRVisionPrescription Constructor @@ -709,11 +709,279 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getDateWritten())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATE_WRITTEN] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getDispense())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_DISPENSE, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if ([] !== ($vs = $this->getIdentifier())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs; + } + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPrescriber())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRESCRIBER] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonCodeableConcept())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getReasonReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REASON_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getStatus())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STATUS] = $fieldErrs; + } + } + if (isset($validationRules[self::FIELD_DATE_WRITTEN])) { + $v = $this->getDateWritten(); + foreach($validationRules[self::FIELD_DATE_WRITTEN] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_DATE_WRITTEN, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DATE_WRITTEN])) { + $errs[self::FIELD_DATE_WRITTEN] = []; + } + $errs[self::FIELD_DATE_WRITTEN][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_DISPENSE])) { + $v = $this->getDispense(); + foreach($validationRules[self::FIELD_DISPENSE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_DISPENSE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_DISPENSE])) { + $errs[self::FIELD_DISPENSE] = []; + } + $errs[self::FIELD_DISPENSE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ENCOUNTER])) { + $v = $this->getEncounter(); + foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_ENCOUNTER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ENCOUNTER])) { + $errs[self::FIELD_ENCOUNTER] = []; + } + $errs[self::FIELD_ENCOUNTER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IDENTIFIER])) { + $v = $this->getIdentifier(); + foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_IDENTIFIER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IDENTIFIER])) { + $errs[self::FIELD_IDENTIFIER] = []; + } + $errs[self::FIELD_IDENTIFIER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PATIENT])) { + $v = $this->getPatient(); + foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_PATIENT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PATIENT])) { + $errs[self::FIELD_PATIENT] = []; + } + $errs[self::FIELD_PATIENT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_PRESCRIBER])) { + $v = $this->getPrescriber(); + foreach($validationRules[self::FIELD_PRESCRIBER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_PRESCRIBER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PRESCRIBER])) { + $errs[self::FIELD_PRESCRIBER] = []; + } + $errs[self::FIELD_PRESCRIBER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $v = $this->getReasonCodeableConcept(); + foreach($validationRules[self::FIELD_REASON_CODEABLE_CONCEPT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_REASON_CODEABLE_CONCEPT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_CODEABLE_CONCEPT])) { + $errs[self::FIELD_REASON_CODEABLE_CONCEPT] = []; + } + $errs[self::FIELD_REASON_CODEABLE_CONCEPT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_REASON_REFERENCE])) { + $v = $this->getReasonReference(); + foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_REASON_REFERENCE])) { + $errs[self::FIELD_REASON_REFERENCE] = []; + } + $errs[self::FIELD_REASON_REFERENCE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_STATUS])) { + $v = $this->getStatus(); + foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_VISION_PRESCRIPTION, self::FIELD_STATUS, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_STATUS])) { + $errs[self::FIELD_STATUS] = []; + } + $errs[self::FIELD_STATUS][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_CONTAINED])) { + $v = $this->getContained(); + foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_CONTAINED])) { + $errs[self::FIELD_CONTAINED] = []; + } + $errs[self::FIELD_CONTAINED][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_EXTENSION])) { + $v = $this->getExtension(); + foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_EXTENSION])) { + $errs[self::FIELD_EXTENSION] = []; + } + $errs[self::FIELD_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) { + $v = $this->getModifierExtension(); + foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) { + $errs[self::FIELD_MODIFIER_EXTENSION] = []; + } + $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_TEXT])) { + $v = $this->getText(); + foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_TEXT])) { + $errs[self::FIELD_TEXT] = []; + } + $errs[self::FIELD_TEXT][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRParameters.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRParameters.php index 22dbe6ccd7..39761a142f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRParameters.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRParameters.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRParameters extends FHIRResource implements PHPFHIRContainedTypeInterfa * Validation map for fields in type Parameters * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRParameters Constructor @@ -224,11 +224,93 @@ public function setParameter(array $parameter = []) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { - $errs = parent::_validationErrors(); + $errs = parent::_getValidationErrors(); + $validationRules = $this->_getValidationRules(); + if ([] !== ($vs = $this->getParameter())) { + foreach($vs as $i => $v) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[sprintf('%s.%d', self::FIELD_PARAMETER, $i)] = $fieldErrs; + } + } + } + if (isset($validationRules[self::FIELD_PARAMETER])) { + $v = $this->getParameter(); + foreach($validationRules[self::FIELD_PARAMETER] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_PARAMETERS, self::FIELD_PARAMETER, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_PARAMETER])) { + $errs[self::FIELD_PARAMETER] = []; + } + $errs[self::FIELD_PARAMETER][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_ID])) { + $v = $this->getId(); + foreach($validationRules[self::FIELD_ID] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_ID])) { + $errs[self::FIELD_ID] = []; + } + $errs[self::FIELD_ID][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) { + $v = $this->getImplicitRules(); + foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_IMPLICIT_RULES])) { + $errs[self::FIELD_IMPLICIT_RULES] = []; + } + $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_LANGUAGE])) { + $v = $this->getLanguage(); + foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_LANGUAGE])) { + $errs[self::FIELD_LANGUAGE] = []; + } + $errs[self::FIELD_LANGUAGE][$rule] = $err; + } + } + } + if (isset($validationRules[self::FIELD_META])) { + $v = $this->getMeta(); + foreach($validationRules[self::FIELD_META] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_META])) { + $errs[self::FIELD_META] = []; + } + $errs[self::FIELD_META][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResourceContainer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResourceContainer.php index 64ed7e4990..dd3897c405 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResourceContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResourceContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -187,6 +187,7 @@ class FHIRResourceContainer implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterface { use PHPFHIRCommentContainerTrait; + use PHPFHIRValidationAssertionsTrait; // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_CONTAINER; @@ -1457,7 +1458,7 @@ class FHIRResourceContainer implements PHPFHIRCommentContainerInterface, PHPFHIR * Validation map for fields in type ResourceContainer * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRResourceContainer Constructor @@ -5565,11 +5566,611 @@ public function setVisionPrescription(FHIRVisionPrescription $VisionPrescription } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * + * @return array + */ + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * * @return array */ - public function _validationErrors() + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (null !== ($v = $this->getAccount())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACCOUNT] = $fieldErrs; + } + } + if (null !== ($v = $this->getActivityDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ACTIVITY_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getAdverseEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ADVERSE_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAllergyIntolerance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ALLERGY_INTOLERANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getAppointmentResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_APPOINTMENT_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getAuditEvent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_AUDIT_EVENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getBasic())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BASIC] = $fieldErrs; + } + } + if (null !== ($v = $this->getBinary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BINARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getBodySite())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BODY_SITE] = $fieldErrs; + } + } + if (null !== ($v = $this->getBundle())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_BUNDLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getCapabilityStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CAPABILITY_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCarePlan())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARE_PLAN] = $fieldErrs; + } + } + if (null !== ($v = $this->getCareTeam())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CARE_TEAM] = $fieldErrs; + } + } + if (null !== ($v = $this->getChargeItem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CHARGE_ITEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaim())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM] = $fieldErrs; + } + } + if (null !== ($v = $this->getClaimResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLAIM_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getClinicalImpression())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CLINICAL_IMPRESSION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCodeSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CODE_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getCommunication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMUNICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getCommunicationRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMMUNICATION_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getCompartmentDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPARTMENT_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getComposition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COMPOSITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getConceptMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONCEPT_MAP] = $fieldErrs; + } + } + if (null !== ($v = $this->getCondition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONDITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getConsent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONSENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getContract())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_CONTRACT] = $fieldErrs; + } + } + if (null !== ($v = $this->getCoverage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_COVERAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDataElement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DATA_ELEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDetectedIssue())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DETECTED_ISSUE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDevice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceComponent())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_COMPONENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceMetric())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_METRIC] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getDeviceUseStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DEVICE_USE_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDiagnosticReport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DIAGNOSTIC_REPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentManifest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT_MANIFEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getDocumentReference())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_DOCUMENT_REFERENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEligibilityRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELIGIBILITY_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getEligibilityResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ELIGIBILITY_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEncounter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENCOUNTER] = $fieldErrs; + } + } + if (null !== ($v = $this->getEndpoint())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENDPOINT] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnrollmentRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENROLLMENT_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getEnrollmentResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ENROLLMENT_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getEpisodeOfCare())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EPISODE_OF_CARE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExpansionProfile())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPANSION_PROFILE] = $fieldErrs; + } + } + if (null !== ($v = $this->getExplanationOfBenefit())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_EXPLANATION_OF_BENEFIT] = $fieldErrs; + } + } + if (null !== ($v = $this->getFamilyMemberHistory())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FAMILY_MEMBER_HISTORY] = $fieldErrs; + } + } + if (null !== ($v = $this->getFlag())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_FLAG] = $fieldErrs; + } + } + if (null !== ($v = $this->getGoal())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GOAL] = $fieldErrs; + } + } + if (null !== ($v = $this->getGraphDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GRAPH_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getGuidanceResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_GUIDANCE_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getHealthcareService())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_HEALTHCARE_SERVICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getImagingManifest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMAGING_MANIFEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getImagingStudy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMAGING_STUDY] = $fieldErrs; + } + } + if (null !== ($v = $this->getImmunization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUNIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getImmunizationRecommendation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMMUNIZATION_RECOMMENDATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getImplementationGuide())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_IMPLEMENTATION_GUIDE] = $fieldErrs; + } + } + if (null !== ($v = $this->getLibrary())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIBRARY] = $fieldErrs; + } + } + if (null !== ($v = $this->getLinkage())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LINKAGE] = $fieldErrs; + } + } + if (null !== ($v = $this->getList())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LIST] = $fieldErrs; + } + } + if (null !== ($v = $this->getLocation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_LOCATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMeasureReport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEASURE_REPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedia())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDIA] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedication())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationAdministration())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_ADMINISTRATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationDispense())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_DISPENSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getMedicationStatement())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MEDICATION_STATEMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getMessageDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getMessageHeader())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_MESSAGE_HEADER] = $fieldErrs; + } + } + if (null !== ($v = $this->getNamingSystem())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NAMING_SYSTEM] = $fieldErrs; + } + } + if (null !== ($v = $this->getNutritionOrder())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_NUTRITION_ORDER] = $fieldErrs; + } + } + if (null !== ($v = $this->getObservation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OBSERVATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getOperationOutcome())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_OPERATION_OUTCOME] = $fieldErrs; + } + } + if (null !== ($v = $this->getOrganization())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_ORGANIZATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getParameters())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PARAMETERS] = $fieldErrs; + } + } + if (null !== ($v = $this->getPatient())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PATIENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentNotice())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_NOTICE] = $fieldErrs; + } + } + if (null !== ($v = $this->getPaymentReconciliation())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PAYMENT_RECONCILIATION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPerson())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PERSON] = $fieldErrs; + } + } + if (null !== ($v = $this->getPlanDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PLAN_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getPractitioner())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTITIONER] = $fieldErrs; + } + } + if (null !== ($v = $this->getPractitionerRole())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PRACTITIONER_ROLE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedure())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcedureRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCEDURE_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcessRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCESS_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getProcessResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROCESS_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getProvenance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_PROVENANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuestionnaire())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTIONNAIRE] = $fieldErrs; + } + } + if (null !== ($v = $this->getQuestionnaireResponse())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_QUESTIONNAIRE_RESPONSE] = $fieldErrs; + } + } + if (null !== ($v = $this->getReferralRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REFERRAL_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getRelatedPerson())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RELATED_PERSON] = $fieldErrs; + } + } + if (null !== ($v = $this->getRequestGroup())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_REQUEST_GROUP] = $fieldErrs; + } + } + if (null !== ($v = $this->getResearchStudy())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESEARCH_STUDY] = $fieldErrs; + } + } + if (null !== ($v = $this->getResearchSubject())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RESEARCH_SUBJECT] = $fieldErrs; + } + } + if (null !== ($v = $this->getRiskAssessment())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_RISK_ASSESSMENT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSchedule())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SCHEDULE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSearchParameter())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEARCH_PARAMETER] = $fieldErrs; + } + } + if (null !== ($v = $this->getSequence())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SEQUENCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getServiceDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SERVICE_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getSlot())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SLOT] = $fieldErrs; + } + } + if (null !== ($v = $this->getSpecimen())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SPECIMEN] = $fieldErrs; + } + } + if (null !== ($v = $this->getStructureDefinition())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRUCTURE_DEFINITION] = $fieldErrs; + } + } + if (null !== ($v = $this->getStructureMap())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_STRUCTURE_MAP] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubscription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSCRIPTION] = $fieldErrs; + } + } + if (null !== ($v = $this->getSubstance())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUBSTANCE] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplyDelivery())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLY_DELIVERY] = $fieldErrs; + } + } + if (null !== ($v = $this->getSupplyRequest())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_SUPPLY_REQUEST] = $fieldErrs; + } + } + if (null !== ($v = $this->getTask())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TASK] = $fieldErrs; + } + } + if (null !== ($v = $this->getTestReport())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEST_REPORT] = $fieldErrs; + } + } + if (null !== ($v = $this->getTestScript())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_TEST_SCRIPT] = $fieldErrs; + } + } + if (null !== ($v = $this->getValueSet())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VALUE_SET] = $fieldErrs; + } + } + if (null !== ($v = $this->getVisionPrescription())) { + if ([] !== ($fieldErrs = $v->_getValidationErrors())) { + $errs[self::FIELD_VISION_PRESCRIPTION] = $fieldErrs; + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRSampledDataDataTypePrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRSampledDataDataTypePrimitive.php index 0c5a83fe76..1fc623595e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRSampledDataDataTypePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRSampledDataDataTypePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type SampledDataDataType-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^((-{0,1}\\d*\\.{0,1}\\d+)|[EUL])( ((-{0,1}\\d*\\.{0,1}\\d+)|[EUL]))*$/', ], @@ -168,11 +170,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRStringPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRStringPrimitive.php index 18c89179e5..a9845fab8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRStringPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRStringPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRStringPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRStringPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type string-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, ], @@ -168,11 +170,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_STRING_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRTimePrimitive.php index 2656d80afd..d343d48e98 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRTimePrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TIME_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRTimePrimitive implements PHPFHIRTypeInterface * Validation map for fields in type time-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?$/', ], @@ -177,7 +179,7 @@ public function _getDateTime() if (null === $value) { return null; } - if ([] !== $this->_validationErrors()) { + if ([] !== $this->_getValidationErrors()) { throw new \DomainException(sprintf( 'Cannot convert "%s" to \\DateTime as it does not conform to "%s"', $value, @@ -188,11 +190,37 @@ public function _getDateTime() } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TIME_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUnsignedIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUnsignedIntPrimitive.php index be67128ada..7497a1b856 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUnsignedIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUnsignedIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRUnsignedIntPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRUnsignedIntPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type unsignedInt-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^[0]|([1-9][0-9]*)$/', ], @@ -181,11 +183,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUriPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUriPrimitive.php index b3744880f0..8110b8231a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUriPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUriPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRUriPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_URI_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRUriPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type uri-primitive * @var array */ - private static $_fieldValidation = [ ]; + private static $_validationRules = [ ]; /** * FHIRUriPrimitive Constructor @@ -164,11 +166,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_URI_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUuidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUuidPrimitive.php index f51955f8e9..835e631418 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUuidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUuidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -68,6 +68,8 @@ */ class FHIRUuidPrimitive implements PHPFHIRTypeInterface { + use PHPFHIRValidationAssertionsTrait; + // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UUID_HYPHEN_PRIMITIVE; const FIELD_VALUE = 'value'; @@ -84,7 +86,7 @@ class FHIRUuidPrimitive implements PHPFHIRTypeInterface * Validation map for fields in type uuid-primitive * @var array */ - private static $_fieldValidation = [ + private static $_validationRules = [ self::FIELD_VALUE => [ PHPFHIRConstants::VALIDATE_PATTERN => '/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1, @@ -169,11 +171,37 @@ public function setValue($value) } /** + * Returns the validation rules that this type's fields must comply with to be considered "valid" + * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]] + * * @return array */ - public function _validationErrors() + public function _getValidationRules() + { + return self::$_validationRules; + } + + /** + * Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as + * passing. + * + * @return array + */ + public function _getValidationErrors() { $errs = []; + $validationRules = $this->_getValidationRules(); + if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) { + foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) { + $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_UUID_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v); + if (null !== $err) { + if (!isset($errs[self::FIELD_VALUE])) { + $errs[self::FIELD_VALUE] = []; + } + $errs[self::FIELD_VALUE][$rule] = $err; + } + } + } return $errs; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRAutoloader.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRAutoloader.php index f83537039b..238f78ec9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRAutoloader.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRAutoloader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -79,6 +79,9 @@ if (!trait_exists('\DCarbone\PHPFHIRGenerated\STU3\PHPFHIRCommentContainerTrait', false)) { require __DIR__ . DIRECTORY_SEPARATOR . 'PHPFHIRCommentContainerTrait.php'; } +if (!trait_exists('\DCarbone\PHPFHIRGenerated\STU3\PHPFHIRValidationAssertionsTrait', false)) { + require __DIR__ . DIRECTORY_SEPARATOR . 'PHPFHIRValidationAssertionsTrait.php'; +} // common classes if (!class_exists('\DCarbone\PHPFHIRGenerated\STU3\PHPFHIRConstants', false)) { diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerInterface.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerInterface.php index eab4f0aa8f..c53de26562 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerTrait.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerTrait.php index 599294e567..77f20bb6de 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerTrait.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerTrait.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRConstants.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRConstants.php index 79f64f8648..2b52686321 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRConstants.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRConstants.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ abstract class PHPFHIRConstants const SOURCE_GENERATION_DATE = 'Wed, Apr 19, 2017 07:44+1000'; // PHPFHIR - const CODE_GENERATION_DATE = 'December 7th, 2019 16:37+0000'; + const CODE_GENERATION_DATE = 'December 22nd, 2019 07:25+0000'; // Common const JSON_FIELD_RESOURCE_TYPE = 'resourceType'; @@ -92,6 +92,8 @@ abstract class PHPFHIRConstants const INT_MAX = 2147483648; const INT_MIN = -2147483648; + const UNLIMITED = -1; + // Validation const VALIDATE_ENUM = 0x1; const VALIDATE_MIN_LENGTH = 0x2; diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRContainedTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRContainedTypeInterface.php index 4987c38e8b..557f8d69f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRContainedTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRContainedTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParser.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParser.php index f8589e3cf7..0cd022d205 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParser.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParser.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParserConfig.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParserConfig.php index 2233a7c5af..d282691faa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParserConfig.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParserConfig.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php index 11fcc7b1ee..9f155827cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBooleanPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBooleanPrimitiveTest.php index 61f20067b8..a41a0a000b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBooleanPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBooleanPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php index 87b12908b6..5419fea670 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php index ac732c466e..7255e9664d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php index 90414d5edf..86364ef0a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php index 62d62a92c1..12f8d4094b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionListListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionListListTest.php index 291e9c1da1..1e3b44f03c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionListListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionListListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php index 05975acd2a..edfd84cc56 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php index a3759aa63b..babeabe788 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php index 6645e49f47..1dd694624c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php index 1f76fbfc6a..76260d626a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php index 94ceff7875..cadfcc9537 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php index b269d04880..d2c43d3c38 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php index 3e68606c00..6019ce6b27 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php index 55c54580dc..6e9a5bdc7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCategoryListTest.php index 221fd426d7..b9aee965d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCausalityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCausalityListTest.php index 70253337de..7016bb1eb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCausalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCausalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php index 154def39eb..b9681c90b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php index 33d41b15aa..211a23facc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusListTest.php index 0475494c69..ac0f516b67 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php index dd334c4b31..79603ae6f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php index ccc75d477c..690d4c091e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php index 06df4093b8..73ebb6042d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusListTest.php index 3689c1c134..2ef8bf1f99 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php index f9fc995efa..3066fe9ce4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php index 0a0a4196b6..0f8d47532c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php index 49afc51ac6..90402b4946 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php index 19ccc4d784..91b6a259a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php index 249893c611..a289371b1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php index 1cf2d320d2..bb4fa97afe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php index 39fb052383..117a4da7db 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php index 7090c12567..8fe3a3102d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php index bd30f5fdde..09490ae866 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php index ea39a55f9b..f7b5bce110 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php index 81b242e0b7..85c2966c9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php index eec20925d4..09e4012224 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanStatusListTest.php index c082b48826..1ec1bd879c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php index 0c1015e1b3..f38f159270 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php index 29ebc38bac..16d9d15b2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php index d2bda2058a..795a950d1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php index 0cd8dadab6..5730e53147 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php index 8b5d517078..d865fd2d3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php index a5e163d033..a668ba3446 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php index 39df99bfbc..5b37a788b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php index 5a26b32e39..5a0e835e0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php index 76261ed28c..9727c3a5f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php index 52e8d71bfe..45f859c89f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesListTest.php index 5446f197b0..234d10ac78 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionVerificationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionVerificationStatusListTest.php index 01120360c2..c9b6c0792f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionVerificationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionVerificationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php index cad656645c..34ea048a83 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php index 5ffeec6903..e627f9e7a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConfidentialityClassificationListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConfidentialityClassificationListTest.php index 204ef628e5..fc369c8896 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConfidentialityClassificationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConfidentialityClassificationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php index f9c821200f..eca0d5dbd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentExceptTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentExceptTypeListTest.php index 8e22df799b..56b39603b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentExceptTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentExceptTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php index 7536441b73..5e23eec4fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php index 1ba75fa1df..022b451166 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php index e2dbaaeb77..e12446b687 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php index e837eea525..e7425570c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContentTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContentTypeListTest.php index 5934589ae6..ed823d2cde 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContentTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContentTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php index eff4b91eb3..412732fd63 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php index efb211ba50..72b00df326 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDataElementStringencyListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDataElementStringencyListTest.php index 251ac816af..161cfb2d70 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDataElementStringencyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDataElementStringencyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php index dc8c829904..4d0ba02004 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php index e03e4a6183..29ae15ae02 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php index 5481808a82..660d2c5833 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php index 348a7d75fb..5708ca3f9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php index d0fe43c730..b788478301 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php index 8486b5c63a..bdeaea984b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php index 344b2114e8..f63ad8bbb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php index 85bc38dd1a..840a085fac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php index b8ef76ebb4..442c6ba94f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDigitalMediaTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDigitalMediaTypeListTest.php index 62df390218..d5013059dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDigitalMediaTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDigitalMediaTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php index 662e536db1..9b1c4a9027 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php index fb86da5781..6661410ad7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php index 10aa7d8349..1a518d2712 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php index 0e85f25ce9..1080a782fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php index 57c3576b15..6882b96849 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php index 37fd2afc59..833d4c6f8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php index c81556d145..ce7345af7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php index 8374e389d7..0b05a1bfb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php index bfdc0d7766..f4c44a01ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php index f86441ad58..e36ed8391e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php index 1e55e0055d..566d339e9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php index f99183e12b..469dc4f2c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextListTest.php index faab64aea2..55945b8787 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRAllTypesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRAllTypesListTest.php index e35234b3b9..8ae29ffdb1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRAllTypesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRAllTypesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDefinedTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDefinedTypeListTest.php index 09681339e7..b34e2dfab4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDefinedTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDefinedTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php index 1b3b92c52a..ad4be918fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php index 239766e476..e93d45bc0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php index e9d33b517b..312bb5229e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php index 172fc22627..a0d02f684b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php index fced32c28a..efb49e0056 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php index 7a65c47f54..448a38d8a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalStatusListTest.php index 1ba5bc1fcf..06f8822a17 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php index 776db4dbd0..6399139ddb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php index 007290a8ff..2c1ec60dee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php index f9bb55357d..4ee1b68bcf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideDependencyTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideDependencyTypeListTest.php index 4af4540eed..a339c3c7ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideDependencyTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideDependencyTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageKindListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageKindListTest.php index 25d4f5ff93..14bf91ca8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php index a38264fad1..ee3820ea6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php index a3be2acb35..9c6efd57e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php index 57e692aeba..580df12770 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php index ee03d9ff02..16fe5bdf5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRInstanceAvailabilityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRInstanceAvailabilityListTest.php index c55840e29c..ae43955ddd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRInstanceAvailabilityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRInstanceAvailabilityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php index 204f2c6281..321f369d49 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php index 667cca0fdc..5c95847a64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php index dd148b6a5f..78bf80d1f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php index afd326fa04..c02b112677 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php index 61c68c6f5d..b6bbaadf70 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php index 02e90dfb8e..a9d2aa84da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php index dc6fea3d46..d0d3158ee3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php index 8b995287e1..cef196f489 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasmntPrincipleListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasmntPrincipleListTest.php index eacccea6fd..e5fe3dd8f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasmntPrincipleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasmntPrincipleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php index 0fd2be6547..5de86116e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php index 8e7519b625..b4fd00e486 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationAdministrationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationAdministrationStatusListTest.php index 762f24079b..928bbd145c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationAdministrationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationAdministrationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationDispenseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationDispenseStatusListTest.php index 7cde3f2ce2..902af60af6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationDispenseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationDispenseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php index dd8040c950..009b261973 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestPriorityListTest.php index 37ec513dd9..a34d3c2dc8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestStatusListTest.php index 0f5e48a6b7..12fb79fa40 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementStatusListTest.php index 5ed69d3aef..84f8da1f4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementTakenListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementTakenListTest.php index 3c2e76a2e4..67e6d56e64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementTakenListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementTakenListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusListTest.php index 491acec292..f52e3cdb51 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php index 1fca285160..b3a6ee0bad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php index ebc96bb7fe..693aea6234 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php index ae6444752a..fec41b9822 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php index ddbbf77248..6b7ff18688 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php index ebead86037..9946c46d41 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php index cf97aced0a..dcc0969a97 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNutritionOrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNutritionOrderStatusListTest.php index 0c58c917ca..d28fe77259 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNutritionOrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNutritionOrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRelationshipTypeListTest.php index 73ab5771c7..9dee21ecc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php index 759fa8d580..317869d954 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php index 66052afe30..b7e9025c74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php index 37cb0c733d..e46b03f5b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php index 59520fe132..ab1fb40062 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php index 7520d0e8ad..d28adcc29a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php index dfa073bd77..0d3d6be139 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php index 7600b4ac0c..a84b8a9848 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php index 4e0b5a06b3..3cf83dc5cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php index c6754e1d6d..e2ca46a4cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php index 88acde3506..13959adf73 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php index 624ed54108..fbd97cceac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php index 65bbdfc4bc..cb20153c87 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php index 22e7dbadb1..f8cbe4f9f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php index adc31e1568..2160a6bc9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php index c05d050c07..e482bd0877 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php index 21c762879c..4a1c0b3d7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php index 99d9729497..a3abd552b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php index 2661f9d878..be88272e1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php index 200e0460b6..0ef29e54be 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php index 0cd16f789d..5a7b4f111b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php index 6db77c3b41..0661534c4f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php index 5e70950349..c219868e24 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php index a6c918a2ae..78f11a0ffb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php index dd6a90620c..955ea56a44 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php index 76f4c527bc..0e17576cec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php index deb69525b8..94fa1acddb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php index 1007ceb0f6..c08a5001c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php index 435660ab9e..33e1cc9d58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php index 3fdab7747c..8f6820c38b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php index c2f4c7c569..66c4b4291c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php index 2610d1d8f8..b7458a5875 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php index d0eefdc05e..d2279626c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php index 67342061ee..718d12f5c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php index 8e33bce644..c4065fc674 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php index f7ae4cf042..e0adf1fda8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php index 7b6f6be6a9..7e638d4a14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php index 0b3a666e7d..24c598cd77 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php index 8d501159ab..178ea389ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php index fe77d46a7f..dac5dc457f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php index b9b168e838..2ae17d0556 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php index 58b9ed533b..50fff39a30 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php index 08d8537120..bd1d85f5f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php index 0b822976f9..848aa26c49 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php index a50a1f9f03..0d924bcdf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php index 880091a5a6..fb90e90a83 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php index 96fd69282f..bdfabbe4c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php index 7c57053f05..88b7b8d575 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemVersionProcessingModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemVersionProcessingModeListTest.php index 4770df19ca..b60048af5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemVersionProcessingModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemVersionProcessingModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php index 1e460c7571..db2c030a5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php index 67e04a6c5f..2172cda84b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php index 2156a06fde..099c8e694e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php index 80fb83fef6..082bf7ced4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php index 13847634d4..e064ee80ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php index 96768842be..2b05daaeba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php index 669caeedc9..54057cc712 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php index 18374bbf44..90714d36cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php index abcee61c81..929e38bf67 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php index 4ebeecc93d..3a1faa66e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php index 7f9b885e3d..f23347650c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnknownContentCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnknownContentCodeListTest.php index 9091c981d9..57a1ea4b53 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnknownContentCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnknownContentCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php index 9ca0a1279a..a9dc893bfc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php index 9834272bba..e2de5835c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php index a8c8c2e732..a0795bc571 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php index b9099a8f9c..246ea9d359 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitiveTest.php index eab5811e0c..4301764556 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDatePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDatePrimitiveTest.php index deeb42110a..b55a29f3eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDatePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDatePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDateTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDateTimePrimitiveTest.php index c7b7f80e6c..9bb2387ab0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDateTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDateTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDecimalPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDecimalPrimitiveTest.php index 209188d34e..30f59a1293 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDecimalPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDecimalPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php index cc0ac45669..b27ef59fae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php index e49f3894ef..f6d8840d5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php index cfe4e3cc19..b9b9ccc191 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php index 925531eb63..ff92e4d1c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionListTest.php index 8d58e2f8ee..829e70f794 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php index c159e9bff0..bd464a1a7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php index a21ffe928b..e8931a494e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php index 2f910bec50..7237ca4b02 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php index b8000c5aae..da2a393b98 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php index 828c89133c..d3b3fea861 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTest.php index 9809258589..d1283f99e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php index 2c8c85fb9f..a4a3734523 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php index c26fed4214..4ac470a39e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php index 846e8c0a51..d36576e204 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCategoryTest.php index 6145a3ddae..59779c6db7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCausalityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCausalityTest.php index febb6b0b46..422e7f469a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCausalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCausalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php index 8e2005ba61..3cd5572176 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php index 7317719fcc..f995316717 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceClinicalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceClinicalStatusTest.php index 4e266cc64d..37e7e51996 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceClinicalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceClinicalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php index 11c901a6bb..ffd4741365 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php index 8f3904a7cc..2ae261c840 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php index 9ab958c99d..200211e98e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceVerificationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceVerificationStatusTest.php index a3545c7cfd..87a3130468 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceVerificationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceVerificationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php index 05bc4cc38a..31acf3e03d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php index f58e6f2bd4..5c0d96beda 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php index 921097c6dd..449e3b5313 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php index 90ccad2836..af0f082610 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php index 76ba58e395..95e7442a05 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php index 2bbd1b30e1..82167eee2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php index a02e64f06e..26acfe07df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php index 62fec5d5f9..d66fab0c67 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php index e0adabc947..09487f421d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php index 586df0bb17..db93b6be1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php index 06a2895efe..70d5cbdfe5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php index 4c4b1b87c7..8bd05c625e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php index b3a00121d0..e85bfe5748 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php index 0cf299f6c0..d8772168ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php index 322d1a3564..4610cdcff3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php index 001e32dd30..f940e95333 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php index cdc5f50c25..474bfd3197 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php index 4649becfe4..db06347a66 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php index 0889fc82b6..90abe45d23 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php index 08875cc737..18a495f6d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php index 8fdc9d5c15..9340ec1e9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php index 11d8feffca..d3388b83b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php index 036efc0a69..28bc4308f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php index 19600f4475..14b69804a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php index 98f143454d..3746bba254 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php index 7f1cb1c783..b305fe907e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificateTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificateTest.php index 738ec9af86..3e45ba8293 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php index ce6ba36547..8ce587281b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php index 12d7a159a6..eaf575377a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEventTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEventTest.php index c415584f24..88b1340233 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php index 72b4549c1e..bdc34953de 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php index 1c5c5af773..fe25123e34 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php index 8e4b7c02e8..51d374836c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php index a2d905b262..9e82430c6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php index 036f31a829..cdbf4916f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php index 7183bde870..419d742f52 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php index 2515948533..b404c93c7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php index ed1792cef3..86d9d67e5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php index db0b58c4f8..75c8debb84 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php index d51a95d61c..e436f1c89c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php index 4ad752da65..47dadb971e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php index 36403f8bcd..f8ab8b1060 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php index da5a275552..b3991d07da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php index 63450e802b..d9f77dad76 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipantTest.php index 0df6cedc3f..7cba10dcfc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php index 61b06d3a4e..6b208d7d90 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php index c0305e6115..43a15de94a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php index eacb6ce876..e41a783a60 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php index ab5c593c1b..7d21b3309a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformationTest.php index 9b4c7f94c4..9818d32693 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php index 0f135d1efd..14fccca183 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php index b74cfb12c3..7515283315 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php index 2d0195ec40..a99eb83f68 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php index e7c14fc585..72f895e9f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php index 9d9d960e8b..edffa60324 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php index ec66ae028c..b3d4c0c123 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php index 2672ff4b63..0f1c14c46a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php index dcedb0afd9..126aad51ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php index 3fb23e4c72..d8331fb22c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php index bc3a29c2c4..f8248514c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php index d934d2f7ae..d17049ef7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php index 3a23002555..c90e957513 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php index 6ae104d6d8..aff7a0cf76 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php index 49fbd5a57d..609bcbfd74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php index c560eddf1d..4d21281080 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php index 6012f6f071..fbe8826a14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php index 06dd8cd49b..878e244ac8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php index 640c3ba965..eb34d5e633 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php index 9402f1a620..56feaae1d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php index 42e0ab9c10..d2de88db17 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php index fcfecec335..05403de67b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php index 8491cd88ac..4b75785674 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php index 4a9001d9e5..224640d02c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php index 037b2dffe7..f41614f004 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php index 1f57ae5c57..177cc3882a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequesterTest.php index acbd278256..53bf85b955 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php index ade6ff2962..a4ae4c1ee6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php index 5715e4c621..a75a6a3d36 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php index 221b41c212..7b41cb379a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php index 7fb832f7ba..dcf9dff373 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php index 2708048613..17638f8d62 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php index 884598dfa3..bb9b7a4c85 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php index 3395e55905..8abe76638d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php index abfd570c7c..13adb119dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php index 5ad60d0c2b..f9600374b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php index 92c5f120a3..82b226dd63 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php index 8e7f5f56fc..33211611a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php index dc95d1d3f5..63210a2e02 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1Test.php index b489750174..2582541b42 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php index 999af41133..7b91d3edfc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1Test.php index 257d9f2acf..fc9adc4ba1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php index 162681c5ca..48f0455ae8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExceptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExceptTest.php index 62bd623913..81c634af40 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php index 425fda3d02..7111b43584 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1Test.php index 7ed3fcbabf..8c6497235d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgentTest.php index 59ab126e24..0f66325324 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php index f4c107b696..cf013ef783 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php index 4531740e2a..9bdd766759 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php index 682473e34b..bfae4c1f91 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php index 440812de34..da1d668430 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php index a5e0190f2d..5a12980964 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php index 19a2413427..6db94ebdcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php index 81d096b90b..d1890e0939 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGroupingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGroupingTest.php index 53ad3e4623..2feac85b48 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGroupingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGroupingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php index df71770dbc..0eb66507eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php index 6d74708f8b..3d114fecaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiTest.php index 9aee9cd71f..4f475fd03d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php index 5dbec5bd0d..645404dde1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php index 98b47fc930..07d1da1d65 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequesterTest.php index b1e80d33df..08b5171eb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php index fa6c076529..568c8eaad7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformerTest.php index 99d2ba3b68..b7500cf9c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php index a0c364f06a..5d34c73434 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php index 42ecc9ba9b..b1e477ac9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php index 17d005c021..4050e719c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php index 2fd1dc5c93..6936f12942 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php index 01151ee585..08aa094124 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php index 5ec4e357ac..3258b75a29 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalanceTest.php index 3b452d228f..746390c462 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseErrorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseErrorTest.php index d091e26eda..b45a58f05c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseErrorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseErrorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancialTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancialTest.php index be25315da8..3eb74f66ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsuranceTest.php index ddab0e03d3..a4c7354c09 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php index dfe575ff6d..2b7af2f4ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php index 8544f75b8b..d382bf9c0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php index 5213d24204..277de3b596 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php index 59c6eb42df..3af0b932f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php index ba612876b8..e62f764312 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php index 264a6f6fa7..11877e8a11 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php index 06781aad94..8b73ca4ab0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php index 93ba78210d..3e9abf77aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1Test.php index 3d95c486d1..39f64aebcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2Test.php index 9622e711ce..2d3672d888 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignationTest.php index c7728cfd3f..77722e938b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludeTest.php index 1d0a20bf13..b0f3b54ee6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystemTest.php index 0e1e3441b4..47a37d9d05 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersionTest.php index e29f0a64a8..2835437a30 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileIncludeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileIncludeTest.php index 8aa2bf9056..c18350ac82 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileIncludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileIncludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php index b15c824f97..ef8a62dbb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php index 6733014057..f8877d68db 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php index d6c4e04b41..1663f9ef5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php index 7949229adc..d28cb55a8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php index 5c5fdb6188..80954773ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php index b986f55907..7ee171e518 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php index ec2b5f4735..80da6ab8c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php index aa0416b0d3..b8046b6fd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php index e87f36982f..b6b0096243 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformationTest.php index 5eceeeb73e..078c82c13d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php index 1414832b5d..15e7f74f2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php index fb4a251d44..3b8ecad66f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php index 8931526fe3..4f601ee956 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php index e70f57d493..8b8e46e9a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php index c634caf128..e5b8ecc7cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php index 1608101828..70b6c9f4da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php index abc21957d7..1866267d8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php index 36d840e281..b3a82160bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php index ca8a3b9dde..6b8c6d9de4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php index b760df808b..a29e0c1c0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php index a794c7f2c8..8edc0ea09d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php index ab0655bdb4..80f57371ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php index c9ce298274..728341f2bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php index 7530a2713a..8c966b6835 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php index e276b6ad6f..9200b8d2c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php index e134180a1c..e6b74ecd93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php index 602a6672c0..b408236231 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstanceTest.php index 9439aa2a68..b32f569187 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeriesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeriesTest.php index a1ac9e871f..da3b46d480 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudyTest.php index dfd7eeb8b7..368b1dd059 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php index 4053b9545f..42fa246e3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php index a0ffed6a50..27975466f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php index 33549fb5f7..89aaf37201 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitionerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitionerTest.php index 22bac907fc..5b39b6856a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitionerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitionerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php index 422c697880..48223e9f59 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php index 8c305915c8..11115de015 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php index d3dc58b6db..c873d55538 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php index c050ecfdf0..a4f79ad007 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php index 900d3c8abd..551406dae8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php index a59e68a9bc..ec059ae7d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php index 5234ae758e..5d280b2963 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php index 92d74ba0ab..e81260d505 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php index 27a1f18a73..36d7ca4214 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php index 2bb85bdef6..23757ac19f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php index 9122a948ad..3b364c9004 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php index bd584c798f..3bf81e2d8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php index b790ee114b..9b41d97dec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php index 581de20bce..901781654f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php index 353ce0b9b0..d4f92b29f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php index d1865b60b5..4e2d257722 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php index 13bae6c760..d042503bef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php index f35ee6d7fb..8cd31a8b52 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php index 294595a6c6..c7ec555011 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php index 41592d777a..52496a72dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php index 2ca471c83a..1852bef956 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php index 04b48a4ef9..77594eae28 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php index 753239ad22..d229ae907d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php index 66fbd2ebae..d7fad9f557 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php index 86486d5d6f..0686e09aae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php index 62815855bf..afd6bdc87b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php index a7cd4d9d97..bde280d4db 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php index f7383489eb..72cc7a95d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php index a6782813eb..2a0f984447 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php index 340c592a73..e7786016ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php index c2b4132389..0fa5a9609e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequesterTest.php index 6213810f26..596e4746a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php index 8d07e127b8..292acaf3e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php index cd9d67b819..2b41d71e9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php index da8eede499..487d4caa88 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php index d8d55baf50..64a01138ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php index 65eb49820a..40277d523d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php index 8bdd91dff5..07b5161111 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php index 8168e687eb..353363eab6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php index d0737a4bab..2dbc11f545 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php index 22a2cb9cf8..6bc73de987 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php index 31281d07ac..7dfc7d4e4f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php index bbf601b1a7..85ccad90bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php index c0ca8ae658..13f48ee6b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php index c96431d33d..2054d34244 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php index 63f1bbae20..52d9f23c4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php index 6ab89afab5..44026bc359 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php index 29a1547ea4..cc4ff1c1f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php index 94b9df299f..b7cbb84ffa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php index 8683c638c0..efacd97b88 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php index c723d77bb3..bad9298d19 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php index 242ff3b2af..e95d96cca0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php index 93a1f3aa80..c001b5d1d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php index f260c3cadb..f27a8b5c7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php index abec34167c..69ddf49c39 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php index 8095b4ff13..4a7b3e58c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php index 7ff609666c..6476c77064 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php index f6ee6f6691..f4f24dfa3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php index 48642c7e01..4a1af8925a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php index a26c469b72..18e7c0864b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php index 447d1ebd01..0462d1eae9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php index 5d1c757a34..d211da0de0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php index 193cd4897e..1b8869469b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php index 0e955ad250..331c5ee140 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php index 3eefaf4d75..dd387c3c1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php index 92a6baea98..07c30c21aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php index 89bf0823c8..d20936b97f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php index d448890620..0ba672eba1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php index b63b36f013..53b1d98e5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php index b1c0eee498..be734c0fc0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php index 3895d8d252..4bf6a33726 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php index 4e1e09c272..b6a8d50e41 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php index bfc11cda8a..5353527874 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequesterTest.php index 3e8ead53b2..fdbfc84875 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php index d73d047214..beda12c83a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNoteTest.php index 9b37524e87..0cdea9859e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php index e994493c93..444b58dcc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php index 960f0232d4..8210175364 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php index 76689d3ccf..01033387ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php index 9eead93a30..9084b9afd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOptionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOptionTest.php index 5f288a79e2..f06cba5b61 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php index ad2bd46d9e..d4fe7e18b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php index edd5f428f0..9e17716053 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequesterTest.php index eb5e34e4e7..b2d9795149 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php index 2a68b48d48..c5c5b8fac2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php index 404b5e6a64..a446ed7a87 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php index f2cb72fe9a..2db1b4b3df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php index 3046f01977..1d74c95ff5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php index 4f3332cc22..78adc65e86 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php index de5735361a..20026dc4a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQualityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQualityTest.php index 6576c552e1..b10a5da080 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQualityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQualityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeqTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeqTest.php index 4ae44b2863..d4995bd18b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeqTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeqTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepositoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepositoryTest.php index bebfb79c82..b7d5960f1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepositoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepositoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariantTest.php index 7b2d4dec60..6b5abd1e8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php index a1684168ec..a1285af320 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php index d299703a13..4092a51981 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php index 134f16991b..557e880171 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php index 6caf5fee6d..6267e8d309 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php index a29a1f135e..0769330a02 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php index 19422b307f..fb43a7c698 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php index de929618c7..612433d22c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php index 136ae5ce93..a19d16c06a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php index 833e1cc934..bd235cd300 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php index f7620bfb0c..b9435fc697 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php index cf2b9f38f7..6d2f16c634 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php index b39cf6c014..48511ae652 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php index 897369a86f..6467707d68 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php index 5848a35f93..d2876e7481 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php index 46e6a81a41..6161e91a1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php index 0a14c093b0..0d877ca37e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php index f8e86f1605..75729d2a73 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php index d74dd15284..ed40a23eb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItemTest.php index 0c30422057..345b79116e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequesterTest.php index e30e29b59d..ea7ff62e6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php index cf11366f1f..38b81664c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php index e4130def22..f188dd356f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequesterTest.php index 0532dfd66b..cc648dbd0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php index 5ed9d801a8..73725e6953 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php index 77ba20181e..e6749d1620 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php index bfb48ab791..b2d2830b10 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php index 02c9306083..b2d7d7172c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php index 913a58870b..ce7c0963ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php index ba6b7559d8..d4fad00be2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php index b41532a391..ae02c475bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php index 630af2d45e..fabe1aa52b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php index 74b4961421..34baf83eff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php index 91540db84d..6e00c26218 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php index 0a4100ed24..6bcb9f60e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php index 1065e03cf6..fa33378116 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php index efddc26b6d..b1dc3ada5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php index 2cbe8ff99c..722561015b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php index 985c272ee1..219cc30230 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php index 24cdb9c0c2..04237b1930 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php index 1ae74390e4..7f108c7c74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php index e79eba8f62..fc0841b3e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php index 9968ab77df..3060861216 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php index b10b101fb8..67b09afc1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php index 69b53a3e46..d2bb523987 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1Test.php index daa9030e81..d7cdcc53d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2Test.php index bb064d082e..a7b5fd8960 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3Test.php index ac996dc9dc..21edf4f440 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParamTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParamTest.php index 8422b345e2..4e3c70e63c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php index f88c120482..600e4dcabb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1Test.php index 50c4a567b5..3997358752 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2Test.php index 09a35d909f..7bdc385f8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3Test.php index a5b31a8ebd..a460bf5abe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleTest.php index 5605839176..d629faada0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1Test.php index 610d29e583..3808f1cc69 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRulesetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRulesetTest.php index f8248f8f8b..68f1bca741 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRulesetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRulesetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php index 9b17f7e477..28c1c8dbc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php index 8118c8dbaa..f9d63452d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php index deca6831e2..c56a919096 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php index 140e3c0565..bbfdb18866 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php index 185f95fd41..6600cecdae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php index f9f24ae741..18aced60c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php index adce235f31..0760e1f79e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php index 7907b96924..fb4d998355 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php index 6150b4f5c6..ad1d650b5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php index 7803c02b60..ee2b08eeb5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php index bc686c6c4c..8253db040d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php index 03190abef9..5c7db02ed8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php index 82af9a1293..bcee27ddd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php index 384500e5a9..373bbc675e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php index d4b46f5610..e4821a3f46 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php index 6d7d1d0446..41b12273b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php index b497d278ef..48262b99e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php index cc5d6ac4e6..69162f2363 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php index 22eff098d4..d1ce2d20d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php index c322ef1a06..254e95152d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php index d301a6a522..833babf328 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php index df62121472..4dc9768fe4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php index 2d50c9b4e0..510b77f588 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php index 815ca9b7b8..21216e39c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php index c20ea7a352..1cc1d1d20a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php index c0b0ca8064..d75909fcd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php index bd1919b23c..779763ee12 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeTest.php index 25cfe11487..28886a384f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php index bb9f7262cd..b7265dde82 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodingTest.php index f4b351c917..070b28c240 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php index 52e998908f..e8ea4da8dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php index 6de1e4d25f..50ef59a417 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php index 0ce7050bec..32c5eb1a62 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php index eda341326e..171e44d4db 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php index 425a6247e0..3377194b7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionClinicalStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionClinicalStatusCodesTest.php index 6134fa6012..5d10680e3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionClinicalStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionClinicalStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php index c9fef6c26b..bded20bd98 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php index 947a2711a8..db72871ecd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php index 5aa208299f..f6fcbcd255 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConfidentialityClassificationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConfidentialityClassificationTest.php index 746f6f3586..eac2f9a5a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConfidentialityClassificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConfidentialityClassificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php index cfa7b726c9..e61f84a43a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentExceptTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentExceptTypeTest.php index 218f0d4103..34cf792dd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentExceptTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentExceptTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php index 385e706ff7..e681ed7723 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php index 45b7c14163..ae734cab45 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php index 901a7decce..c3ad7b3103 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php index b6cc30ff99..146a2b978c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php index 64f81b09c4..176e472f41 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php index 05214dd1b1..8543fc61f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php index 466609a76d..7a69fed96b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php index 6115609347..05f5d8a8d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTest.php index 6bde5ee705..4170718933 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php index f8da6e28ad..b4679e898c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php index d38e1cf6d1..c6ec2e4a10 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php index 5d4526e620..b26982c840 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php index e92abf646d..b70d92d7ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php index 69e84c7ef2..d6f6928bb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTest.php index 7bd8ad5b58..a86b78d8d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php index 617d946167..f0b15d6d74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php index 647ba0baea..fa18806ac5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php index a20137e52e..5efc0e3732 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php index 6e1e51156b..8eed537977 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php index d90e81cb94..d3cdab0ede 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php index de0a5ba44f..a6e4b0ba13 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php index 9d3b32e3bd..4d59fe8746 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php index a79c0ecc12..a419f35140 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php index 4e80f77955..ed14ec64a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php index 2672e48ab9..476a3e04c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php index 078e85e0da..fdb594af28 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php index 3af5dc3e60..83acd5bd5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php index 3723859013..ea802121d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php index 637db7e182..ac5219e7b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php index 0629d8f1cf..9bdac53408 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php index 396d07d7c0..2548e7c446 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDosageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDosageTest.php index 745745dd96..62bd98974a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php index f1b3daa59f..ebe463131f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php index 8d780d6003..612a7454ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php index 32588e777a..90b1a023e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php index c789d5d093..4271e87531 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php index 1f83986e52..798d18b5a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php index c04d0c595f..1b5037ca5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php index 5ac454e11d..f94af49fe6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php index dc86894fb1..37bbae9bca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php index 0a54d2cd54..a9b3be108c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php index a84fe0c349..acefd5177d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php index 7b1fa7b141..52fc3984d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php index 11b5a8131e..92b04a47ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php index eae04d1f40..a7c46c3bd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php index 1ff0a56497..6362fb88d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php index f649905bff..95778c22b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php index a4876a8059..da42e378ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php index fa1f3ad154..a138b83255 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php index fe95c1056c..ff787363cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php index 0fe49b1564..ecae0f9412 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRAllTypesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRAllTypesTest.php index 515acaa95c..dbc385bf9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRAllTypesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRAllTypesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDefinedTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDefinedTypeTest.php index f28a0474d0..1c56aa48b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDefinedTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDefinedTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php index db526b2f8a..6f936d0389 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php index 051f9f37f8..7106080f42 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php index dc4a525254..211285ef99 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php index 0f7a9c032d..fb55b5cd33 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php index 75d096509c..5b7833366c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php index 2261c854a1..b0828bc33e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php index 975890cedd..0f4d746ce5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php index 79b9253ec6..02b9d467f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php index 83c03f14c5..35bef7988f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php index 5e935a9878..6137c9f5f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php index 35be2362ea..69d923fb86 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php index b71fca8d4b..8bfb523857 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php index d7d4bb6d93..9f4a21b730 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php index fa5aeef238..52c387f604 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdTest.php index 5c3790df05..fff6f82535 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php index 6a7aed55e4..928963dea3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php index 4223ccb6f9..4791c715fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php index eccb3817f8..15257c4539 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php index 686f998759..727e358e0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php index 965d7a7454..a8cb4845ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstantTest.php index 29c5b906cb..9fd5948e6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php index edab5d27e0..a92ec80648 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php index 486804d490..81fc3d5ec0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php index 7c667ba654..84c00e6bb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php index be98fbfa4a..97668eb13a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php index b3f58ebb96..2dc2f4d78f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListModeTest.php index c8028ca4d3..658786e3ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php index 1050feb651..762fb5cf49 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php index 3a0af2f924..83da2a18b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php index e9ef98ff6f..9b750ceffa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php index ba52a581dd..016bb7a3d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasmntPrincipleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasmntPrincipleTest.php index cfc268250a..ec694acc12 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasmntPrincipleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasmntPrincipleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php index 33094a89b3..db4a94a45e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php index 19f5a0cc60..35b2a6a89c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php index 6f2a9909d4..fd7f305338 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php index 31885fb333..43b25dbd08 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php index 5596b38cda..7415550512 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestPriorityTest.php index e4e74d3c20..66e08c064c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestStatusTest.php index 18bf9c33ef..5f45a0a632 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php index 4e34a41765..401e168026 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementTakenTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementTakenTest.php index e1c4d55d75..a900f24aa4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementTakenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementTakenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatusTest.php index b79c9183ee..d575f32dce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php index 252ac3deec..f386893a36 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMetaTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMetaTest.php index b12afd1536..5e597b1c37 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMetaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMetaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php index 429bb28941..c0a26880a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php index b963b782c4..c93fa4e6fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php index 248ebf7263..7bb566a0b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php index 977c515bd1..58a21ea3b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php index 044cdc3046..06d3eb0887 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php index 6f72fad322..a109af135d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php index ec1d6d168a..323f5b1693 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php index beee1b26e4..f13e209f5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php index 3321edd732..62379171bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROidTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROidTest.php index ad2ae374b0..1c18adf404 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php index 542ea0ad59..aa7b11b0c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php index 50e8283905..79b78a8fef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php index cdeff4c927..a8b78665ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php index 5dcb9a2517..12d7dc8453 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php index 391f7b14af..f784706310 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php index 799791509c..2605adbba9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php index 76a723850a..8efe489956 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php index 3cafd9b50b..2641c4baaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php index feb015bed4..0530420257 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php index bbb432784a..96067bc2f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php index e4b9952e27..8525b01eab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php index cdad18ad15..c851ab3e62 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php index d6eeca8182..d8afc9d37c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php index 1900f16b92..8daae2c6f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php index 12bd6961b3..f5f5190cbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php index c743530b77..f021fba904 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php index a59ca17607..4c1e3b094e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php index 89fe80355a..db3dfb9bc0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php index 384fb024c2..1970b83297 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php index ab0c2658ce..989a781cb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php index 38948851e6..6c098b5b8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRangeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRangeTest.php index d515279e27..892fe1ab7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRatioTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRatioTest.php index d426b57c86..93d4eb1c96 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRatioTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRatioTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php index cd15ad7a14..05f58af97c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php index ade180a774..7086483558 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php index e65e757232..c3f7d37669 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php index a7caddf719..7b68b49ccf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php index d5f932e314..f2cdd2f76c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php index 14fe8e6d2c..55b73e973e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php index 38de32f966..6de25f23af 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php index a3fdae67dd..5c454f1648 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php index 3b00960812..16fa840569 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php index 552d0a39f8..3b9c362605 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php index ac4c5a4ea2..bdb342c826 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php index 5fb7929671..791a900fbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php index a52819f146..756e72cae3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php index 53df620cfc..3099f8ecef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php index 5e0fb090e1..3de2ad9204 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php index 20183953f3..5fd86223c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php index ecdab783d0..bf7699dae1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php index 9053fe7a28..fa402cfa33 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php index a460fd6f1b..f5620d4173 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php index c8d1bbc914..41780ed17f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php index 6e1275fe8d..d8f84b3edd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php index 7d8872fdf1..5e53a7eb74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php index 07081e32ee..48608aab3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php index a999949aa6..483279d734 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php index 9e410da823..ec9ca36477 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php index 9ea54cb79e..6f6a355a96 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStringTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStringTest.php index 27c41eba40..ee38ce7354 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStringTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStringTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php index ed6101fffc..3472107cb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php index 8a9054a6d8..6e520e8fc4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php index 2d0571765b..a91f0d0359 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php index ff96715ce0..7a57ef9058 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php index efd4f65f7e..e2de261f83 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php index f83d4acf91..ecb4889a50 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php index 08da3bd51c..1d54f78c5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php index ea19d63d52..9b7b4ce1c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php index f3e066a5e9..1177bf3a0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php index 32fbd8dfc5..3ef167ba58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php index 8d00e7331e..b69a0fde1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php index a2f367aefd..a10f17764e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php index 469771be9b..1e575e5fd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemVersionProcessingModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemVersionProcessingModeTest.php index 2fad27b708..6d243464a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemVersionProcessingModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemVersionProcessingModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php index 8b0b5b4bc0..b7008a1373 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php index e1a5cb3a2e..0b3c9b732a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php index d45d57134f..3e9415ac20 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php index d9bbaa171f..345f06c7b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php index d95cd62060..f9f5dcea8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php index 4460f38af8..b6f23d5290 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimeTest.php index ea1b4c95dc..b784e6ed00 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php index e183477b67..4394cfc299 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimingTest.php index 4eebb8e736..e1f7fb81c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php index d73e8734c6..12e574dcd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php index 245f03f007..d0b6c7dad4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php index 6c4ea91614..43f5fdd09c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php index 5dbe22fe09..2007af975a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php index eb46b7c279..de4778b9a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php index 54fe13096d..e9f3849636 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php index cc2458fd92..b0143b6cd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php index 64d5b8f383..b6c7e5a0f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUriTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUriTest.php index 7abf38744e..9302c5d0cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUriTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUriTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php index f32fe4c29d..19488af94c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUseTest.php index 515cd6e0c3..57b03430b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUuidTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUuidTest.php index 939ee59c0e..0e6ccd0615 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUuidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUuidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php index bc45a283c6..f961a19ccc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php index e38456d2da..f2b719e64c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php index 2fd7546b04..395f753bfe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElementTest.php index b722874e8e..8c6a093664 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIdPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIdPrimitiveTest.php index f2137abee3..1a25ab7a55 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIdPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIdPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRInstantPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRInstantPrimitiveTest.php index c19d2a6a96..9c0c2d18a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRInstantPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRInstantPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIntegerPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIntegerPrimitiveTest.php index 3ff42cf4b2..147f0bf028 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIntegerPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIntegerPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php index 16d4daa04f..89f05c31eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIROidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIROidPrimitiveTest.php index 65a45e17ab..cfde1a43f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIROidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIROidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php index 5e167ab6ad..3bef119cf5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php index 4f0db03049..aca70acbb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBundleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBundleTest.php index 500a393a59..54b63d29ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBundleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBundleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php index 9bde339c64..508f3fa41a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRAccount', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Account/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php index 9c1569d75c..9e5d574956 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRActivityDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ActivityDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php index 61798ba3df..cc040ca22b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRAdverseEvent', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/AdverseEvent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php index 83b861a413..2d6ed1c5b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRAllergyIntolerance', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/AllergyIntolerance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php index 065c384ccf..a4d1ba93c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRAppointmentResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/AppointmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php index bae7d5fac3..8d013176f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRAppointment', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Appointment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php index a7a597f9ce..e6ae755bf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRAuditEvent', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/AuditEvent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php index 500a31acdf..0da02e4ef6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRBasic', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Basic/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php index 393a1acf18..d4e76b12d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRBodySite', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/BodySite/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php index b4a445290d..e398133481 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRCapabilityStatement', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/CapabilityStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php index 70893d49ea..13176c68ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRCarePlan', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/CarePlan/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php index c34e1da599..dbbfc6bb4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRCareTeam', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/CareTeam/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php index 56545b2523..55960331ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRChargeItem', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ChargeItem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php index 0fde06f57f..dd6477ec6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRClaimResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ClaimResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php index 4521de58cf..b32ccde453 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRClaim', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Claim/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php index bc788257a3..67154e1ed5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRClinicalImpression', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ClinicalImpression/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php index 4c3f601c63..1bad02ae6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRCodeSystem', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/CodeSystem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php index 128723e33e..3704059b19 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRCommunicationRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/CommunicationRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php index dec164790c..6cd6c44e91 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRCommunication', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Communication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php index 6e7dac1a74..267abd6789 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRCompartmentDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/CompartmentDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php index 8ef577a84b..fb096c2ef5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRComposition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Composition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php index 950a3bdcf4..e1e6eb3800 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRConceptMap', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ConceptMap/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php index 3c323275d9..850de8c36d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRCondition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Condition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php index 44d3d41b27..ea7567c919 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRConsent', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Consent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php index bf664b0a44..5c509ec979 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRContract', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Contract/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php index aad203641a..0b9191a972 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRCoverage', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Coverage/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php index 493c129af3..95c76a1df5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRDataElement', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/DataElement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php index e9035afd01..03a50f40f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRDetectedIssue', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/DetectedIssue/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php index ef00323183..d417b9c8db 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRDeviceComponent', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceComponent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php index d89bc4ac1f..e058fb9d28 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRDeviceMetric', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceMetric/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php index 502582b5a5..18444cb6dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRDeviceRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php index 4d63d37c0c..ba968b1d7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRDevice', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Device/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php index 89e1014039..8a903aabcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRDeviceUseStatement', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceUseStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php index 2dea66ab38..4d0bdaf1e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRDiagnosticReport', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/DiagnosticReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php index 52344f4ee5..104c98d8ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRDocumentManifest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/DocumentManifest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php index cec6da2042..6ec1526d36 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRDocumentReference', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/DocumentReference/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php index 9820127199..2754896606 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIREligibilityRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/EligibilityRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php index 5659168a72..f67d210e84 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIREligibilityResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/EligibilityResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php index a69e18da5c..953b6c16ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIREncounter', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Encounter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php index 0a78e4a415..3c300bb509 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIREndpoint', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Endpoint/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php index 8a754a8cee..013c983c86 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIREnrollmentRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/EnrollmentRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php index cbbd06d7d4..d86828331c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIREnrollmentResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/EnrollmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php index d0c11f84a1..2c23c89d3e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIREpisodeOfCare', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/EpisodeOfCare/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExpansionProfileTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExpansionProfileTest.php index e3e195af6c..d2df3441b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExpansionProfileTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExpansionProfileTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRExpansionProfile', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ExpansionProfile/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php index a1990a1d90..20b696a6a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRExplanationOfBenefit', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ExplanationOfBenefit/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php index 1d200e55fb..9947f084ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRFamilyMemberHistory', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/FamilyMemberHistory/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php index 48d390c121..d77e2d2a15 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRFlag', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Flag/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php index f5e2f00359..63ce83d3e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRGoal', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Goal/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php index a304ba99c3..27dfcb23d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRGraphDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/GraphDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php index 455a573e58..30856ec560 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRGroup', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Group/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php index f298d482c7..9e9bf5b26e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRGuidanceResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/GuidanceResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php index a177cecd74..6224ab3773 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRHealthcareService', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/HealthcareService/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingManifestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingManifestTest.php index c082c6a683..d21fb34eb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRImagingManifest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ImagingManifest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php index ae69dd5eec..6fa064cd59 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRImagingStudy', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ImagingStudy/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php index e37ae00315..e277814661 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRImmunizationRecommendation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ImmunizationRecommendation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php index c0daea7ea7..c74f9524ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRImmunization', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Immunization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php index a1678dfa03..ba83dea6aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRImplementationGuide', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ImplementationGuide/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php index 3fefe36d2d..ca1dc5d446 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRLibrary', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Library/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php index 7df503939a..6ca0fd2b05 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRLinkage', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Linkage/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php index 5581645d6f..975c3fc6d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRList', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/List/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php index 7c9d39397a..2dfc30c9dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRLocation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Location/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php index 93abbfd462..a150fdb77b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRMeasureReport', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/MeasureReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php index 61e7826a97..4d6a66a37d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRMeasure', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Measure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php index ad3c8fcb79..b69172c704 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRMedia', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Media/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php index 8eb3b94eea..549f367685 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRMedicationAdministration', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationAdministration/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php index 66bb70746d..9b18288b73 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRMedicationDispense', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationDispense/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php index 32919c076f..c87b033562 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRMedicationRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php index fc7b4c609e..b74694b24a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRMedicationStatement', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php index 8cea7ac235..c44d7e6afb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRMedication', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Medication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php index b0c4a8cf51..610b67c2da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRMessageDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/MessageDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php index 85104d268f..bb2c17c0c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRMessageHeader', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/MessageHeader/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php index d97c03a674..6b5ec412c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRNamingSystem', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/NamingSystem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php index eace57b2a4..95da26e70a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRNutritionOrder', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/NutritionOrder/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php index 714d09ee0b..3f3e34a8ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRObservation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Observation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php index 2bf1a4a738..86e9cf8486 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIROperationDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/OperationDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php index cf3624a329..78215ae3d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIROperationOutcome', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/OperationOutcome/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php index 3a60c90cfc..5a1ca34cf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIROrganization', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Organization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php index 8713f769df..debd860ba6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRPatient', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Patient/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php index e51df9e308..d2588893e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRPaymentNotice', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/PaymentNotice/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php index 14a8f9c7ce..0306d7f371 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRPaymentReconciliation', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/PaymentReconciliation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php index a45922e9a7..33633e79b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRPerson', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Person/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php index 73f4f529e4..36fa83433c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRPlanDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/PlanDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php index e7bb46c4c0..631c6f6cbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRPractitionerRole', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/PractitionerRole/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php index c821299b99..dd581c82e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRPractitioner', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Practitioner/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php index 2cb7a4c47d..4aee95773c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRProcedureRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ProcedureRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php index 4731f87834..3d6d961ac6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRProcedure', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Procedure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php index 621e561e7a..62405c38cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRProcessRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ProcessRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php index eddac0060b..c636fb554c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRProcessResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ProcessResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php index 1840dd0375..4b2a64e8bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRProvenance', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Provenance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php index d9252bf614..fa8335fa34 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRQuestionnaireResponse', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/QuestionnaireResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php index 3446ebc692..f91895a26e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRQuestionnaire', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Questionnaire/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php index e3a0d5560c..c25503f970 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRReferralRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ReferralRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php index 6e5e281050..e8b61ede75 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRRelatedPerson', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/RelatedPerson/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php index 2bdc0dbe8d..7d3fcbaac9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRRequestGroup', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/RequestGroup/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php index 5f2f395c9d..821dab7597 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRResearchStudy', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ResearchStudy/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php index fc81a5b8f0..4b197fd631 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRResearchSubject', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ResearchSubject/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php index 2c173481fd..b614a20db8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRRiskAssessment', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/RiskAssessment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php index 5bc0fc2e03..45121219a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRSchedule', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Schedule/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php index 7520de78ce..e4c63c2531 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRSearchParameter', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/SearchParameter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSequenceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSequenceTest.php index 292633ca9b..629de8ff35 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSequenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSequenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRSequence', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Sequence/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceDefinitionTest.php index 59120bfb9f..02eb18d926 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRServiceDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ServiceDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php index 30cfe442e8..3134115478 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRSlot', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Slot/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php index 51d78ff82a..e3616b05c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRSpecimen', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Specimen/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php index 8c1fff0b8d..047744057c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRStructureDefinition', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/StructureDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php index 0133da5900..9868558b53 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRStructureMap', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/StructureMap/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php index 3b5569d86d..e63dcf03c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRSubscription', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Subscription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php index 0e8a88c81c..1429d678d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRSubstance', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Substance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php index 83802dc3ba..c655fd117c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRSupplyDelivery', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/SupplyDelivery/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php index 3a94498937..84d2b04f5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRSupplyRequest', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/SupplyRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php index 602a85c83b..b0739343fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRTask', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/Task/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php index b485bc1797..101bc45cd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRTestReport', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/TestReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php index bfd47ccfee..c010044d5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRTestScript', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/TestScript/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php index fa2e074d2a..bdba17444d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRValueSet', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/ValueSet/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php index 4783ea575e..0720893cfe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -78,18 +78,22 @@ public function testCanConstructTypeNoArgs() $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource\FHIRVisionPrescription', $type); } + private $_fetchedResources = []; + /** * @param string $format Either xml or json * @return string */ protected function fetchResource($format) { + if (isset($this->_fetchedResources[$format])) { + return $this->_fetchedResources[$format]; + } $url = sprintf('http://hapi.fhir.org/baseDstu3/VisionPrescription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, - CURLOPT_TIMEOUT => 10, // set low timeout to move things along... ]); $res = curl_exec($ch); $err = curl_error($ch); @@ -100,6 +104,7 @@ protected function fetchResource($format) } else { $this->assertInternalType('string', $res); } + $this->_fetchedResources[$format] = $res; return $res; } @@ -207,4 +212,53 @@ public function testJSON() ); } } + + public function testValidationXML() + { + $xml = $this->fetchResource('xml'); + try { + $bundle = FHIRBundle::xmlUnserialize($xml); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from XML: %s; Returned XML: %s', + $e->getMessage(), + $xml + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } + + public function testValidationJSON() + { + $json = $this->fetchResource('json'); + $decoded = $this->decodeJSON($json, true); + try { + $bundle = new FHIRBundle($decoded); + } catch(\Exception $e) { + throw new AssertionFailedError( + sprintf( + 'Error building type "Bundle" from JSON: %s; Returned JSON: %s', + $e->getMessage(), + $json + ), + $e->getCode(), + $e + ); + } + $errs = $bundle->_getValidationErrors(); + try { + $this->assertCount(0, $errs); + } catch (\Exception $e) { + $this->markTestSkipped(sprintf('Validation errors seen: %s', json_encode($errs, JSON_PRETTY_PRINT))); + } + } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php index 41a9aac2d5..a766ef66aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRParametersTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRParametersTest.php index 9ce833c8de..ea2de82f79 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRParametersTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRParametersTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceContainerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceContainerTest.php index 6c4625510d..7b44ced346 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceTest.php index edc94c2596..081c41fea4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php index 214e89e58b..ab7acf9985 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRStringPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRStringPrimitiveTest.php index d82f6ea61a..fef95f3c44 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRStringPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRStringPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRTimePrimitiveTest.php index 63db9c26c7..7f5620d805 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php index 6202b70b42..a86aaa3c12 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUriPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUriPrimitiveTest.php index 59c6c97d6d..5ca8f8a322 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUriPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUriPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUuidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUuidPrimitiveTest.php index fc3ff6cc70..167b50eb0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUuidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUuidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRConstantsTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRConstantsTest.php index 77ebb85de5..5f32466d14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRConstantsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRConstantsTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRTypeMapTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRTypeMapTest.php index 0b5e2817ce..75f03cd9b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRTypeMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRTypeMapTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeInterface.php index a39de121a9..31dcd573df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * @@ -97,12 +97,18 @@ public function _setFHIRXMLNamespace($xmlNamespace); */ public function _getFHIRXMLElementDefinition(); + /** + * Must return an associative array in structure ["field" => ["rule" => {constraint}]] to be used during validation + * @return array + */ + public function _getValidationRules(); + /** * Must return associative array where, if there are validation errors, the keys are the names of fields within the * type that failed validation. The value must be a string message describing the manner of error * @return array */ - public function _validationErrors(); + public function _getValidationErrors(); /** * @param \SimpleXMLElement|string|null $sxe diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeMap.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeMap.php index 094f29b7e4..0bdbc2e3a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeMap.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: December 7th, 2019 16:37+0000 + * Class creation date: December 22nd, 2019 07:25+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRValidationAssertionsTrait.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRValidationAssertionsTrait.php new file mode 100644 index 0000000000..72ab98c567 --- /dev/null +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRValidationAssertionsTrait.php @@ -0,0 +1,219 @@ += $expected) { + return null; + } + if (null === $value || !is_array($value) || [] === $value) { + return sprintf('Field "%s" on type "%s" must have at least %d elements, but it is empty', $fieldName, $typeName, $expected); + } + if ($expected > ($cnt = count($value))) { + return sprintf('Field "%s" on type "%s" must have at least %d elements, %d seen.', $fieldName, $typeName, $expected, $cnt); + } + return null; + } + + /** + * Asserts that a given collection field has no more than the specified number of elements + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|array $value + * @return null|string + */ + protected function _assertMaxOccurs($typeName, $fieldName, $expected, $value) + { + if (PHPFHIRConstants::UNLIMITED === $expected || null === $value || !is_array($value) || [] === $value || $expected >= ($cnt = count($value))) { + return null; + } + return sprintf('Field "%s" on type "%s" must have no more than %d elements, %d seen', $fieldName, $typeName, $expected, $cnt); + } + + /** + * Asserts that a given string value is at least x characters long + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|string $value + * @return null|string + */ + protected function _assertMinLength($typeName, $fieldName, $expected, $value) + { + if (0 === $expected) { + return null; + } + if (null === $value || !is_string($value) || '' === $value) { + return sprintf('Field "%s" on type "%s" must be at least %d characters long, but it is empty', $fieldName, $typeName, $expected); + } + if ($expected > ($cnt = strlen($value))) { + return sprintf('Field "%s" on type "%s" must be at least %d characters long, %d seen.', $fieldName, $typeName, $expected, $cnt); + } + return null; + } + + /** + * Asserts that a given string value is no more than x characters long + * @param string $typeName + * @param string $fieldName + * @param int $expected + * @param null|string $value + * @return null|string + */ + protected function _assertMaxLength($typeName, $fieldName, $expected, $value) + { + if (PHPFHIRConstants::UNLIMITED === $expected || null === $value || !is_string($value) || '' === $value || $expected <= ($cnt = strlen($value))) { + return null; + } + return sprintf('Field "%s" on type "%s" must be no more than %d characters long, %d seen', $fieldName, $typeName, $expected, $cnt); + } + + /** + * Asserts that a given value is within the expected list of values + * @param string $typeName + * @param string $fieldName + * @param array $expected + * @param mixed $value + * @return null|string + */ + protected function _assertValueInEnum($typeName, $fieldName, array $expected, $value) + { + if ([] === $expected || in_array($value, $expected, true)) { + return null; + } + return sprintf( + 'Field "%s" on type "%s" value "%s" not in allowed list: [%s]', + $fieldName, + $typeName, + var_export($value, true), + implode( + ', ', + array_map( + function($v) { return var_export($v, true); }, + $expected + ) + ) + ); + } + + /** + * Asserts that a given string value matches the specified pattern + * @param string $typeName + * @param string $fieldName + * @param string $pattern + * @param null|string $value + * @return null|string + */ + protected function _assertPatternMatch($typeName, $fieldName, $pattern, $value) + { + if (null === $value || !is_string($pattern) || '' === $pattern || (bool)preg_match($pattern, $value)) { + return null; + } + return sprintf('Field "%s" on type "%s" value of "%s" does not match pattern: %s', $fieldName, $typeName, $value, $pattern); + } + + /** + * @param string $typeName + * @param string $fieldName + * @param string $ruleName + * @param mixed $constraint + * @param mixed $value + * @return null|string + */ + protected function _performValidation($typeName, $fieldName, $ruleName, $constraint, $value) + { + switch($ruleName) { + case PHPFHIRConstants::VALIDATE_ENUM: + return $this->_assertValueInEnum($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MIN_LENGTH: + return $this->_assertMinLength($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MAX_LENGTH: + return $this->_assertMaxLength($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MIN_OCCURS: + return $this->_assertMinOccurs($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_MAX_OCCURS: + return $this->_assertMaxOccurs($typeName, $fieldName, $constraint, $value); + case PHPFHIRConstants::VALIDATE_PATTERN: + return $this->_assertPatternMatch($typeName, $fieldName, $constraint, $value); + + default: + return sprintf('Type "%s" specifies unknown validation for field "%s": Name "%s"; Constraint "%s"', $typeName, $fieldName, $ruleName, var_export($constraint, true)); + } + } +}